refactor: inject Topo-generated env vars into process environment once at start-up - #418
Merged
Conversation
Signed-off-by: awphi <26072111+awphi@users.noreply.github.com>
Signed-off-by: awphi <26072111+awphi@users.noreply.github.com>
awphi
marked this pull request as draft
August 20, 2026 10:50
awphi
marked this pull request as ready for review
August 20, 2026 12:04
muchzill4
reviewed
Aug 20, 2026
muchzill4
left a comment
Contributor
There was a problem hiding this comment.
I’m still split between this being horrible and or the best thing ever. On one hand we have global env that gets propagated as such to compose, which is a superset of what this does. On the other, it's implicit arguments between layers and would not work if topo was a web service (it is not!).
I think it is the right call (for now at least!). Let’s see if we find this foot-gunny.
Signed-off-by: awphi <26072111+awphi@users.noreply.github.com>
muchzill4
approved these changes
Aug 20, 2026
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.
Background
#413 introduced compose-style interpolation in
deployment_success_message. Originally this was achived by creating env vars in the CLI and injecting them into alldocker composesubprocesses andcompose-gocalls. We downscoped this to only inject at call sites where it was needed i.e.post_deploy.go.This has had the unfortunate consequence of causing
docker composeandcompose-gocalls to raise a bunch of warnings when yourx-topoblock contains one of these env vars without a fallback value e.g.Changes
--targetflag or env var for the entire process. This means the injected env vars are passed to callcompose-gocalls (that useWithOsEnv) and subprocess invocations.Checklist