Skip to content

[CASE-4447] Release 2.1.2 and fix the failing CI checks - #84

Merged
aitorlb merged 3 commits into
masterfrom
release-v2-1-2
Oct 27, 2026
Merged

aitorlb merged 3 commits into
masterfrom
release-v2-1-2

Conversation

@aitorlb

@aitorlb aitorlb commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Ticket: CASE-4447

Draft. Releases 2.1.2 with #82 and #83, and makes master's CI green first: both failing jobs fail on master too, independently of those two PRs.

Problem

master fails two CI jobs:

  • rubocop: three offenses already on master. database_validations.gemspec:12 (Layout/ExtraSpacing, Layout/SpaceAroundOperators) and the rubocop:disable comment in spec/validations/db_belongs_to_spec.rb (Lint/CopDirectiveSyntax, a trailing : after the cop name).

  • test (4.0, railsmaster): 62 failures, all in spec/validations/validates_db_uniqueness_of_spec.rb (has (almost) the same errors and does not break transaction: 22 on PostgreSQL, 18 on MySQL, 22 on SQLite), every one of them the same difference. Rails main (8.2.0.alpha) now adds the conflicting record's id to the uniqueness error details (rails/rails@03a3ed8397, "Include record ID in error when uniqueness validation fails"):

    expected {field: [{error: :taken, existing_id: 1, value: "persisted"}]} to include {field: [{error: :taken, value: "persisted"}]}
    

Fix

One behaviour to know about on Rails 8.2: a uniqueness error the gem adds on save has no existing_id, while Rails' own validator's has. This PR does not change that.

Tests

  • RuboCop 1.92.1 with rubocop-rspec 3.10.2 (CI's versions): no offenses.
  • PostgreSQL on Active Record 8.1.3: 192 examples, 0 failures.
  • PostgreSQL on Rails main (83ddc9f, 8.2.0.alpha): validates_db_uniqueness_of_spec.rb has 22 failures with master's spec and 0 with this one; the PostgreSQL examples under spec/validations and spec/adapters pass (192).

Not run

MySQL and SQLite: no MySQL server here and no sqlite3 in this environment's bundle. CI covers them; their failures in the railsmaster job are the same existing_id difference, and the fix is in the adapter-independent shared example.

Reviewed by a separate agent before opening; its two wording points (the spec comment, the CHANGELOG entry) are applied.

After merging, the release itself (tag v2.1.2 on the merged master commit, as for v2.1.0 and v2.1.1, and the gem push) is for a maintainer. career-services-backend then bumps to 2.1.2 for toptal/career-services-backend#2195.

🤖 Generated with Claude Code

…arison

Rails main (8.2.0.alpha, rails/rails@03a3ed8397) adds the conflicting record's id to the uniqueness error details. On save the error comes from the database, which does not report the id, so the comparison with Rails' own validator failed in the railsmaster job (62 examples).
@aitorlb aitorlb self-assigned this Oct 27, 2026
@aitorlb
aitorlb marked this pull request as ready for review October 27, 2026 10:03
@aitorlb
aitorlb merged commit cfa863b into master Oct 27, 2026
5 checks passed
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.

2 participants