Commit Graph

1280 Commits

Author SHA1 Message Date
Earlopain
d01c8c131d
[Misc] Replace httparty with faraday
We already pull in faraday from opensearch-ruby.
httparty hasn't had a release in a while and it printing warnings on ruby 3.3
2024-04-27 23:01:10 +02:00
Donovan Daniels
0f8ec1de53
[Notes] Remove note previews, replace with dtext previews 2024-04-18 05:31:25 -05:00
Earlopain
0a35264ad8
[Prod] Ignore pg errors during rack requests
These are handled at the application level
2024-04-15 19:55:41 +02:00
Earlopain
f328836895
[Prod] Change how Datadog is enabled
This works fine here (filled in through dockers .env injection)
but on prod the application doesn't know about the API key
2024-04-09 20:52:33 +02:00
Earlopain
0b47770c49
[Prod] Add Datadog
Let's see how this one works out. Cute logo
2024-04-09 20:16:29 +02:00
Earlopain
e3fdc5d61b
[Pools] Fix discrepancy between index page count and actual page count
One was using `user.per_page`, the other config.posts_per_page. Consolidate this
logic to `paginate_posts` to make it more obvious what's going on.
2024-04-04 22:52:49 +02:00
Earlopain
3f3fd0ab4f
[Misc] Revert april fools stuff 2024-04-03 14:39:09 +02:00
Earlopain
c1aa5f95b1
[Misc] Add optout for april fools
Close #630
2024-04-01 12:24:33 +02:00
Earlopain
e4799d9f83
[Prod] Dump NewRelic
Need to look into alternatives
2024-03-23 20:52:31 +01:00
Earlopain
93d759671c
[Misc] Fix webpacker compilation of files only required with require.context
I don't believe this is intentional behaviour but it's also not getting any udpates anymore
This at least makes it work
2024-03-03 12:20:22 +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
56e849695b
[Cleanup] Remove readonly only
Since its introduction 3 years ago, it got used once I believe
I can't even say if this properly works anymore.

If something like that is actually desired in the future, it should just be a whitelist instead
2024-02-23 16:48:56 +01:00
Donovan Daniels
6b2b2cfc14
[DMails] Add marking as unread (#620)
* [DMails] Add marking as unread

* Tweak wording to be same as "Mark all as read", dmail capitalization
2024-02-23 16:39:59 +01:00
Earlopain
1a7df4a497
[Misc] Use libvips provided color profile 2024-02-04 16:42:43 +01:00
Earlopain
f5fcd8a53b
[Rails] Set load_defaults to 7.1 2024-01-30 16:18:26 +01:00
Earlopain
86d44b5b67
[Rails] Enable the remaining 7.1 framework defaults 2024-01-30 16:16:10 +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
Earlopain
79427ef36c
[Rails] Enable raise_on_missing_callback_actions for dev/test 2024-01-26 22:43:24 +01:00
Earlopain
a7228612a2
[Rails] Update to 7.1
Run `app:update`, fix the one deprecation warning
2024-01-25 22:05:29 +01:00
Earlopain
dd7106ed2d
[Discord] Add a report for AIBURs 2024-01-21 17:28:46 +01:00
Earlopain
a0a0d8db13
[Docker] Replace solargraph with ruby-lsp
It just works.
Requires a bit of a workaround for the .rubocop.yml env setup currently in use but thats alright.
The companion ruby-lsp-rails doesn't do much right now but I imagine that to become quite powerful in the future.
2024-01-11 23:16:03 +01:00
Earlopain
40792f6d43
[Discord] Add moderator report 2024-01-09 17:24:48 +01:00
Earlopain
acae76a907
[Dmails] Change http verb from post to put for marking as read
That's what mark_all_as_read should have been from the start and
what I should have put mark_as_read to as well
2023-12-18 20:03:38 +01:00
Earlopain
f477141c63
[Dmails] Add route to mark single dmail read 2023-12-17 20:06:10 +01:00
Earlopain
776866b873
[Cleanup] Move blocked ip checking out of config
These three used methods do basically the same, except more correct.
fc00::/7 are considered private while here only fd00::/8 was checked
2023-10-20 19:58:10 +02:00
Earlopain
fb00b3f4af
[Rails] Remove backtrace silencer initializer
Removing the app root already happens by default, in a more correct manner.
Fixes the following type of backtraces:
app/decoratorslication_decorator.rb:1:in `<main>'
=>
app/decorators/application_decorator.rb:1:in `<main>'
2023-10-16 20:09:54 +02:00
Earlopain
2620ea983e
[Wiki] Better diffing view 2023-10-15 13:08:28 +02:00
Earlopain
d16b7b0b40
[Prod] Limit the amount of data sent to NewRelic 2023-10-11 19:45:11 +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
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
26ed6928ba
[Dmails] Tweak rate limit
* Lower hourly limit
* Add daily limit
2023-09-17 17:57:17 +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
b4e16fa0fd
[Elasticsearch] Implement Response 2023-09-16 15:30:28 +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
7c7c2f1870
[Users] Add a size limit to the body of feedback 2023-09-12 19:09:17 +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
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
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
Donovan Daniels
9c54a0a872
[Routes] Fix handling of periods in artists, tags, users & wiki pages 2023-08-29 13:44:22 -05:00
Earlopain
40db4d6136
[Users] Remove weird behaviour from respond_with in api keys controller
There is no proper show action for api keys. Just do a redirect instead.
Remove a duplicate view action from the routes, be explicit that a show action exists
2023-08-29 20:32:42 +02:00
Earlopain
ef554b4ece
[Users] Set fav limit to 80k for (almost) everyone
There are only a handful of users currently above it, they will get a custom
limit set which can be adjusted in the future
2023-08-21 21:41:06 +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
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
e7b8517e92
[Uploader] Fix description not having formatting buttons
I forgot that the uploader uses this. Not the best fix by any strech of
the imagination but it works. Need to get back to this later.
2023-08-17 16:35:38 +02:00
Earlopain
3f1a6ee95a
[Cleanup] Remove newrelic workaround
Hasn't been relevant since version 3.8.0 which was released almost a decade ago
2023-08-14 20:19:41 +02:00
Earlopain
9104ce1461
[Rails] Remove 6.1 -> 7.0 cookie rotator
Earlier than I wrote in the message but people had ample time to login by now
2023-08-07 20:25:59 +02:00
Earlopain
7a75b4514a
[Docker] Add the discord joiner as an optional service 2023-08-04 22:54:01 +02:00