Commit Graph

1313 Commits

Author SHA1 Message Date
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
Earlopain
7adac7b250
[Gems] Bump rubocop/regenerate todo
987 files inspected, 6509 offenses detected, 6224 offenses autocorrectable
2023-08-01 19:32:24 +02:00
Donovan Daniels
55998374f7
[Discord] Add daily janitor reports (#531)
* Add daily janitor reports

* More specific config name, improve formatting

---------

Co-authored-by: Earlopain <earlopain@protonmail.com>
2023-06-26 21:10:28 +02:00
Earlopain
6841fe3b7e
[Cleanup] Remove dead code around post query counting 2023-05-19 20:43:59 +02:00
Earlopain
fc066a3724
[Takedowns] Move links to wiki page instead of config 2023-05-18 21:40:16 +02:00
Earlopain
83692fc595
[Admin] Add a page to remove dnp tags from artists 2023-05-10 20:10:25 +02:00
Earlopain
7ed3047621
[IQDB] Expose the similarity cutoff in the UI 2023-05-07 14:48:58 +02:00
Earlopain
e87d617c6f
[IQDB] Switch to new implementation 2023-04-24 14:46:26 +02:00
Earlopain
01b5f7dd14
[IQDB] Add integration for the new iqdb server
Use param v2=1 to use it, for now
2023-04-17 22:36:29 +02:00
Earlopain
7bb412c608
[Prod] Configure sidekiq through env variables 2023-04-15 21:07:52 +02:00
Earlopain
eb8e402152
[Gems] Update to sidekiq 7
Moves the redis handling into the cache class because of a naming
conflict with redis-client which is now being pulled in by sidekiq
2023-04-15 20:43:37 +02:00
Earlopain
9a97e02b20
[Tags] Import the external autocomplete service
This has been used in production for a while already, and now I
bothered to put it up here
2023-04-06 19:03:51 +02:00
Earlopain
63db033dc2
[Artists] Remove PATCH endpoint for artist urls
Closes #497
2023-04-05 18:24:00 +02:00
Earlopain
88a8f68de4
[Prod] Load dotenv for unicorn
docker does this locally but prod doesn't have this luxury
2023-04-04 12:59:43 +02:00
Earlopain
ecb4242f23
[Prod] Load unicorn config through env variables 2023-04-04 12:04:17 +02:00
Earlopain
e7b0cfbd76
[Posts] Reword edit deletion reason 2023-04-02 23:15:51 +02:00
Earlopain
36712c7872
[Users] Don't allow mods to use restricted tag categories
Also prevent them locking tags
2023-03-29 18:18:40 +02:00
Earlopain
2992ac2907
[Cleanup] Remove unused styling 2023-03-18 14:26:04 +01:00
Earlopain
7304559c52
[DB] Make the port configurable 2023-03-14 00:27:43 +01:00
Earlopain
54247d26ba
[ExceptionLog] Move git code into module 2023-03-10 22:15:10 +01:00
Earlopain
86a6e94390
[Docker] Update unicorn config for development 2023-03-10 17:27:00 +01:00
Earlopain
257e717e56
[README] Document windows executable bit issues
This also adds/removes +x on a few files which should/shouldn't have it.
2023-03-04 14:20:39 +01:00
Earlopain
6776704560
[DB] Upgrade to postgres 15
Execute the following commands, before pulling:
docker-compose up -d
docker-compose exec postgres pg_dump danbooru2 -U danbooru > backup.sql
docker-compose down
docker volume rm e621ng_db_data

Execute the following commands, after pulling:
docker-compose up -d
docker-compose exec -T postgres psql -d e621_development -U e621 < backup.sql

This also changes the name of the database and role.
Now seems like a nice opportunity to do so.
2023-03-01 20:31:49 +01:00
Earlopain
acbe23981b
[DB] Only evaluate prod config on prod
Fixup for b43f0cbbb0
2023-02-28 15:48:42 +01:00
Earlopain
b43f0cbbb0
[DB] Loudly fail on prod when DB env variables aren't set 2023-02-28 15:38:34 +01:00
Earlopain
7fdb7368db
[CI] Upload log after test run
Should make it easier to understand why random failures are happening.
Remove the manual logging in the application controller. Just look in your logs instead.

This also reduces the log level for tests.
Log files are now 700KB instead of 28MB per run.
2023-02-26 15:53:26 +01:00
Earlopain
a98483f61b
[Posts] Use the new tag_string index in the PostQueryBuilder
This is only used as a subselect, which means that there is no need to order.
The source metatag uses a non-existant function, remove it.
No need to check for deleted posts, it's desired to show deleted thumbnails
on the post flag index for example.
2023-02-25 18:40:41 +01:00
Earlopain
09be4cded9
[CI] Commit database.yml
Makes the test setup easier.
Also eases prod deploys with the two separate db pool sizes.
2023-02-25 14:41:07 +01:00
Earlopain
eaf125ef25
[Cleanup] Remove FalseClass monkeypatch 2023-02-22 19:37:13 +01:00
Earlopain
ab4366130f
[Cleanup] Remove unused config files 2023-02-22 19:37:13 +01:00
Earlopain
c314c0f33f
Merge pull request #473 from faucetlol2/exclusion
Add warning tags to artist exclusions
2023-02-19 20:10:31 +01:00
faucet
125cdd060a Add warning tags to artist exclusions 2023-02-15 03:49:01 +00:00
Earlopain
6f797f5e24
[Cleanup] Remove config.twitter_site
It's not set
2023-02-11 17:36:33 +01:00
Earlopain
a221e1cfa5
[Config] Add defaults for discord integration 2023-02-11 17:34:10 +01:00
Earlopain
f956349592
[PostFlags] Remove 48 hour reason
Discussed internally. The only real use case of this is artists wanting
their own art removed, and we already have takedowns for that.
2023-01-26 21:46:20 +01:00
Earlopain
8b28393596
[Misc] Move to org 2023-01-23 20:43:56 +01:00
Earlopain
19d8d9006b
[Posts] Fix spelling for predefined deletion reason 2023-01-12 12:53:59 +01:00
Earlopain
f6b53dd0d3
Merge branch 'moderator-role' 2023-01-11 17:05:37 +01:00
Earlopain
af13018639
[Cleanup] Remove tag "Mass Update"
Make a BUR instead.
2022-12-27 22:02:42 +01:00
Earlopain
03d575cbdb
[BURs] Remove "Alias & Implication Import"
This doesn't create a bur to look at after. Just make a bur and skip
forum creation if that's what you want.
2022-12-26 20:05:08 +01:00
Earlopain
de726f46de
[Pools] Remove import functionality 2022-12-24 12:48:17 +01:00
Earlopain
b6f006a353
[Cleanup] Remove forum topic merging 2022-12-23 16:58:32 +01:00
Earlopain
60ebe9f467
[JS] Unvendor jQuery and update to latest version 2022-12-22 15:11:05 +01:00
Earlopain
f744463d29
[Config] Decouple default blacklist from user customization 2022-12-22 12:44:07 +01:00
Earlopain
1671c3bbc6
[Misc] Disable metrics by default 2022-12-17 19:24:15 +01:00
Earlopain
e262f06a93
[Cleanup] Remove NoteSanizier
Notes are formatted using dtext only. Even though the existance of this
class suggests that some html elements are allowed, it doesn't actually do anything.
Link relativization also didn't work, same with dtext colors.
2022-12-17 17:00:27 +01:00
Earlopain
34bcb27482
[Rails] load_defaults 7.0
Also see #439

I was confused about wrap_parameters_by_default. It's actually not relevant
for us since every controller params are wrapped in params.require(:model),
which means that wrapping is forced through that.
wrap_parameters.rb was setting the new default through other  means already
though, so even if it's required somewhere there are no functional differences.
2022-12-09 19:07:08 +01:00
Earlopain
f238dca8cb
[Cleanup] Remove staging environment 2022-12-09 18:55:58 +01:00
Earlopain
934c8e3b87
[Docker] Run daily maintenance
Remove whenever, it's not used in prod. Prod uses systemd timers.
This executes the daily task on container startup. My PC isn't going to
run when this would execute 99% of the time.
2022-12-09 18:16:53 +01:00
Earlopain
731fc5a42f
[Users] Style usernames by default
This only takes effect when logged out and for newly created accounts.
2022-11-27 17:44:03 +01:00
Zwagoth
debb6fe993
Merge pull request #439 from zwagoth/rails-7
Rails 7
2022-11-24 17:13:58 -05:00
Earlopain
cd837d2eb8
[Misc] Update config to more closely resemble prod 2022-11-09 17:32:32 +01:00
Earlopain
e198c77b93
[Posts] Enable reloading of elastic paginator for dev
to_prepare is run on every code reload in dev, and once on startup for prod
2022-10-23 19:58:41 +02:00
Earlopain
dd3fb80b8c
Merge remote-tracking branch 'origin/master' into rails-7 2022-10-23 19:35:57 +02:00
Earlopain
b5fbc1e2eb
[Home] Add dynamic mascots 2022-10-15 21:40:40 +02:00
Earlopain
d473ea5097
[Files] Allow passing custom options to validator
Move the config values around so that the error message stays the same order
2022-10-15 16:30:33 +02:00
Earlopain
a36455d05e
[Posts] Move the ai deletion reason to a different category 2022-10-14 21:35:10 +02:00
Earlopain
9e1c7c7e27
[Posts] Add some more predefined deletion reasons 2022-10-13 20:44:53 +02:00
Earlopain
2579442184
[Rails] Fix deprecations and use new framework defaults
* to_s(:format) is deprecated, use to_fs(:format)
* ActiveRecord::Associations::Preloader is gone
* Don't use CurrentUser in config, it's not autoloaded anymore
* Defer elastic initialization to after the module is loaded
2022-10-10 13:26:12 +02:00
Earlopain
fbc06182cc
[Rails] Update to 7 and run app:update 2022-10-10 13:22:35 +02:00
Earlopain
ad4da53808
[Routes] Add redirect for old takedown links 2022-09-27 19:30:05 +02:00
Earlopain
5c755ddefc
[Replacements] Mark certain tags for approval 2022-09-25 13:05:33 +02:00
Kira
344dd032be [Internal] Add in house visitor metrics support. 2022-09-20 11:11:03 -07:00
Earlopain
eb5d001b55
[Posts] Remove the modqueue
Truly the end of an era. This page was trash and nobody was using it.
This will make it easier to make changes to the approval flow people actually use.
2022-09-13 16:14:00 +02:00
Earlopain
b78d55fdd3
[Posts] Add new flag reason for pending posts 2022-08-20 18:19:08 +02:00
Earlopain
c8401ab6b1
[Posts] Fixes wrong redirect for old popular page
Also fix it being marked as "More" in the nav links
2022-08-20 13:49:25 +02:00
Earlopain
8c842fef7e
[Posts] Move popular posts route to /popular 2022-08-06 11:07:25 +02:00
Earlopain
7531fc9894
[Cleanup] Remove an assortment of unused code 2022-07-11 20:17:24 +02:00