Warning was:
> DEPRECATION WARNING: `to_time` will always preserve the full timezone
> rather than offset of the receiver in Rails 8.1. To opt in to the new
> behavior, set `config.active_support.to_time_preserves_timezone =
> :zone`.
Actually we were already using `:zone`, but it was set in a file
required late in the loading process. Moving it to
`config/application.rb` fixes the deprecation warning.
Works around an issue where asset resolution fails in test environment.
Sprockets::Rails::Helper::AssetNotFound:
The asset "loading_indicator.svg" is not present in the asset pipeline.
See: ViewComponent/view_component#2433
https://community.openproject.org/work_packages/54061
- Solution
Move the config up in application.rb to be called early enough.
The config option has been renamed due to its more genela nature than being in`config.action_controller.*` scope.
- How to test?
1. Set OPENPROJECT_RAILS__RELATIVE__URL__ROOT=/something
2. Open up rails console before/after changes and call `Rails.application.routes.url_helpers.root_path`.
3. Prefix should not be there before and should be there after.
Check discussion in https://github.com/rails/rails/issues/42243 for more
details if you'd like.
- Do not use string literals for job class names. Use `class.name` instead.
- Rename `ApplicationJob#good_job_scheduled_at` to `ApplicationJob#job_scheduled_at` to be backend agnostic.
- update queries in bin/check-worker-liveness to use good_jobs table
- Set good_job config options through appropriate OpenProject::Configuration
- Remove delayed_jobs table.
- Update health_check docs.
Instead of opting into lograge, enable at all times for all environments
and instead show Rails view logs in development additionally.
This makes debugging the logs easier. Also, adds request_id to all logs even for grape
- Add .add_all method. The purpose is to extract this logic from
config/application.rb and have it in proper place and tested.
- Refactor .all method to initialize @all with {} if it is nil.
It simlifies the usage significantly and makes code more stable.
It set Rails.application.config.active_record.legacy_connection_handling to false, as would Rails 6.1 default do. This removes a deprecation warning showing up each time tests are run, and enables granular connection swapping (which we do not use currently, but this may change in the future).