fix: parseSecretsConfig/parseInfraConfig honor imports via config.LoadFromFile#561
Closed
Copilot wants to merge 3 commits into
Closed
fix: parseSecretsConfig/parseInfraConfig honor imports via config.LoadFromFile#561Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
….LoadFromFile Agent-Logs-Url: https://github.com/GoCodeAlone/workflow/sessions/156113c0-7bf1-490b-aedc-85a00360eec7 Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix parseSecretsConfig to process imports correctly
fix: parseSecretsConfig/parseInfraConfig honor imports via config.LoadFromFile
May 6, 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.
parseSecretsConfigandparseInfraConfigused rawyaml.Unmarshal, bypassingprocessImports. Anysecrets.generate,secrets.entries, orinfra:block declared in an imported file was silently invisible towfctl infra bootstrapandwfctl infra apply.Changes
cmd/wfctl/infra_secrets.go— Replaceos.ReadFile+yaml.Unmarshalin both functions withconfig.LoadFromFile, which resolves imports before returning. Drops now-unusedosandgopkg.in/yaml.v3imports.config/config.go— AddInfrafield merge inprocessImports(parent-wins; fills from import when main has noinfra:block), consistent with howSecrets,SecretStores, andEnvironmentsare already merged.Tests —
TestParseSecretsConfig_HonorsImportsandTestParseInfraConfig_HonorsImportsincmd/wfctl;TestProcessImports_MergesInfraFromImportinconfig.Example scenario now fixed
wfctl infra bootstrap --config main.yamlpreviously skippedSTAGING_PG_PASSWORDgeneration. With this fix,parseSecretsConfigresolves imports first, so the generate entry is visible and the secret is created.