Commit Graph

11067 Commits

Author SHA1 Message Date
Earlopain
b1e41b1e94
[Admin] Fix formatting of first edit history 2023-10-15 13:18:07 +02:00
Earlopain
2620ea983e
[Wiki] Better diffing view 2023-10-15 13:08:28 +02:00
Earlopain
80b26fbe16
[Docker] Allow easy enabling of NewRelic 2023-10-11 19:47:53 +02:00
Earlopain
d16b7b0b40
[Prod] Limit the amount of data sent to NewRelic 2023-10-11 19:45:11 +02:00
Earlopain
e3256bb313
[Prod] Add instrumentation to login attempts 2023-10-10 17:00:59 +02:00
Earlopain
728a8caa60
[Prod] Rework NewRelic logging
* Use config to log request params
* Stop logging the session. There's nothing useful there
* Stop logging a users level
2023-10-10 16:23:43 +02:00
Earlopain
871f2d6d7d
[Prod] Commit the newrelic config file 2023-10-10 16:00:46 +02:00
Earlopain
a3caf7b407
[Rubocop] Regenerate todo
998 files inspected, 5533 offenses detected, 5285 offenses autocorrectable
2023-10-02 20:41:55 +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
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