Commit Graph

10858 Commits

Author SHA1 Message Date
Earlopain
156276f0c0
[Docker] Allow overriding forwarded ports
This also makes images load on ports other than 3000 by default
2023-09-25 18:21:08 +02:00
Earlopain
8ad0e08a82
[Docker] Add deleted/replacements protection 2023-09-25 16:14:55 +02:00
Earlopain
81ab93b7ee
[Takedowns] Fix adding by tag search
Broken with b4e16fa0fd
2023-09-21 19:06:18 +02:00
Earlopain
ac0f2e9a40
[Posts] Fix visual inconsistency on the parent message
Same as cd50549bbf
2023-09-19 21:10:18 +02:00
Earlopain
a0c56446fa
Merge pull request #548 from e621ng/remove-elasticsearch-model
Remove elasticsearch-model
2023-09-18 20:29:56 +02:00
Earlopain
f7b829ba34
[Elasticsearch] Perform create callback inline
I changed this previously because I didn't see the reason behind the distinction.

When the job queues are full for example because of approvals of large BURs
it's desirable for newly uploaded posts to still appear in search results.
2023-09-18 20:28:53 +02:00
Earlopain
26ed6928ba
[Dmails] Tweak rate limit
* Lower hourly limit
* Add daily limit
2023-09-17 17:57:17 +02:00
Earlopain
632b611c4c
[Dmails] Fix senders copy being created when validations fail 2023-09-17 16:40:33 +02:00
Earlopain
9e2c7b2b5b
[Cleanup] Remove ban check when sending dmails
Banned users can't login in the first place
2023-09-17 14:38:43 +02:00
Earlopain
1c4a79d2ef
[Docker] Enable YJIT
Gives a small performance boost on prod in exchange for more RAM usage
2023-09-17 14:37:16 +02:00
Earlopain
b6dc473a55
[Elasticsearch] Bring back the proxy object 2023-09-16 17:09:33 +02:00
Earlopain
0bd651c08b
[Elasticsearch] Remove elasticsearch-model gem
This should be the bulk of the work to integrate with opensearch-ruby
2023-09-16 15:52:05 +02:00
Earlopain
ddcb7c1af1
[Elasticsearch] Implement index_name 2023-09-16 15:39:49 +02:00
Earlopain
c65288d2cd
[Elasticsearch] Move PaginatedArray to own file 2023-09-16 15:36:10 +02:00
Earlopain
b4e16fa0fd
[Elasticsearch] Implement Response 2023-09-16 15:30:28 +02:00
Earlopain
be71bf7a16
[Elasticsearch] Move implementation to own folder 2023-09-16 14:29:04 +02:00
Earlopain
f1d5864724
[Elasticsearch] Move more code out of indexable 2023-09-16 14:26:04 +02:00
Earlopain
5d791f9803
[Elasticsearch] Extend the base class
This whole thing needs some refactoring after I'm done with this.
2023-09-16 14:16:08 +02:00
Earlopain
bd1bd8cfc3
[Elasticsearch] Stop sending the document type
This is deprecated in ES7 and removed in ES8 and OS2
2023-09-16 13:48:30 +02:00
Earlopain
d41496d254
[Elasticsearch] Implement search 2023-09-16 13:40:50 +02:00
Earlopain
a8b085e714
[Elasticsearch] Implement delete_document 2023-09-16 13:23:25 +02:00
Earlopain
123a96bd26
[Elasticsearch] Implement index_document
Also makes the callbacks for update the same as for create.
I don't see why creation should run inline, same for reownering.
2023-09-16 13:19:21 +02:00
Earlopain
3285d546f9
[Elasticsearch] Move index creation to DocumentStore 2023-09-14 21:53:26 +02:00
Earlopain
855388b092
[Elasticsearch] Remove a few more easy usages of __elasticsearch__ 2023-09-14 20:56:56 +02:00
Earlopain
a79e25dfbd
[Elasticsearch] Start implementing own elasticsearch-model
This implements create_index!
2023-09-14 20:49:19 +02:00
Earlopain
17b9797657
[Misc] Remove elasticsearch-rails gem
There is no counterpart for OpenSearch.
`elasticsearch-model` needs to go too but that is more involved than
just removing something that only facilitates logging in dev.

This was responsible for
* displaying the time elasticsearch queries took per request
* logging the search parameters being sent to elasticsearch per query

