Skip to content

Persist claims on registry upsert conflict#746

Merged
blkt merged 1 commit into
mainfrom
fix/upsert-registry-claims
Apr 21, 2026
Merged

Persist claims on registry upsert conflict#746
blkt merged 1 commit into
mainfrom
fix/upsert-registry-claims

Conversation

@blkt
Copy link
Copy Markdown
Contributor

@blkt blkt commented Apr 21, 2026

The UpsertRegistry SQL query only updated updated_at on conflict, silently dropping any new claims value. This meant that editing a registry via PUT /v1/registries/{name} would appear to succeed (the timestamp advanced) but the claims column kept its original value.

Add claims = EXCLUDED.claims to the ON CONFLICT DO UPDATE SET clause and regenerate the sqlc code. A new regression test (TestUpsertRegistryUpdatesClaims) pins both the value-update and clear-to-nil paths.

The `UpsertRegistry` SQL query only updated `updated_at` on conflict,
silently dropping any new `claims` value. This meant that editing a
registry via `PUT /v1/registries/{name}` would appear to succeed (the
timestamp advanced) but the claims column kept its original value.

Add `claims = EXCLUDED.claims` to the `ON CONFLICT DO UPDATE SET`
clause and regenerate the sqlc code. A new regression test
(`TestUpsertRegistryUpdatesClaims`) pins both the value-update and
clear-to-nil paths.
@blkt blkt requested a review from rdimitrov April 21, 2026 17:32
@blkt blkt self-assigned this Apr 21, 2026
@blkt blkt enabled auto-merge (squash) April 21, 2026 17:33
@blkt blkt merged commit a9ff8d4 into main Apr 21, 2026
14 checks passed
@blkt blkt deleted the fix/upsert-registry-claims branch April 21, 2026 17:35
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.64%. Comparing base (383a84f) to head (252c2ba).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #746   +/-   ##
=======================================
  Coverage   60.64%   60.64%           
=======================================
  Files         108      108           
  Lines       10482    10482           
=======================================
  Hits         6357     6357           
  Misses       3572     3572           
  Partials      553      553           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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