Skip to content

admin: persist duckling_name through the warehouse upsert#888

Merged
benben merged 1 commit into
mainfrom
ben/warehouse-upsert-duckling-name
Jul 3, 2026
Merged

admin: persist duckling_name through the warehouse upsert#888
benben merged 1 commit into
mainfrom
ben/warehouse-upsert-duckling-name

Conversation

@benben

@benben benben commented Jul 3, 2026

Copy link
Copy Markdown
Member

Editing duckling_name in the admin UI silently reverted: the value passed strict-decode and the non-empty guard, merged onto the locked row — and then PUT /orgs/:id/warehouse's ON CONFLICT … DO UPDATE dropped it, because the fixed assignment-column list (managedWarehouseUpsertColumns()) never gained duckling_name in #858. The handler returns the reloaded row, so the UI faithfully showed the unchanged stored value.

Changes

  • Fix: add duckling_name to the upsert assignment-column list (both UpsertManagedWarehouse and MutateManagedWarehouse share it).
  • Regression test: the Postgres upsert test now changes DucklingName and asserts it persists — this fails without the fix (the in-memory fake can't catch it; only the real ON CONFLICT path does).
  • Audit accuracy: the warehouse editor sent all three pinning fields on every save, so the audit detail (changed: <body keys>) always named image, ducklake_version, duckling_name even 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.
  • The Postgres-backed test runs in CI (needs the docker container).

🤖 Generated with Claude Code

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.
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Test Impact Plan

Deterministic summary of how this PR changes tests, CI runners, and coverage-risk signals.

Summary

Area Added Changed Deleted
Test files 0 1 0
E2E/journey files 0 0 0
Workflow files 0 0 0

Signals

  • Test cases: +0 / -0
  • Assertions: +1 / -0
  • Skips or known failures added: 0
  • Workflow continue-on-error added: 0
  • Workflow path filters added: 0
  • Test commands removed from justfile: 0
  • E2E/journey retry lines added: 0

Coverage risk: neutral or increased

No coverage-reduction warnings detected.

@benben benben merged commit 23c6458 into main Jul 3, 2026
26 checks passed
@benben benben deleted the ben/warehouse-upsert-duckling-name branch July 3, 2026 10:16
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.

1 participant