Conversation
Mint Artifactory tokens from an explicit vault-url (default https://vault.sonar.build) so Edge resolve on *.dev.sonar.build does not hit vault.dev.
|
| vault-url: | ||
| description: Vault address used to mint Artifactory tokens. Independent of `repox-url`. | ||
| default: https://vault.sonar.build |
There was a problem hiding this comment.
⚠️ Bug: Dropping dev-Vault derivation silently breaks dev/Edge Maven callers
Previously config-maven/build-maven auto-selected https://vault.dev.sonar.build whenever repox-url contained dev.sonar.build. With the new vault-url input defaulting unconditionally to https://vault.sonar.build, any existing caller that sets repox-url: https://repox.dev.sonar.build (and does not yet know about vault-url) now mints Artifactory tokens from prod Vault against the dev Repox, which fails auth at dependency-resolution/deploy time rather than at config time. The same workflow also becomes internally inconsistent: the ten sibling actions (config-npm, build-npm, config-gradle, build-gradle, config-pip, config-uv, config-poetry, build-poetry, build-yarn, promote) still derive Vault from repox-url, so e.g. build-maven + promote in one dev pipeline would hit two different Vaults. Keeping the derivation as the fallback when vault-url is not explicitly provided preserves current behavior while still allowing the Edge/prod split this PR needs.
Make vault-url an explicit override and keep the repox-url derivation as the default, in both build-maven and config-maven.:
vault-url:
description: Vault address used to mint Artifactory tokens. Independent of `repox-url`.
Defaults to the Vault matching `repox-url` when not set.
default: ''
# ...and at the vault-action-wrapper step:
url: ${{ inputs.vault-url != '' && inputs.vault-url ||
(contains(inputs.repox-url, 'dev.sonar.build') && 'https://vault.dev.sonar.build' || 'https://vault.sonar.build') }}
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
| vault-url: | ||
| description: Vault address used to mint Artifactory tokens. Independent of `repox-url`. | ||
| default: https://vault.sonar.build |
There was a problem hiding this comment.
💡 Quality: New vault-url input not documented in README input tables
vault-url is a new public input on both config-maven and build-maven, but the README input tables for those actions (which CONTRIBUTE.md requires to document each action's parameters) were not updated, so callers who need to point Maven at a different Vault have no discoverable documentation. Add a vault-url row to the config-maven table (after repox-url, line 259) and the build-maven table (after repox-url, line 364).
Add a vault-url row to both the config-maven and build-maven input tables in README.md.:
| `vault-url` | Vault address used to mint Artifactory tokens. Independent of `repox-url`. | `https://vault.sonar.build` |
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
Code Review
|
| Auto-apply | Compact | Unblock |
|
|
|
Was this helpful? React with 👍 / 👎 | Gitar



Summary
vault-urltoconfig-maven/build-maven(defaulthttps://vault.sonar.build).contains(repox-url, 'dev.sonar.build'), so Edge hostnames can resolve against Edge while minting SaaS tokens from prod Vault.build-maven@BUILD-12158.Test plan
url: https://vault.sonar.build(not vault.dev) and no longer 500s onSonarSource-sonar-dummy-private-reader.vault-urlstill mint fromhttps://vault.sonar.build.