Skip to content

Fail schema migration instead of swallowing errors (#923) - #934

Draft
stasimus wants to merge 3 commits into
masterfrom
fix/923-migrate-schema-swallows-errors
Draft

stasimus wants to merge 3 commits into
masterfrom
fix/923-migrate-schema-swallows-errors

Conversation

@stasimus

@stasimus stasimus commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #923. MigrateSchema used .voidError, swallowing migration errors and advancing the schema version anyway, so a transient failure permanently skipped a step. Now errors propagate and setVersion runs only on success, keeping the version truthful. Adds tests. Note: legacy schemas without a version now fail loudly on re-added columns.

@stasimus
stasimus force-pushed the fix/923-migrate-schema-swallows-errors branch from 8d0b3a8 to d684b7b Compare July 19, 2026 17:30
@coveralls

coveralls commented Jul 19, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 29823147645

Coverage increased (+1.7%) to 93.194%

Details

  • Coverage increased (+1.7%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 6039
Covered Lines: 5628
Line Coverage: 93.19%
Coverage Strength: 1.69 hits per line

💛 - Coveralls

@mr-git mr-git left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall I like this, though I'd like to make sure that we have all storages in sync and in good shape before we update to version, which contains this change (yes, I am a bit afraid).

@mr-git
mr-git force-pushed the fix/923-migrate-schema-swallows-errors branch 2 times, most recently from 1413a9d to 846cb19 Compare July 21, 2026 10:48
@mr-git
mr-git marked this pull request as draft July 21, 2026 15:03
@mr-git

mr-git commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

blocked by #944!

stasimus pushed a commit that referenced this pull request Jul 21, 2026
@stasimus
stasimus force-pushed the fix/923-migrate-schema-swallows-errors branch 3 times, most recently from 6ebee23 to f3f569b Compare July 31, 2026 21:00
@stasimus

Copy link
Copy Markdown
Contributor Author

Re-triggering required check after org policy rollout fix

@stasimus stasimus closed this Jul 31, 2026
@stasimus stasimus reopened this Jul 31, 2026
@stasimus stasimus closed this Aug 1, 2026
@stasimus stasimus reopened this Aug 1, 2026
@sonarqubecloud

sonarqubecloud Bot commented Aug 1, 2026

Copy link
Copy Markdown

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.

Schema migrations can be left permanently half-applied (MigrateSchema swallows errors)

4 participants