BUILD-11961 Use default Vault URL for Maven Artifactory secrets#328
BUILD-11961 Use default Vault URL for Maven Artifactory secrets#328hedinasr wants to merge 7 commits into
Conversation
Stop selecting vault.dev.sonar.build from repox-url so Artifactory reader/deployer tokens come from the vault-action-wrapper default (vault.sonar.build), which is required for Edge Node + SaaS validation.
Poll a protected storage API until SaaS-minted tokens are accepted by the edge node, skipping the wait for SaaS jfrog.io endpoints.
0a73346 to
1dab974
Compare
Keep a simple delay on edge Repox instead of curling a protected API.
1dab974 to
82a3631
Compare
Keep dependency downloads on repox-url (Maven settings mirror) while publishing via ARTIFACTORY_URL/contextUrl to repox-deploy-url (SaaS by default), so deployer tokens do not need edge Access Federation.
Give Access Federation a short delay before Maven hits the edge node with SaaS-minted reader tokens; skip the wait for SaaS Repox.
Use default Vault for Artifactory tokens, wait 10s for edge federation, and split build-npm deploy onto repox-deploy-url (SaaS by default).
|
Replace the fixed 10s sleep with a shared retry loop against a protected storage API so builds proceed as soon as federation syncs.
| http_code="$(curl -sS -o /dev/null -w '%{http_code}' \ | ||
| -u "${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}" \ | ||
| "$check_url" || echo "000")" |
There was a problem hiding this comment.
💡 Quality: curl retry lacks connect/max timeout
The polling curl has no --connect-timeout/--max-time, so a hung TCP connection to the edge node would stall an iteration indefinitely rather than counting as a failed attempt, defeating the 5-minute bound. Add --connect-timeout 5 --max-time 15 to keep each attempt time-boxed.
Bound each curl attempt so a stalled connection can't hang the loop.:
http_code="$(curl -sS --connect-timeout 5 --max-time 15 -o /dev/null -w '%{http_code}' \
-u "${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}" \
"$check_url" || echo "000")"
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
| http_code="$(curl -sS -o /dev/null -w '%{http_code}' \ | ||
| -u "${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}" \ | ||
| "$check_url" || echo "000")" |
There was a problem hiding this comment.
💡 Quality: curl failure appends duplicate http_code output
On a connection failure curl still emits its -w '%{http_code}' value (000) to stdout, and then || echo "000" appends another, so http_code becomes e.g. 000000, producing confusing log lines like HTTP 000000. Logic still works, but drop the trailing || echo "000" (or capture into a temp and default) so the reported code stays clean.
Was this helpful? React with 👍 / 👎
CI failed: YAML syntax error in config-npm/action.yml at line 109 causing GitHub Actions manifest parsing failures across jobs, alongside an unrelated transient GitHub API rate limit error.OverviewAll primary test and build jobs failed due to a consistent YAML syntax error in FailuresYAML Syntax Error in Action Manifest (confidence: high)
GitHub API Rate Limit Exceeded (confidence: high)
Summary
Code Review 👍 Approved with suggestions 4 resolved / 6 findingsUpdates Maven, NPM, and UV actions to use default Vault URLs and adds edge Artifactory token polling, addressing the hardcoded dev ping curl and unconditional 60s sleep findings. Consider adding connect/max timeout to the curl retry and fixing the duplicate http_code output on curl failure. 💡 Quality: curl retry lacks connect/max timeout📄 shared/wait_artifactory_token_sync.sh:36-38 The polling curl has no --connect-timeout/--max-time, so a hung TCP connection to the edge node would stall an iteration indefinitely rather than counting as a failed attempt, defeating the 5-minute bound. Add Bound each curl attempt so a stalled connection can't hang the loop.💡 Quality: curl failure appends duplicate http_code output📄 shared/wait_artifactory_token_sync.sh:36-38 On a connection failure curl still emits its ✅ 4 resolved✅ Security: Artifactory token passed on curl command line
✅ Quality: Any non-200 response retries for the full 5 minutes
✅ Quality: Hardcoded dev ping curl runs for all builds incl. SaaS
✅ Performance: Unconditional 60s sleep added to every non-SaaS Maven build
🤖 Prompt for agentsTip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |



BUILD-11961 Use default Vault URL for Maven Artifactory secrets
Summary
repox-url-based Vault URL override from the Artifactory secret steps inconfig-mavenandbuild-mavenvault-action-wrapperdefault (vault.sonar.build) instead of switching tovault.dev.sonar.buildwhen targeting the edge/dev Repox URLTest plan
repox.dev.sonar.build) and confirm Artifactory reader tokens resolve fromvault.sonar.buildsonarsource-qaSummary by Gitar
config-maven/action.ymlrepox-urlandrepox-deploy-urlinbuild-maven/action.ymlrepox-deploy-urlsupport and removed Vault URL overrides inbuild-npm/action.yml,config-npm/action.yml, andconfig-uv/action.ymlThis will update automatically on new commits.