Skip to content

fix: remove unique from indexes that shouldn't be unique - #394

Closed
motizuki wants to merge 2 commits into
mainfrom
fix/unique-indexes
Closed

motizuki wants to merge 2 commits into
mainfrom
fix/unique-indexes

Conversation

@motizuki

@motizuki motizuki commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Removes unique: true from the two compound indexes on fragments.source_id + status (and index_updated) in Storable. Those combinations are not unique across records, so the unique constraint is wrong and can cause duplicate-key failures.

Release as v4.3.2 on Rails 7.2.

Deployment note: this only changes index declarations. Per the pvm-api runbook (dnz-kubernetes docs/pvm-api.md, "Never run rake db:mongoid:create_indexes"), do not create indexes via rake; existing unique indexes must be handled manually.

CI: also bumps .ruby-version 3.4.4 -> 3.4.13 because ubuntu-latest (26.04) runners no longer provide 3.4.4.

mrGrazy and others added 2 commits November 20, 2026 10:17
- ubuntu-latest (26.04) runners no longer provide 3.4.4, so setup-ruby fails every job
@github-actions

Copy link
Copy Markdown

Code quality score

Lovely, the code quality is unchanged for this PR 😊

Ruby file count Similarity score (flay) ABC complexity (flog) Code smells (reek) TOTALS
base 146 3.34 7.92 21.6 32.86
this branch 146 3.34 7.92 21.6 32.86
difference 0 0.0 0.0 0.0 0.0

@motizuki

Copy link
Copy Markdown
Contributor Author

Note on the red bundle-audit check: it flags advisories in this repo's own Gemfile.lock (Rails 7.2.3.2, rack 2.2.23, rails-html-sanitizer 1.7.1, and others). That lockfile is used only by this repo's CI. Host apps resolve gems from their own lockfiles. The Rails 8.1 upgrade PR that follows this one clears these advisories. This PR changes only the index definitions and .ruby-version.

@motizuki motizuki closed this Nov 19, 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.

2 participants