Isolate WinUI E2E design-time build outputs - #20116
Conversation
Keep Roslyn XAML inputs, generated code, and saved state separate from Aspire's real build while preserving NuGet restore assets and normal outputs. Require the E2E definition probe to resolve the isolated generated source. Related to #19935. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20116Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20116" |
Tests selector0 / 99 PR test projects · 2 PR jobs · 0 advisory-only targets, from 3 changed files. Selected PR test projects (0 / 99)none — no PR-gated .NET test projects run for this change. Selected PR jobs (2)
Advisory workflow impact (0)none How these were chosen — grouped by what changedJob reasons
Selection computed for commit |
There was a problem hiding this comment.
🔵 Needs a closer look
The architecture-matching Windows x64 E2E validation remains pending and the PR is marked incomplete.
Pull request overview
Isolates WinUI E2E design-time intermediates to prevent XAML compiler contention.
Changes:
- Routes design-time outputs to
obj\design-time\. - Restricts readiness probes to isolated generated definitions.
- Adds regression coverage and updates contributor guidance.
File summaries
| File | Description |
|---|---|
extension/scripts/run-e2e.js |
Configures isolated intermediates. |
extension/src/test-e2e/winUiDebug.e2e.test.ts |
Tightens definition probing. |
extension/src/test/e2eLaunchProfile.test.ts |
Adds regression tests. |
extension/CONTRIBUTING.md |
Documents isolation behavior. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
✅ No documentation update needed. Step 5 branch taken: Triggered signals: none ( Changed-file evidence for the allowlist category:
All 4 changed files are test/build-tooling artifacts for the VS Code extension's E2E fixture generation (isolating |
## Description Related to the diagnostics-copy failure in #19935. This is independent of the WinUI build-race fix in #20116. E2E tests could pass but still fail CI when diagnostics collection tried to copy live Dashboard or cache lock files. A failed copy also prevented other useful logs from being collected. This change: - Collects intended logs, settings, AppHost metadata, screenshots, and fixture sources instead of runtime caches and coordination files. - Attempts each file/source independently and redacts text before saving it. Unexpected errors remain visible without preventing collection of the remaining diagnostics. - Uploads the four prepared diagnostics directories, making the collector the single place that decides which files to retain. ## Verification | Check | Result | | --- | --- | | [Windows x64 controlled reproduction](https://github.com/microsoft/aspire/actions/runs/35036528090) | Nine baseline executions reproduced the expected regressions. Nine fixed executions passed all 18 tests: **162 passes, no failures or skips**. The collector and test suite are unchanged in the current revision. | | [Normal CI at `3489dec`](https://github.com/microsoft/aspire/actions/runs/35037142483) | **2,990 unit tests passed**; 8 pending. Seven Windows/Linux E2E scenarios passed. Five actual uploaded artifacts were inspected: intended diagnostics and redaction were retained, without runtime caches or leases. | | Upload simplification at `e06beb05` | Compilation, lint, YAML checks, and **19 focused local tests passed**. [New-head CI](https://github.com/microsoft/aspire/actions/runs/35126760543) passed at merge `809038ea`: **3,003 unit tests passed** (8 pending), plus seven E2E scenario tests. Five Windows/Linux artifacts (340 files) retained intended diagnostics and redaction without runtime caches or leases. | <details> <summary>PR checklist</summary> ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - If yes, did you have an API Review for it? - [ ] Yes - [ ] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [ ] Yes - [ ] No - [x] No - Does the change make any security assumptions or guarantees? - [ ] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [ ] No - [x] No </details> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
The CI build failed due to test failure(s) that appear unrelated to the PR changes. These may be flaky tests. Suspected flaky test(s):
Suggested actions:
You can re-run the failed jobs from the workflow run page. |
Description
Prevent the WinUI extension E2E fixture's C# design-time builds from contending with Aspire's real XAML compilation. The one-time readiness barrier in #19947 does not cover later Roslyn watched-file reloads: run 34791816809 failed with an
input.jsonsharing violation while such a reload overlapped the CLI build.DesignTimeBuild=trueits own intermediate directory underobj\design-time\. This separates the XAML compiler's JSON inputs/outputs, generated code, and saved state while preserving normal build outputs and the sharedobj\project.assets.jsonrestore assets.InitializeComponentfrom that project's isolated directory, not the real build's output or another project's generated code.Application.OnLaunchedproof unchanged.Related to the concurrent XAML build failure recorded in #19935. The issue also lists run 34806422379, where the WinUI test passed and subsequent diagnostics collection failed copying a Dashboard
.lockfile. That distinct diagnostics-copy bug is addressed independently by #20127; neither fix depends on the other.Before/after workflow reproduction
Ran the existing
reproduce-flaky-tests.ymlthrough an investigation-only MTP probe of the actual WinUI compiler: three Windows x64 runners, three executions per runner, for each version.e4799ef9c44d5203f58cd193e41c4516fe433c83input.jsonsharing violation; no setup failures or skipped testsfbeab54212f092052a3f752ab50d30aef8486475Each probe verifies restore and an unlocked capability build, runs design-time compilation, then holds its
input.jsonexclusively while running the normal WinUI build. Before the fix, the real XAML compiler fails on that held file. After the fix, the normal build succeeds and regenerates its own XAML outputs while the design-time input remains locked. Evaluated properties confirm separate intermediate directories and the same NuGet assets file.The probe is identical between phases: the only workflow-head difference is the selected generator source ref. Both workflow runs used attempt 1. Investigation code/configuration is not part of this PR.
This is a controlled reproduction of the file-contention mechanism, not a spontaneous Roslyn/UI timing reproduction or a measurement of the natural flake rate. The real debugger scenario is covered separately below.
Additional validation
The WinUI E2E and unit jobs passed on CI attempt 1. Later attempts retained their original results and timestamps; they are not additional WinUI executions. The standard local VS Code unit host failed to load its workbench before running tests, so local source-only coverage used the installed Mocha runner; the standard Windows CI unit host subsequently passed. One initial local cold ExTester import exceeded its existing timeout and passed unchanged on the focused rerun.
Checklist
<remarks />and<code />elements on your triple slash comments?This fix was developed using the fix-flaky-test skill.