Earlopain
17b99821e3
[Posts] Fix searches for huge ids erroring
...
This is because they can exceed Integer.MAX_VALUE on the opensearch side
2024-02-28 17:25:54 +01:00
Earlopain
fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
...
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00
Earlopain
930b4b905c
[Pools] Fix show/gallery for frozen string literals
...
Get rid of the presenters/post sets.
2024-02-25 11:38:55 +01:00
Earlopain
f59399ed67
[TagRelationships] Fix aliases/implications being left in queued state
...
This wasn't going through the error handler
2024-02-22 17:38:51 +01:00
Earlopain
9f796049a3
[Tests] Remove a rails bug workaround
...
Fixed sometime in the last 5 years
2024-02-22 16:44:19 +01:00
Earlopain
43ade626e0
[AIBUR] Fix ModActions for implications and on alias reject
2024-02-15 16:58:47 +01:00
Earlopain
860084b68c
[Tests] Skip more flakiness
...
https://github.com/e621ng/e621ng/actions/runs/7905570941/job/21578501986
2024-02-14 19:23:10 +01:00
Earlopain
8112e57329
[Tests] Skip flaky pagination test on CI
2024-02-04 16:51:13 +01:00
Earlopain
b00f7145c0
[Rails] Enable some new framework defaults
...
Others require a deploy first (like caching stuff) or need more thought (like serialization changes)
2024-01-27 13:49:57 +01:00
Donovan Daniels
8f8feac8aa
[Artists] Show error when changing notes with locked wiki page ( #580 )
...
* [Artists] Show error when changing notes with locked wiki page
* [Tests] Add tests for editing artists with locked wiki pages
2024-01-14 21:01:01 +01:00
Donovan Daniels
c11ad6b874
[UserFeedback] Add Updater
2024-01-04 14:31:54 -06:00
Donovan Daniels
74007f2e30
[Blips] Add Updater & Tests/Move modactions to callbacks ( #540 )
...
* [Blips] Add `updater_id` & update notice
* [Blips] Move modaction generation logic into rails callbacks
* [Tests] Add blip tests
* Move update notice to right place
* Assert amount of difference
* Rebase oopsie
---------
Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
2023-12-04 20:56:14 +01:00
Donovan Daniels
6eaf435002
Bring ForumPost ModAction trigger in line with Comments ( #542 )
...
* [Tests] Add hide & delete modaction tests to comments and forum posts
* [ForumPosts] Remove user id check on destroy
* [ForumPosts] Don't create edit modaction on hide
* Assert correct amount of ModActions is created
Especially important when it previously created 2 instead of 1 for hiding
---------
Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
2023-12-04 19:41:29 +01:00
Earlopain
7dcaf81979
[Uploads] Don't follow redirects to non-whitelisted urls
...
Also improves the existing tests a bit by being checking the error message
2023-10-20 21:00:32 +02:00
Earlopain
cc6e18797a
[Uploads] Correctly follow redirects
...
Some sites serve urls that redirect by default. This would append the
"You are being redirected" html to the file being downloaded after that
and subsequently report that text/html is not a valid format
2023-10-15 13:52:38 +02:00
Earlopain
3a58ac0938
Switch to OpenSearch ( #550 )
...
Run the following commands to import data into OpenSearch:
Post.document_store.create_index!
PostVersion.document_store.create_index!
Post.document_store.import
PostVersion.document_store.import
* Add opensearch client
* Add url param to force use opensearch
* Switch import method over to opensearch
* Index to opensearch as well
* Add option to gradually roll out os
* Index os with separate queue
* Move os post creation to job as well
* Exclusively use the OpenSearch client
* Stop enqueuing OsIndexUpdateJob
* Remove remaining elasticsearch code
Bump faraday since v2 is no longer blocked
2023-10-02 18:57:07 +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
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
b6dc473a55
[Elasticsearch] Bring back the proxy object
2023-09-16 17:09:33 +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
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
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
4c6f4fe104
[CI] Appease rubocop
2023-09-07 17:32:50 +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
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
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
177558b5d5
[TagQuery] Use consistent naming for tag fields
2023-09-03 15:23:27 +02:00
Earlopain
b2c7b338c0
[TagQuery] Improve description search
...
These all works:
* description:test
* description:"multiple words followed by each other"
* description:"multiple words followed by each oth*"
2023-09-03 15:12:40 +02:00
Earlopain
be75cf3349
[QueryBuilder] Fix searching by tag counts
2023-08-31 08:57:47 +02:00
Earlopain
8b133570c0
Merge pull request #543 from e621ng/search-improvements
...
Search improvements
2023-08-29 18:54:42 +02:00
Earlopain
b65741456f
[QueryBuilder] Move count validation into the query class
2023-08-24 13:43:01 +02:00
Earlopain
c8d7bebd72
[QueryBuilder] Move parsing code into own class
...
Introduces the concept of "free" tags to account for automatically added tags.
Introduce `resolve_aliases` which can be used instead of `raw_tag_match`
2023-08-24 13:16:44 +02:00
Earlopain
9848c18ace
[QueryBuilder] Move value parsing into separate module
...
Also add some tests
2023-08-23 14:18:51 +02:00
Earlopain
1621e6e110
[QueryBuilder] Rename range parsing methods for clarity
...
Also replace a bit of the regex matching with more explicit code.
2023-08-22 23:23:08 +02:00
Earlopain
b7b9a8c400
[Users] Remove the contributor rank
...
We don't use that anymore. Next one up is former staff, so the checks
look a bit goofy now.
2023-08-21 21:24:31 +02:00
Earlopain
f193e159eb
[QueryBuilder] Introduce methods to handle common search actions
2023-08-19 18:37:15 +02:00
Earlopain
d579c845f3
[Cleanup] Remove duplicate tag query scan method
2023-08-19 11:20:00 +02:00
Earlopain
b4a7a5ba3d
[Cleanup] Remove unused tag methods
2023-08-18 23:08:42 +02:00
Earlopain
c9a084e0a3
[Tags] Take category id instead of name for related search
...
Also have the bulk response return something with more structure to it
2023-08-18 22:40:06 +02:00
Earlopain
36eb87b084
[Cleanup] Move tag data outside of config file
...
Most of that is not easily configurable and requires db fields, css classes etc.
Everything in TagCategory was also pretty much incomprehensible for me
thanks to the indirection, so I moved it all inline instead.
I'll clean that up in later commits.
2023-08-18 19:08:52 +02:00
Earlopain
3aecc36b3e
[Users] Fix exception when refreshing counts
2023-08-15 14:13:58 +02:00
Earlopain
d6bfa02694
[Replacements] Fix approving when hitting the upload limit
...
Also improves the error message that was being returned because
just saying 'pending' isn't really helpful
2023-08-11 17:39:33 +02:00
Earlopain
3f03182dfb
[Cleanup] Remove a test-only method
2023-08-11 17:30:43 +02:00
Earlopain
e6d3fabc2a
[Posts] Don't unflag if approving on the show page
...
My previous commit on the matter says that this was intented behaviour
and always like that but it's just unexpected
2023-08-07 20:23:13 +02:00
Earlopain
2ce42c49e3
[Users] Add replacements to the hourly upload limit
2023-08-05 12:29:38 +02:00
Earlopain
42abd4ca33
[UserRevert] Fix error when user has uploaded a post
...
Extended version of #530
Co-authored-by: Donovan Daniels <hewwo@yiff.rocks>
2023-08-01 18:20:39 +02:00