fix(create-github-app-token): remove runtime dependency on jq#1948
Open
tolzhabayev wants to merge 1 commit into
Open
fix(create-github-app-token): remove runtime dependency on jq#1948tolzhabayev wants to merge 1 commit into
tolzhabayev wants to merge 1 commit into
Conversation
The auth_vault.sh and create_token.sh scripts shelled out to jq to parse Vault responses. This broke any caller that runs the action inside a container without jq installed (e.g. publish-docs in grafana/plugin-ci-workflows which uses grafana/docs-base:latest). Replace the two jq invocations with narrow sed extractions. Vault's response shape is stable and the values we read (Vault client token, GitHub installation token) never contain quotes. Also fail-closed if parsing produces an empty string instead of silently writing it to GITHUB_OUTPUT.
Merged
1 task
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.
Summary
The composite action shells out to
jqto parse Vault responses, which breaks any caller running it inside a container withoutjq. Replaces the twojqcalls with narrowsedextractions.Failure example
publish-docsingrafana/business-calendar(and any other plugin usinggrafana/plugin-ci-workflows'scd.ymlsince v8.0.0) runs insidegrafana/docs-base:latest, which is alpine + node and has nojq:Repro:
Test plan
test-create-github-app-token.yamlstill passes onubuntu-latestfor bothdevandopsvault instancespublish-docssucceeds end-to-end on a plugin repo once the new tag is consumed