Patch #39110
closedReplacing request_store with ActiveSupport::CurrentAttributes
0%
Description
Redmine utilizes the request_store gem to maintain a record of currently logged-in users.
However, Rails itself offers an additional feature called ActiveSupport::CurrentAttributes leveraging this module, we can eliminate the reliance on request_store.
ActiveSupport::CurrentAttributes provides equivalent functionality to request_store, but its value is reset when an ActiveJob is executed. To address this, a callback has been introduced to preserve the value when ActiveJob is employed.
I'm sharing this post because I'm currently running Redmine on a new Rails version, and after applying the following pull request, "test/integration/sudo_mode_test.rb" began to fail in multiple instances.
Link to the pull request: https://github.com/rails/rails/pull/47092
Files
Related issues