Commit Graph

1296 Commits

Author SHA1 Message Date
Cinder
0db551db62
[Misc] Add a subscribestar static page (#856) 2025-01-26 06:26:23 -08:00
clragon
29b98e5002
[StaffNotes] Add updating and deleting (#823) 2025-01-12 19:28:32 -08:00
Donovan Daniels
32a1367cfe
[Users] Consolidate password confirmation into singular route (#813) 2024-12-18 06:02:02 -08:00
Cinder
4883912e93
[Security] Implement read only mode (#821) 2024-12-08 19:28:31 -08:00
Tarrgon
cf94b1b827
[DangerZone] Allow admins to hide pending posts for a specified amount of hours (#760) 2024-11-10 20:22:14 -08:00
Donovan Daniels
237f79eabe
[AvoidPosting] Bug fixes and cleanup (#706) 2024-08-04 12:35:46 -07:00
Donovan Daniels
8a3e70e5ca
[AvoidPosting] Integrate the avoid posting list into the site (#582) 2024-08-03 14:15:26 -07:00
Donovan Daniels
b3b16759c4 [PostSets/Pools] Handle metatag additions when set/pool is full (#669) 2024-07-28 18:12:41 -07:00
Donovan Daniels
4a0a0c2f93
[UserFeedbacks] Add ability to soft delete feedbacks (#670) 2024-07-21 10:58:40 -07:00
Donovan Daniels
d9f6653e02
[Posts] Overhaul destroyed posts (#672) 2024-07-13 17:05:50 -07:00
Sindrake
c186b4ee2f [PostFlags] Add a new flag for banned content 2024-07-12 18:07:31 -07:00
Earlopain
e4a5764d0b
[Prod] Inline the memory calculation
`Pitchfork::MemInfo` is not public. This also fixes the numbers being off by
a factor of 1024 since pitchfork returns kB, while unicorn-worker-killer used to handle bytes.

Add the amount of requests done after the worker get killed for memory reasons
2024-05-08 16:35:11 +02:00
Earlopain
401866b68a
[Prod] Simplify implementation of worker killer
Credits to byroot for pointing me in this direction
2024-05-07 21:54:25 +02:00
Earlopain
4c58f4988f
[Prod] Share pitchfork config
Somewhat exercise the custom logic during development
2024-05-07 21:54:25 +02:00
Earlopain
2c60ec69c8
[Prod] Replace unicorn with pitchfork
pitchfork is a unicorn fork with some things removed and some things added.
We don't need any of these things so it should be an easy replace.
There is no worker-killer for pitchfork, it is however trivial to implement ourselves.

unicorn is pretty much dead. The author implies as much in the various readme updates
he made. It also doesn't work with rack 3 and I doubt a new release will even be made.
If it will, it highly likely won't be on rubygems.
2024-05-07 21:54:25 +02:00
Earlopain
d835d55c54
[Misc] Increase faraday open_timeout
This was previously mistyped which made it fall back to the default of 60 seconds.
Apparently 5 is not enough since there are a few errors on prod for this
2024-05-06 19:14:34 +02:00
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