Repository navigation
SLVS-3097 Download the E2E VSIX from repox - #6872
sophio-japharidze-sonarsource wants to merge 1 commit into
Conversation
| - name: Download this build's signed VSIX from repox | ||
| shell: powershell | ||
| env: | ||
| PROJECT_VERSION: ${{ inputs.project-version }} | ||
| ARTIFACTORY_URL: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_URL }} | ||
| ARTIFACTORY_USER: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_USER }} | ||
| ARTIFACTORY_ACCESS_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).ARTIFACTORY_ACCESS_TOKEN }} | ||
| run: | | ||
| # Windows PowerShell's progress bar slows large downloads down considerably. | ||
| $ProgressPreference = 'SilentlyContinue' | ||
| if ($env:PROJECT_VERSION -notmatch '^\d+\.\d+\.\d+\.\d+$') { throw "Unexpected project version '$env:PROJECT_VERSION'." } | ||
| $name = "SonarLint.VSIX-$env:PROJECT_VERSION-2022.vsix" | ||
| $url = "$($env:ARTIFACTORY_URL.TrimEnd('/'))/sonarsource-public-qa/org/sonarsource/sonarlint/visualstudio/sonarlint-visualstudio/$env:PROJECT_VERSION/$name" | ||
| $directory = New-Item -ItemType Directory -Force -Path (Join-Path $env:RUNNER_TEMP 'extension-e2e-package') | ||
| $authorization = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("${env:ARTIFACTORY_USER}:${env:ARTIFACTORY_ACCESS_TOKEN}")) |
There was a problem hiding this comment.
⚠️ Bug: VSIX moved out of sonarsource-public-qa on master before E2E downloads
On a master push, the E2E job is required to run (the if at build.yml:31 is true). It has needs: build, so it starts only after the whole Build job has finished, and that includes Promote Build (build.yml:268-278). That step runs jf rt bpr --status "it-passed" ... "sonarsource-public-builds" without --copy. JFrog's build-promote moves artifacts by default, so by the time the E2E job runs, SonarLint.VSIX-<version>-2022.vsix is no longer under sonarsource-public-qa/.... The hard-coded repox URL at extension-e2e.yml:55 then returns 404, Invoke-WebRequest throws, and E2E fails on every master build.
On PR builds there is no promotion, so the timing runs will look fine and won't show this. That matters because the stated follow-up is to drop the artifact step and keep only repox. Fix: choose the repository from the ref (sonarsource-public-builds when the build was promoted), use a path that resolves either way (e.g. a virtual repo that includes both), or download through the Artifactory build-info API instead of a fixed repository path.
Pass the repository the artifacts end up in after the Build job, and use it in the download URL.:
# build.yml, extension-e2e job
with:
project-version: ${{ needs.build.outputs.project-version }}
repox-repository: ${{ (github.ref_name == 'master' || startsWith(github.ref_name, 'branch-')) && 'sonarsource-public-builds' || 'sonarsource-public-qa' }}
# extension-e2e.yml URL
$url = "$($env:ARTIFACTORY_URL.TrimEnd('/'))/$env:REPOX_REPOSITORY/org/sonarsource/sonarlint/visualstudio/sonarlint-visualstudio/$env:PROJECT_VERSION/$name"
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
The build already publishes its signed binaries to repox before the E2E job runs. Download the VSIX from there, as other repositories do, instead of the GitHub binaries artifact: on the WarpBuild runners the artifact download took between 49 s and 6.5 min, against 4 s from repox for the same file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cf6906c to
c264491
Compare
|
Code Review
|
| Auto-apply | Compact | Unblock |
|
|
|
Was this helpful? React with 👍 / 👎 | Gitar



Downloads the E2E test's VSIX from repox instead of the GitHub
binariesartifact, as other SonarSource repositories do. Stacked on #6854; it will retarget tomasterwhen #6854 merges.Why
The Build job already publishes its signed binaries to repox (
Publish to Repox) before the E2E job starts. Downloading the same file from the GitHub artifact is slow and variable on the WarpBuild runners:binariesartifactIn the comparison run (43255648766), both downloads ran in the same job and produced byte-identical files (SHA-256
58B6B2AB…6E795F11). The test passed on the repox copy.Changes
build.yml: thePrepare Buildstep exposesPROJECT_VERSIONas a job output, which is passed to the E2E workflow.extension-e2e.yml: downloadsSonarLint.VSIX-<version>-2022.vsixfromsonarsource-public-qawith the private-reader token the job already reads for NuGet. The version includes the build number, so this is the run's own signed VSIX. Theactions: readpermission is no longer needed and is removed.tests/e2e/README.md: describes the new source.The connected-mode job in #6861 will get the same change when it is restacked on this.
🤖 Generated with Claude Code