Skip to content

ci: pin json below 3 for Rails 6.0 through 8.0 appraisals - #136

Closed
smudge wants to merge 1 commit into
mainfrom
smudge/pin-json-below-3
Closed

smudge wants to merge 1 commit into
mainfrom
smudge/pin-json-below-3

Conversation

@smudge

@smudge smudge commented Oct 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Pins json < 3 in the Rails 6.0, 6.1, 7.0, 7.1 and 8.0 appraisals and regenerates their gemfiles.
  • Test-infra only. No change to the gem's runtime dependencies or behavior.

Why

gemfiles/*.lock is gitignored, so CI resolves fresh on every run. json 3.0 (3.0.2 at the time of writing) removed the long-deprecated quirks_mode keyword, but ActiveSupport 8.0.5.1 and the EOL 6.0/6.1/7.0/7.1 lines still pass it to JSON.generate. Every job on those gemfiles now fails with 27 errors of the form unknown keyword: quirks_mode raised from ActiveSupport::JSON.encode on the worker's error path.

Rails 7.2.4 and 8.1 already dropped the keyword, so those appraisals pass unpinned and are left alone. The 8.0 pin can be removed once an 8.0.x patch with the fix ships; the older lines are EOL and will keep the pin.

How I verified the change

  • Confirmed from the failing CI logs that the passing 7.2 job resolved ActiveSupport 7.2.4 with json 3.0.2, while the failing 8.0 job resolved ActiveSupport 8.0.5.1 with json 3.0.2.
  • Resolved the pinned Rails 8.0 gemfile locally (json 2.21.2) and ran the sqlite suite: 396 examples, 0 failures.

Risk / rollback

Low. Only affects which json version the test matrix installs. Revert the commit to undo.

🤖 Generated with Claude Code

json 3.0 removed the `quirks_mode` keyword, but ActiveSupport 8.0.5.1 and
the EOL 6.0/6.1/7.0/7.1 lines still pass it to `JSON.generate`, so every
worker error path raised `unknown keyword: quirks_mode` in CI. Rails 7.2.4
and 8.1 no longer pass the keyword and need no pin.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@smudge
smudge requested review from effron, rzane and samandmoore and a balanced review from Copilot October 7, 2026 20:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The constraints are consistent across appraisal definitions and generated Gemfiles, limited to test dependencies, and have no identified blocking issues.

0 open findings

What changed in this PR

Constrains test dependencies to avoid JSON encoding failures in affected Rails versions, without changing runtime dependencies.

Changes:

  • Adds json < 3 to Rails 6.0, 6.1, 7.0, 7.1, and 8.0 appraisals.
  • Updates matching generated Gemfiles; leaves Rails 7.2 and 8.1 unchanged.
File Description
gemfiles/​rails_8_0.gemfile Adds Rails 8.0 JSON constraint.
gemfiles/​rails_7_1.gemfile Adds Rails 7.1 JSON constraint.
gemfiles/​rails_7_0.gemfile Adds Rails 7.0 JSON constraint.
gemfiles/​rails_6_1.gemfile Adds Rails 6.1 JSON constraint.
gemfiles/​rails_6_0.gemfile Adds Rails 6.0 JSON constraint.
Appraisals Defines matching constraints for regeneration.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@smudge smudge closed this Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants