Repository navigation
SLVS-3097 Run extension E2E test on master and on PRs that change it - #6854
sophio-japharidze-sonarsource wants to merge 9 commits into
Conversation
|
This comment will be updated automatically if new data arrives. 🔗 Commit SHA: 6f148f5 | Docs | View more details | Give us feedback! |
|
20a3b5b to
4fd09ff
Compare
4fd09ff to
b5f63aa
Compare
georgii-borovinskikh-sonarsource
left a comment
There was a problem hiding this comment.
Apart from some concerns regarding stability of DTE, looks like a good idea
Please also add COM busy state handling (if you haven't already)
|
|
||
| namespace SonarLint.VisualStudio.E2E | ||
| { | ||
| public static class VisualStudioAutomation |
There was a problem hiding this comment.
Handle the COM Busy State (IOleMessageFilter)
If you launch or control Visual Studio out-of-process, Visual Studio's COM server will periodically reject calls with 0x8001010A (RPC_E_CALL_REJECTED) whenever it is busy parsing, building, or rendering. You must register an IOleMessageFilter on the calling thread to automatically retry requests:
There was a problem hiding this comment.
Addressed in 0aae662 (tests/e2e/ComMessageFilter.cs). The test registers an IOleMessageFilter on its STA thread. RetryRejectedCall retries SERVERCALL_RETRYLATER (the RPC_E_CALL_REJECTED busy case) every 250 ms for up to 30 s per call, and cancels permanent rejections immediately. The previous filter is restored when the test finishes, and the number of busy retries is recorded in result.json. It passed in run https://github.com/SonarSource/sonarlint-visualstudio/actions/runs/43216162122.
…mage Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1d1ffc1 to
6f148f5
Compare
Code Review ✅ Approved 🟡 Medium risk 7 closed / 7 findingsAdds a Visual Studio VSIX E2E job with vault-backed restore and new PR/master triggers, which could disrupt builds or expose CI credentials if misconfigured. Adds an E2E test that installs the built VSIX into Visual Studio 18.12 and checks that a Sonar S1481 issue is removed after an IDE edit while a control issue remains, with automatic runs on master and on PRs touching the workflow or tests/e2e. Six issues were resolved, including the runner label mismatch, COM property-get retry gaps, a null ExitCode check, and the stale DEV image references. The known behavior where a newer master push cancels an in-progress E2E run was accepted and left unchanged, so no open findings remain. ✅ 7 closed✅ Quality: Workflow runner label disagrees with README and PR description
✅ Bug: Retry loop misses COM property-get rejections, so busy VS aborts run
✅ Bug: Start-Process ExitCode can be null, so successful runs fail
✅ Bug: Main Build job moved onto the temporary PR #513 DEV runner image
✅ Cross-PR: Stacked #6861 still points PR builds at the superseded DEV image
...and 2 more closed from earlier reviews Verification Rules 2/3 metRules 1 failed 2 passed 1 not applicable
Functional validation No results Auto-approval Not enabledFor more verification details, 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 |
|



What this adds
Adds one E2E test that checks the built extension works inside Visual Studio Community 18.12.12405.243. The test runs on the
warp-custom-sonarlint-visualstudiorunner, whose image installs that build since ci-ami-images #513 was promoted.The test:
A COM message filter retries temporary busy calls for up to 30 seconds per call and restores the previous filter at cleanup. Failed Error List reads and busy retries restart the five-second check. Selecting zero tests fails the job. Results and diagnostic logs are saved for seven days.
build.ymlalso stops hard-coding the Build Toolscl.exepath and finds MSVC withvswhere, because the image now has full VS 18 Community instead of Build Tools 2022.When it runs
master: once after each successful push build..github/workflows/extension-e2e.ymlor anything undertests/e2e/.gh workflow run build.yml --ref <branch> -f extension-e2e=true.The test runs after the build's publication steps, so it does not block promotion or dogfood delivery. If a newer
mastercommit cancels an in-progress run, that run's E2E is cancelled too. The next run tests a VSIX that includes the skipped commit.Validation
Run 43216162122 (attempt 3), at
6f148f561on the promotedwarp-custom-sonarlint-visualstudioimage:…\18\Community\…).Passed: 1, Failed: 0, Skipped: 0. Evidence is in theextension-e2e-vs18.12.12405.243artifact.Earlier attempts of that run landed on warm-pool instances that had been launched before promotion (old Build Tools 2022 image) and failed with
Full Visual Studio not found. Once the pool had cycled, the run passed.Earlier validation on #513's DEV image (run 43046475213) checked the artifact against the same run's signed VSIX: manifest identity inside the isolated profile, target finding 1 → 0, control finding 1 → 1, and the saved source edit.
One expected-build setting (
E2E_EXPECTED_VS_VERSION) drives both the minor-version range used for discovery ([18.12,18.13)) and the harness's exact-version check. This checks IDE automation and diagnostics; it does not verify foreground/pixel rendering.Follow-ups