You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warehouse: make duckling_name mandatory (NOT NULL) + editable in admin UI (#858)
* warehouse: make duckling_name mandatory (NOT NULL) and editable in admin UI
The duckling_name column (warehouse → Duckling CR link) was nullable and only
populated by best-effort backfill/set-on-create. Make it authoritative:
- Migration 000012: re-backfill any NULL/empty to lower(org_id), then
ALTER COLUMN duckling_name SET NOT NULL. GORM tag gains not null; migration
parity/version test bumped 11→12.
- App-level non-empty guard (NOT NULL still allows ''): provisionWarehouse
rejects an empty duckling_name on create; putManagedWarehouse rejects
blanking it on edit.
- Editable via the admin UI: duckling_name added to the warehouse PUT
allow-list and surfaced as a required field in the org warehouse editor, so
corrections flow through the audited PUT path.
* tests/seeds: set duckling_name for NOT NULL; fix v8-upgrade baseline
configstore-integration-tests was red on the new NOT NULL constraint:
- The dev/kind/tenant-isolation config-store seed SQL INSERTed warehouses
without duckling_name → not-null violation. Set it to the org_id (= the
canonical CR name) in all four seed files.
- TestConfigStoreSQLMigrationsUpgradeVersion8Schema pinned its pre-upgrade
baseline at goose v8 but only deleted versions 9-11, leaving 12 recorded
(latest read 12, want 8). Drop the NOT NULL and delete version 12 too so
the baseline is a true v8 and migration 000012 re-applies on upgrade.
- Set duckling_name in the two Postgres warehouse test fixtures for clarity.
0 commit comments