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.
Add
envsupport to dependencies configuration and upgrade microsoft/apm to v0.8.2 #21687New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add
envsupport to dependencies configuration and upgrade microsoft/apm to v0.8.2 #21687Changes from all commits
608998ef8d55c14cecc1bc8b94cb950cfd1fb0822cFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YAML values are written here without quoting. If a user passes a value containing YAML special characters (e.g., a colon followed by a space, a
#, or curly braces), the generated workflow file could be invalid. Consider wrapping the value in quotes or using a YAML-safe formatter:fmt.Sprintf(" %s: %q", k, apmDeps.Env[k])or at least single-quoting values that contain special chars.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good defensive check — skipping
GITHUB_TOKENwhen a GitHub App token is already being injected prevents duplicate env key conflicts. Thesort.Strings(keys)call ensures deterministic output ordering across Go map iterations. 👍There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
sort.Strings(keys)ensures deterministic output ordering for env vars — great practice for generated YAML to keep diffs clean and avoid spurious recompilations.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good addition of the
Envfield toAPMDependenciesInfo. Usingmap[string]stringis appropriate here since env vars are key-value pairs. The comment clearly explains its purpose.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, clean addition. The sorted-key determinism in
GenerateAPMPackStepensures reproducible compiled output, which is great for lock file stability.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed! Deterministic ordering is essential for stable diffs in generated YAML. Great to see this covered by a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new
Envfield is well-placed in the struct. Documenting it as "Optional environment variables to set on the APM pack step" makes intent clear. Consistent with the existing comment style in the struct.