Repository navigation
fix(environments): service-secrets accepts a module-qualified service - #1268
Merged
antoinetoussaint-byte merged 1 commit intoNov 2, 2026
Merged
Conversation
service-secrets was the one service-scoped block that took only a bare service name: the validator admits the qualified form for service-identity, service-mesh, service-config and build-images, and RemoteRef looked its mapping up by scope.Service alone. A bare name cannot name a service whose name several modules declare, and eleven modules of platform-obin each ship a "store", so those stores could not be named at all: environment "blue" service-secrets references unknown service "tracing/store" Without an explicit reference every store POSTGRES_USER falls through to the dev plaintext its module ships in its own local profile, which every hosted cell reads as the last link of its profile chain, and service-postgres refuses a value where it requires a typed Secret reference — so no hosted cell of that composition can be rendered. MappingFor resolves the qualified entry first and the bare one after, and every call site uses it: RemoteRef and both configuration-projection readers. The SecretScope doc already said the module is what keeps two modules stores apart. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
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.
service-secretsis the one service-scoped block that accepts only a bare service name. The validator admits the module-qualified form forservice-identity,service-mesh,service-configandbuild-images(pkg/environments/workspace.go:289), andRemoteReflooks the mapping up byscope.Servicealone (environment.go:1246) — even thoughSecretScopedocuments the module as the thing that keeps two modules stores apart.A bare name cannot name a service whose name several modules declare. Eleven modules of platform-obin each ship a
store, so those stores cannot be named inservice-secretsat all:That matters because without an explicit reference, every store POSTGRES_USER falls through to the dev plaintext its own module ships (
.../services/store/configurations/local/postgres.secret.env), which every hosted cell reads as the last link of itsconfiguration-profileschain, andservice-postgresrefuses a value where it requires a typed Secret reference for all four primitives (builder.go:937-953):So today no hosted cell of that composition can be rendered at all. (The same render on 0.1.219 projected those keys as
secretKeyRefs; the committed blue tree still shows them.)Change
EnvironmentServiceSecrets.MappingFor(module, service): the qualified entry wins, the bare entry stays for a name only one module declares — which is how every environment written before this states its services.RemoteRefand bothconfiguration_projection.goreaders use it, so validation, render and the projection check agree.service-secretsas it already does for the other four blocks.Tests
pkg/environments/environment_remote_ref_qualified_test.go: two modulesstoreresolve to different remote entries; a module with no entry still falls to the environment template with its own module substituted; a bare entry keeps working.go build ./...,go vet,go test ./pkg/environments/ ./pkg/gitops/all pass (gitops 104s).🤖 Generated with Claude Code