Commit Graph

175 Commits

Author SHA1 Message Date
edshot99
cd5c55e35e revert changes 2024-11-06 22:14:25 -06:00
edshot99
6051f187ea rubocop 2024-11-03 23:11:43 -06:00
edshot99
64105b0d4e remove Discord page and related. not going to be using discord_joiner 2024-10-28 12:49:33 -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
e4799d9f83
[Prod] Dump NewRelic
Need to look into alternatives
2024-03-23 20:52:31 +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
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
a7228612a2
[Rails] Update to 7.1
Run `app:update`, fix the one deprecation warning
2024-01-25 22:05:29 +01: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
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
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
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
54247d26ba
[ExceptionLog] Move git code into module 2023-03-10 22:15:10 +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
eaf125ef25
[Cleanup] Remove FalseClass monkeypatch 2023-02-22 19:37:13 +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
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
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
Kira
344dd032be [Internal] Add in house visitor metrics support. 2022-09-20 11:11:03 -07:00
Earlopain
7531fc9894
[Cleanup] Remove an assortment of unused code 2022-07-11 20:17:24 +02:00
Zwagoth
eb87b5d27d
Merge pull request #376 from zwagoth/db-gem-clean
Cleanup gems and database
2022-04-25 06:04:36 -04:00
Earlopain
9833561942
[Rails] Remove old framework_defaults files
The only change is `urlsafe_csrf_tokens`, which is now true.
`cookies_same_site_protection` was specified at another place,
:lax is now the default and can be removed
2022-04-13 12:02:01 +02:00
Earlopain
3de690961d
[Cleanup] Remove unused gems and tables/columns 2022-04-07 19:17:33 +02:00
Earlopain
1eff0215ac
[Layout] Fix boolean styling in simple_form 2022-03-30 16:57:51 +02:00
Earlopain
b37bb3c001
[Cleanup] Remove remaining delayed jobs code 2022-03-05 16:09:28 +01:00
Earlopain
5a88be7d2d
[Cleanup] Remove spam detection
Checked for is_gold, which doesn't work anyways
2022-03-05 16:05:53 +01:00
Earlopain
061176e095
[Setup] Ignore limits when seeding
This makes the environment config understand booleans. If something
ends with "?" it tries to interpret it as a boolean. A bunch of
existing configs where changed to reflect this change.
2021-11-14 22:16:36 +01:00
Earlopain
d8b00bf94b
[Rails] Allow easy disable of the cache_store
Setting it in the individual environment config does not work because it
was overwritten by the cache_store.rb initializer
2021-08-24 19:22:01 +02:00
Kira
33013e0a44 [Debug] Better logging of slow queries
Rails is VERY opaque about which query timed out when reviewing
backtraces for code that loads relations. Often it becomes difficult
to tell exactly which query was generated.

This interrogates the exceptions for these and pulls out the SQL
and bind params for further debugging. Automatic unwrapping of
rails template exceptions is done, as a majority of these seem
to be triggered in production by relations that are lazily loaded
through templates, or template code.

Also I cleaned up the backtrace display a little bit while I was
messing with this code. Usually it isn't relevant to see the 130
lines of rails relationship loader code. Full traces are still
saved so that in the event something happens inside a gem/framework
file it can still be easily located.
2021-04-30 10:12:10 -07:00
Kira
a7317a668a [Rails] Turn off url safe csrf until migration complete 2021-02-25 12:31:57 -08:00
Kira
76d1999ade [Rails] Upgrade to rails 6.1 + fix tests 2021-02-25 12:08:09 -08:00
Kira
048e5d7182 [Rails] Update to rails 6
Fix sidekiq initializer
2021-02-25 12:08:09 -08:00
Kira
db8d4c4773 Normalize EOL style + newline at end of files. 2020-10-24 05:50:32 -07:00
Kira
aff0f5f2da [Gems] Update gems + fix cache deprecation 2020-10-01 08:12:04 -07:00
Kira
6fddcc7d58 [Cookies] Hopefully fix Firefox defaulting to SameSite=none 2020-07-02 17:23:16 -07:00
Kira
c379640738 [Discord] Fix discord domain after discord changed it 2020-05-08 18:45:37 -07:00
Kira
b55802d49a Add back metrika on request 2020-03-18 19:57:35 -07:00
Kira
f774a06831 Update CSP with right captcha domain 2020-03-08 18:04:26 -07:00
Kira
c2ccd647fd Fix up captcha for sign up 2020-03-08 17:43:28 -07:00
Kira
33524e19d5 Cookie update 2020-03-06 11:00:07 -08:00
Kira
293e500863 More CSP nonsense surrounding discord. 2020-03-05 15:06:48 -08:00