Repository navigation
Upgrade to Rails 8.1 and Devise 5 - #395
Merged
Merged
Conversation
- ubuntu-latest (26.04) runners no longer provide 3.4.4, so setup-ruby fails every job
- add golden request spec for record, search and forbidden JSON/XML output - raise on deprecations from engine code, warn on stderr for gem-originated ones
- match exact Rails gem names so active_model_serializers frames count as gems - treat any frame outside the engine root or under bundler paths as gem-originated - add classification spec and assert Content-Type on golden responses
- take a splat after callstack so ActiveSupport::Deprecation can call the behavior with horizon and gem name - add a spec that wires the behavior into a real deprecator and expects an engine-originated warning to raise
- replace Benchmark.ms, which Rails 8.1 no longer provides, with Process.clock_gettime in milliseconds
- rails, activerecord, activesupport: ~> 7.2.3.2 -> ~> 8.1.4 (resolved 8.1.4.1) - active_model_serializers: require >= 0.10.16 (0.10.14 -> 0.10.16); 0.10.14 mutates the options hash Rails 8.1 freezes during JSON encoding and loads the deprecated ActiveSupport::Configurable - audit-driven bumps: rack 2.2.23 -> 2.2.25, dalli 3.2.8 -> 3.2.17, mongo 2.25.0 -> 2.26.2, mongoid 9.1.0 -> 9.1.2, addressable 2.9.0 -> 2.9.2, crass 1.0.7 -> 1.0.8 - drop the brakeman ignore entry for the end-of-life rails 7.2 warning
- assert an over-limit anonymous key gets 403, application/xml and the anonymous limit message
- rails 8.1 passes keyword arguments to ConnectionPool.new, so the remaining blocker is sidekiq 7.3.0 calling TimedStack#pop with a positional timeout
…enticatable - move the token generator into SupplejackApi::User unchanged, so existing keys keep working - pin devise to ~> 5.0 and remove the unmaintained devise-token_authenticatable - add model specs for token generation and a request spec for header and param api keys
Code quality scoreLovely, the code quality is unchanged for this PR 😊
|
- move the unique-token loop out of ensure_authentication_token into generate_authentication_token to clear the reek TooManyStatements smell - annotate StatusController#handle_timeout for reek DuplicateMethodCall, since the clock is read before and after the block on purpose
- assert legacy-token requests are counted against the token's user via daily_requests - add the "wired into the Rails application deprecators" example the apps already have - update the activesupport and active_model_serializers frame strings to 8.1.4.1 and 0.10.16
motizuki
marked this pull request as ready for review
November 20, 2026 00:29
dgpangan
approved these changes
Nov 20, 2026
paul-mesnilgrente
left a comment
Contributor
There was a problem hiding this comment.
I've got 2 important comments, let's check this out next week
richardmatthewsdev
approved these changes
Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Rails 7.2 is out of security support. This moves the engine to Rails 8.1 (target 8.1.4.1) and devise 5.
This branch also contains the unique-index fix (ee2450c) and the
.ruby-versionbump to 3.4.13. It supersedes the separate v4.3.2 release plan and ships as v5.0.0 (breaking: requires Rails 8.1).What changed
~> 8.1.4.FrozenErroron Rails 8.1 because the JSON encoder options are frozen).devise-token_authenticatableis removed (it capsdevise < 5and is unmaintained). The token generator now lives inSupplejackApi::User#ensure_authentication_token, unchanged, so existing API keys keep working and stored tokens are never rewritten.Breaking changes for engine consumers
devise-token_authenticatableis removed. These are gone:reset_authentication_tokenandreset_authentication_token!ensure_authentication_token!find_for_token_authenticationDevise.token_authentication_key. A host app that still has an uncommentedconfig.token_authentication_keyin its devise initializer will fail at boot.ensure_authentication_tokenis kept, with identical behaviour.Version
v5.0.0 (constant bumped; tag after merge).
Kept as is
rack ~> 2.2.4connection_pool ~> 2.5(sidekiq 7.3 callspopwith a positional timeout)config.load_defaultsuntouchedRemaining deprecations
Gem-originated: activeresource 6.0.0 (
ActiveJobSerializer#klass should be public, becomes an error on Rails 8.2).Verification
Full suite: 1001 examples, 0 failures, 4 pending. rubocop, bundle-audit (no ignore list) and brakeman clean. reek total is back to 630.
Host apps
The api and pvm-api MRs will follow, pointing at this branch.