The implementation isn't that complex and I could roll something myself but
considering that I haven't sought that information out by now I'll just don't.
Logging queries is trivial since we craft these manually ourselves.
2023-09-12 20:23:35 +02:00
Earlopain
1e3ef915a1
[DText] Fix inputs with no limit showing red
Also triggers the calculation immediatly so that the number is shown
when you start editing something
2023-09-12 19:27:03 +02:00
Earlopain
7c7c2f1870
[Users] Add a size limit to the body of feedback 2023-09-12 19:09:17 +02:00
Earlopain
056ce3e7aa
[Cleanup] Remove without_safe_mode from CurrentUser
It really did two things and was primarily intented for automated actions
so that all posts get matched regardless of rating and status.
Now there's a dedicated method to do just that
2023-09-11 18:30:25 +02:00
Earlopain
cd50549bbf
[Posts] Fix visual inconsistency on the children message 2023-09-09 13:13:14 +02:00
Earlopain
0f842b9da0
[Tests] Remove wasteful post after_create hook
Not needed anymore.
Tests went from 95 seconds to 82 on my machine.
2023-09-08 21:33:25 +02:00
Earlopain
c53b2eff60
[Tests] More performance improvements
Most of the gained time is because some post tests don't recreate the
elastic index twice now.
Tests go from 107 seconds to 95 on my machine.
2023-09-08 19:51:35 +02:00
Earlopain
37ff30db3a
[Docker] Fix empty var warning on windows for PWD 2023-09-08 19:19:18 +02:00
Earlopain
de4068ade8
[Tests] Clear elasticsearch before tests run
Previously they were only created if they didn't exist.
Data from previous test runs was still present.
2023-09-08 19:17:47 +02:00
Earlopain
499d447352
[Users] Fix custom css
The constraint applies to all user routes, which includes `custom_style`.
Also fixes a constant redefinition warning in the console when doing `reload!`
2023-09-07 21:08:55 +02:00
Earlopain
4c6f4fe104
[CI] Appease rubocop 2023-09-07 17:32:50 +02:00
Earlopain
f6a438a302
[Tickets] Fix error when creating tickets for non-existant content 2023-09-07 17:08:52 +02:00
Earlopain
d5b64b1712
[Tests] Improve execution time of some of the worst offenders
From 112 seconds to 107 on my machine
Not much all things considered but most of the time is still spend on
elasticsearch, especially when forcefully recreating the index
2023-09-07 17:04:34 +02:00
Earlopain
a5f5543e85
[Tests] Remove unused fixture files 2023-09-07 16:41:20 +02:00
Earlopain
bc01fb2355
Merge pull request #545 from DonovanDMC/strict-route-formats
[Routes] Fix handling of periods in artists, tags, users & wiki pages
2023-09-05 17:31:44 +02:00
Donovan Daniels
115c140cc2
[Posts] Make comment_disabled not hide comments (#546)
* [Posts] Make comment_disabled not hide comments

* [VoteManager] Disallow voting on locked/disabled comments

* [Comments] Disable editing/hiding disabled & locked comments

* Tweaking

* Allow hiding when comments locked
* Don't allow mods to vote when comments locked
* Change wording from disabled to locked everywhere

---------

Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
2023-09-05 17:27:05 +02:00
Earlopain
d2f8943b63
[TagQuery] Simplify order metatags special handling
`rank` can be moved inside case/when and the rest is not needed since
that field is not nullable
2023-09-05 16:10:32 +02:00
Earlopain
1b9ea498d3
[TagQuery] Move more stuff into the base elastic class 2023-09-05 16:03:13 +02:00
Earlopain
636937a118
[TagQuery] Move generic elastic code to base class 2023-09-05 15:35:23 +02:00
Earlopain
c51029ea1e
[ModActions] Stop logging name changes
These are not mod actions, anybody can do that. Only log when admins
force change names.
Don't show old/new names, we already don't show that on user profiles.
2023-09-04 23:02:14 +02:00
Earlopain
2290d7045e
[TagQuery] Support any/none for ORed metatags
Turns out it's really simple
2023-09-03 21:25:44 +02:00
Earlopain
6e473193fe
[TagQuery] Fix exception for user_id metatag 2023-09-03 20:37:44 +02:00
Earlopain
939a2d1a23
[Tickets] Fix exception when providing no qtype
const_defined? throws for the empty string
2023-09-03 20:34:53 +02:00
Earlopain
17e9c052cd
[Ads] Support keyword targets
Basically a redo of b61856af6d which was removed in 0842a50ad5
2023-09-03 18:44:42 +02:00
Earlopain
9203dcdb82
[Posts] Add a method to get tags that a post is tagged with
Better performance than the regex as well
2023-09-03 18:24:40 +02:00