ManageIQ / manageiq

ManageIQ Open-Source Management Platform
https://manageiq.org
Apache License 2.0
1.35k stars 900 forks source link

Reset cached secrets on Rails 7.0 #23259

Closed jrafanie closed 3 weeks ago

jrafanie commented 3 weeks ago

Partial Revert of https://github.com/ManageIQ/manageiq/pull/23254

Enhanced the test to check both the app config secret_key_base and app secret_key_base as there's caches in both. These test changes make the test fail if we do not clear the cached secrets on Rails 7.0.

This seems to fix an issue with caching in both secrets and the config on rails 7.0:

Missing `secret_key_base` for 'production' environment, set this string with `bin/rails credentials:edit` (ArgumentError)
jrafanie commented 3 weeks ago

Fixed a minor typo < 7.1 instead of <= 7.1

bdunne commented 3 weeks ago

Backported to radjabov in ef52dffb1dcaba21be5a3e50b1f5459f02df602d

commit ef52dffb1dcaba21be5a3e50b1f5459f02df602d
Author: Brandon Dunne <brandondunne@hotmail.com>
Date:   Wed Nov 6 20:03:57 2024 -0500

    Merge pull request #23259 from jrafanie/properly-reset-cached-secrets

    Reset cached secrets on Rails 7.0

    (cherry picked from commit bd4b3698c4a00154bed3a07210c3192702f22baa)