PREQ-6823 Guard Develocity vault JSON parsing in config-gradle - #316
Closed
marta-sancheztorres-sonarsource wants to merge 1 commit into
Closed
PREQ-6823 Guard Develocity vault JSON parsing in config-gradle#316marta-sancheztorres-sonarsource wants to merge 1 commit into
marta-sancheztorres-sonarsource wants to merge 1 commit into
Conversation
Code Review ✅ ApprovedAdds a conditional check to the Develocity access key expression to prevent OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
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
Guard
config-gradle'sdevelocity-access-keyexpression so GitHub Actions does not callfromJSON(...)when the Vault output is empty during post-job evaluation.Context
sonarcloud-analyzers-shared-servicesPR 314 (SC-51120) is migrating the repository to uv and currently usesbuild-gradle@v1with Develocity enabled in several jobs.The current
config-gradleaction evaluates:During
Post job cleanup,steps.secrets.outputs.vaultcan be empty/unavailable, which causes:Error reading JToken from JsonReaderThis change makes the expression consistent with the already-safe
DEVELOCITY_TOKENenvironment export earlier in the same action.Change
Impact
This is the shared-action fix needed to unblock completion of
SC-51120without keeping a repo-specific workaround insonarcloud-analyzers-shared-services.Validation
git diff --check./run_shell_tests.shcould not be run locally becauseshellspecis not installed in the current environment