admin: persist duckling_name through the warehouse upsert#888
Merged
Conversation
PUT /orgs/:id/warehouse saves via ON CONFLICT ... DO UPDATE with a fixed assignment-column list, and duckling_name was never added to it (#858 gap) — an edit passed validation, merged onto the locked row, then the upsert silently dropped the column and the stored value never changed. - Add duckling_name to managedWarehouseUpsertColumns(). - Postgres regression test: an upsert that changes DucklingName must persist it (failed before the fix). - Warehouse editor now sends only dirty fields, so the audit detail (changed: <body keys>) names exactly what the operator touched instead of always image + ducklake_version + duckling_name; a no-op save short-circuits client-side.
Test Impact PlanDeterministic summary of how this PR changes tests, CI runners, and coverage-risk signals. Summary
Signals
Coverage risk: neutral or increased No coverage-reduction warnings detected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Editing
duckling_namein the admin UI silently reverted: the value passed strict-decode and the non-empty guard, merged onto the locked row — and thenPUT /orgs/:id/warehouse'sON CONFLICT … DO UPDATEdropped it, because the fixed assignment-column list (managedWarehouseUpsertColumns()) never gainedduckling_namein #858. The handler returns the reloaded row, so the UI faithfully showed the unchanged stored value.Changes
duckling_nameto the upsert assignment-column list (bothUpsertManagedWarehouseandMutateManagedWarehouseshare it).DucklingNameand asserts it persists — this fails without the fix (the in-memory fake can't catch it; only the real ON CONFLICT path does).changed: <body keys>) always namedimage, ducklake_version, duckling_nameeven when one field was touched. The editor now sends only dirty fields, and a no-op save short-circuits client-side.Verification
go build -tags kubernetes ./...,go vet,gofmt— clean.npm run build(tsc + vite) — clean.🤖 Generated with Claude Code