Skip to content

fix(deploy): a key the environment declares may-be-empty is stored empty - #1155

Merged
antoinetoussaint-byte merged 1 commit into
mainfrom
fix/may-be-empty-writes-empty
Oct 25, 2026
Merged

antoinetoussaint-byte merged 1 commit into
mainfrom
fix/may-be-empty-writes-empty

Conversation

@antoinetoussaint-byte

Copy link
Copy Markdown
Contributor

service-secrets.may-be-empty only tolerated an empty value that was already stored, and nothing in the CLI ever writes one. A declared-empty property that no file, generator or other remote key supplied was planned require. Under --allow-missing it was left absent, so the ExternalSecret that reads it never materialized its Secret. The only way through was a hand write to the store.

Found standing up obin-dev: five optional keys (datasource OAuth client secret, three Vault keys, the Sentry DSN) on a cell with no Vault and no Sentry project.

Change. In fallbackSource, a property whose every key is declared may-be-empty, and which has no configured value or generator, is planned as a new action empty. The apply writes it as "". The existing present-but-empty check then keeps it on later runs.

Reused: declaredEmpty, the existing every-key rule. An undeclared property is still required (test).

Classification: a fix at the owner (the plan).

Tests: TestBuildWritesADeclaredEmptyPropertyNothingHolds (planned empty, stored empty, kept on re-plan) and TestBuildRequiresAnAbsentPropertyNotDeclaredEmpty. go test ./pkg/deploysecrets/ ./cmd/deploy/ passes.

Verified live: obin-dev's deploy secrets --env dev planned the five keys empty and wrote platform-obin-dev-saas-accounts v3 and platform-obin-dev-saas-frontend v2.

🤖 Generated with Claude Code

service-secrets.may-be-empty only tolerated an empty value already in the
store; nothing ever wrote one. A property absent from the store that no file,
generator or other key supplies was therefore required of the operator even
when the environment had declared its correct value empty, and the only way
through was a hand write to the store. The declaration now plans it as
'empty' and the apply stores it, so the ExternalSecret reading it
materializes; a re-plan keeps it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@antoinetoussaint-byte
antoinetoussaint-byte added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit a0a448b Oct 25, 2026
14 checks passed
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