Skip to content

Switch from Rails.application.secrets to Rails.application.credentials

What does this MR do and why?

Rails.application.secrets is dropped in Rails 7.1, so we're switching to use Rails.application.credentials.

I also refactored config/initializers/01_secret_token.rb to a class and improved the testing.

Note that we're not using the encrypted config/credentials.yml.enc file.

Note that this is a pretty radical & risky change, but given a lot of the codebase relies on this, we should also detect any problem very quickly in tests.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #490914 (closed)

Edited by Rémy Coutable

Merge request reports

Loading