Repository navigation
Compose env references: each service keeps its own - #308
Merged
Merged
Conversation
env_reference_aliases collected KEY -> VAR from the whole stacker.yml into
one map and parameterize applied it to every service, so when two services
declare one env name with different references, the last one won
everywhere. Deployment #1363 (local-ai-packaged): Supabase's db got
POSTGRES_PASSWORD: ${LANGFUSE_POSTGRES_PASSWORD}, initialised its roles with
the Langfuse password, and auth/rest/storage restarted forever.
Aliases are now per service ("service/KEY", from app.environment and
services[].environment), plus by KEY alone only where every declaration of
KEY references the same variable (the old behaviour for unambiguous names;
the top-level env: counts there). parameterize looks up the compose
service's own reference first.
Tests first: one_env_name_keeps_each_services_own_reference failed, then
passed; the existing alias tests pass unchanged. cargo test --lib: 2279.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
`env_reference_aliases` collected `KEY -> VAR` from the whole stacker.yml into one map, and `parameterize_compose_env_vars_with_aliases` applied that map to every service. When two services declare the same env name with different references, the last one won everywhere.
Deployment #1363, local-ai-packaged: Supabase's `db` got `POSTGRES_PASSWORD: ${LANGFUSE_POSTGRES_PASSWORD}`. Its roles were initialised with the Langfuse password, and auth, rest and storage restarted forever. The template works around this today by sharing one password.
Change
Tests
🤖 Generated with Claude Code