Skip to content

fix(config): preserve unresolved env vars during mixed substitution#18627

Closed
WyRainBow wants to merge 1 commit intoinfluxdata:masterfrom
WyRainBow:codex/telegraf-18553-env-subst
Closed

fix(config): preserve unresolved env vars during mixed substitution#18627
WyRainBow wants to merge 1 commit intoinfluxdata:masterfrom
WyRainBow:codex/telegraf-18553-env-subst

Conversation

@WyRainBow
Copy link
Copy Markdown

Fix mixed substitution so unresolved ${VAR} is preserved when defaults appear earlier.

@telegraf-tiger
Copy link
Copy Markdown
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@telegraf-tiger
Copy link
Copy Markdown
Contributor

@WyRainBow WyRainBow changed the title preserve unresolved ${VAR} during mixed env substitution fix(config): preserve unresolved env vars during mixed substitution Mar 30, 2026
@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Mar 30, 2026
@srebhan
Copy link
Copy Markdown
Member

srebhan commented Mar 30, 2026

@WyRainBow please restore the PR description template, especially the AI section and the structure! This is required so we can review this PR. Furthermore, it allows us automatically react on things, e.g. close related issues automatically with merging the PR...

Besides of the above, I believe this issue should be fixed upstream (see compose-spec/compose-go#856), shouldn't it?

@srebhan srebhan self-assigned this Mar 30, 2026
Copy link
Copy Markdown
Author

@srebhan Sorry, I missed the upstream issue.

I’ll update this PR to restore the full description template (including the AI section and structure) as soon as possible.

I’m also investigating whether master already supports this behavior; if this is a library gap in compose-go, I’ll follow up upstream and keep this PR aligned.

Thanks a lot for the guidance.

@WyRainBow
Copy link
Copy Markdown
Author

Thanks for the review and guidance.

I traced this further and confirmed the root cause is in compose-go option propagation during nested substitution.

I opened an upstream fix PR here: compose-spec/compose-go#861

Given that, I’m closing this Telegraf workaround PR in favor of the upstream fix path. Once it is merged and released, I can follow up with a dependency bump in Telegraf if needed.

@WyRainBow WyRainBow closed this Apr 6, 2026
@WyRainBow WyRainBow deleted the codex/telegraf-18553-env-subst branch April 6, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix pr to fix corresponding bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants