Repository navigation
[ci] /review run-tests: show each Azure DevOps job as a check on the PR - #40612
Conversation
The selected build runs on a run-tests/* dispatch commit, so Azure Pipelines
reports its jobs there and the PR's checks panel only showed one summary check.
The results updater now mirrors every job of the build as a check on the PR
head ("maui-pr-uitests (Android UITests ... Shell1)") with its state and a link
to its log, and retires job checks left by an earlier build on the same commit.
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 40612Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 40612" |
|
@dalexsoto stamp |
There was a problem hiding this comment.
🟡 Changes recommended
Older selections can overwrite newer job checks and incorrectly mark other jobs as superseded, while skipped jobs can leave checks queued indefinitely.
2 open issues
What changed in this PR
This PR extends MAUI’s /review run-tests reporting so individual Azure DevOps jobs appear in the PR’s checks panel, rather than only on the dispatch commit.
Changes:
- Generates per-job checks with status, result, and log links.
- Synchronizes checks on the PR head and adds cleanup for checks from superseded builds.
- Adds Pester coverage for job-to-check conversion.
| File | Description |
|---|---|
.github/scripts/Update-RunTestsResults.ps1 |
Publishes and updates per-job checks on the PR head; retires superseded checks. |
.github/scripts/RunTests.Tests.ps1 |
Tests job status mapping, check identifiers, and fallback links. |
.github/scripts/RunTests.Common.ps1 |
Adds the helper that converts build jobs into check payloads. |
Review effort: Balanced
| $check = New-RunTestsRunCheckUpdate -Build $result.build -Results $result.results | ||
| $check | ConvertTo-Json -Depth 5 | & gh api -X PATCH "repos/$Repository/check-runs/$($result.checkId)" --input - | Out-Null | ||
| if ($LASTEXITCODE -ne 0) { Write-Warning "Could not update check run $($result.checkId)." } | ||
| if ($result.headSha) { Sync-RunTestsJobChecks -HeadSha $result.headSha -Build $result.build -Results $result.results } |
| foreach ($stale in $existing.Values | Where-Object { $_.name -notin $names -and $_.external_id -ne "job:$($Build.id)" -and $_.conclusion -ne 'neutral' }) { | ||
| $body = @{ status = 'completed'; conclusion = 'neutral'; completed_at = $now | ||
| output = @{ title = 'Not part of the latest selected run'; summary = "Superseded by [$($script:RunTestsPipelineName) #$($Build.id)]($($Build._links.web.href))." } } |
This comment has been minimized.
This comment has been minimized.
| $check = New-RunTestsRunCheckUpdate -Build $result.build -Results $result.results | ||
| $check | ConvertTo-Json -Depth 5 | & gh api -X PATCH "repos/$Repository/check-runs/$($result.checkId)" --input - | Out-Null | ||
| if ($LASTEXITCODE -ne 0) { Write-Warning "Could not update check run $($result.checkId)." } | ||
| if ($result.headSha) { Sync-RunTestsJobChecks -HeadSha $result.headSha -Build $result.build -Results $result.results } |
There was a problem hiding this comment.
[major] Logic and Correctness Verification - Older selections can overwrite the latest selection's job checks on the same head and suite. Minimizing an older comment does not remove its running marker, so the sweep still synchronizes it. After a newer Label + Button selection publishes checks, refreshing an older Label selection replaces Label's result and log with the older build and marks the newer Button check neutral as Superseded. Synchronize shared job checks only for the latest selection per head and suite, while allowing older comments and their own summary checks to refresh. Add a mocked regression with overlapping and non-overlapping jobs; the new payload-conversion test never exercises this ordering.
| if ($LASTEXITCODE -ne 0) { Write-Warning "Could not publish check '$($check.name)'." } | ||
| } | ||
| $names = @($planned | ForEach-Object { $_.name }) | ||
| foreach ($stale in $existing.Values | Where-Object { $_.name -notin $names -and $_.external_id -ne "job:$($Build.id)" -and $_.conclusion -ne 'neutral' }) { |
There was a problem hiding this comment.
[major] Logic and Correctness Verification - The current-build exclusion leaves skipped jobs permanently queued. A sweep can mirror a pending dependent job before its sample-app build fails. ConvertTo-RunTestsResults then removes that job when its final result is skipped, but this predicate excludes its existing check because external_id still matches the current build. The comment becomes done and the periodic sweep stops refreshing it, leaving an unfinished check for a completed build. Finalize unfinished current-build checks absent from the final plan with a neutral/skipped conclusion.
[moderate] Regression Prevention and Test Coverage - Add a two-sweep regression covering pending to skipped through conversion and synchronization, plus a negative case proving that pending jobs in an unfinished build are not retired. The new test checks only a single pending payload, and the existing skipped-job test checks comment rendering rather than check retirement.
…e pipeline (#40624) ### Description of Change The per-job checks from #40612 show in the PR's checks panel as > Bump global.json for dotnet/dotnet bumps / maui-pr-uitests (MacCatalyst UITests CoreCLR …) because check runs created with the workflow's `GITHUB_TOKEN` are filed under whichever GitHub Actions workflow already ran on the commit. Each job of the selected build is now published as a **commit status** instead, which shows under exactly its context: - `maui-pr-uitests (MacCatalyst UITests CoreCLR Controls Border)` — Succeeded in maui-pr-uitests #1699121 (selected by /review) - `maui-pr-devicetests (net11.0 CoreCLR iOS Helix Tests Run DeviceTests iOS (CoreCLR))` States: queued/running → `pending`, succeeded → `success`, failed → `failure`, canceled → `error`; each links to the job's log. When a later `/review` run on the same commit builds other jobs, the previous build's leftover statuses are marked "Not in the latest selected run". `review-run-tests-results.yml` gets `statuses: write`. Builds on #40615 (its commit is included here; merge that first or merge this one alone). ### Testing - `RunTests.Tests.ps1` passes (76), with a test for `New-RunTestsJobStatuses`. - Published the statuses for build 1699121 on #40611 by hand: the 7 UI test jobs show as `maui-pr-uitests (…)` with no workflow prefix. --------- Co-authored-by: Copilot CI <copilot-ci@microsoft.com>
…nchanged (#40615) ### Description of Change Follow-up to #40612. Running `review-run-tests-results.yml` with `head_sha` for #40550 found the two run-tests comments but published no job checks: the builds had already finished, the comment text did not change, and the loop skipped everything after the `$updated -ceq $comment.body` check — including the check updates. - The comment is only patched when it changed, but the `(selected run)` check and the per-job checks are synced for every refreshed section. - Comments are processed oldest first, so for one commit the newest build's job checks win and the older build's extra jobs are marked superseded. ### Testing `RunTests.Tests.ps1` passes (76). After merge: re-dispatch `review-run-tests-results.yml` with #40550's head SHA.
…PR (dotnet#40612) ### Description of Change `/review run-tests` builds run on a `run-tests/*` dispatch commit, so Azure Pipelines reports their jobs on that commit and the PR's checks panel only shows the `maui-pr-uitests (selected run)` / `maui-pr-devicetests (selected run)` summary checks. `Update-RunTestsResults.ps1` now mirrors every job of the selected build as its own check on the PR head, e.g. - `maui-pr-uitests (Android UITests CoreClr Controls (API 30) Shell1)` ✅ - `maui-pr-devicetests (net11.0 CoreCLR ios/catalyst/android Helix Tests Build Device Tests (CoreCLR))` ❌ Each check links to the job's log and follows it (queued → in progress → success / failure / cancelled) on every results sweep. Checks are tagged `external_id: job:<build id>`; when a later `/review` run on the same commit builds something else, the previous build's job checks that are no longer part of it are marked neutral ("Superseded"). ### Testing - New Pester test for `New-RunTestsJobChecks`; `RunTests.Tests.ps1` passes (76). - Generated the checks from the live build 1698101 (dotnet#40550) — the 8 Android UITests jobs with their results. - Creating check runs needs the GitHub App token, so the end-to-end check happens in the workflow after merge. Co-authored-by: Copilot CI <copilot-ci@microsoft.com>
…e pipeline (dotnet#40624) ### Description of Change The per-job checks from dotnet#40612 show in the PR's checks panel as > Bump global.json for dotnet/dotnet bumps / maui-pr-uitests (MacCatalyst UITests CoreCLR …) because check runs created with the workflow's `GITHUB_TOKEN` are filed under whichever GitHub Actions workflow already ran on the commit. Each job of the selected build is now published as a **commit status** instead, which shows under exactly its context: - `maui-pr-uitests (MacCatalyst UITests CoreCLR Controls Border)` — Succeeded in maui-pr-uitests #1699121 (selected by /review) - `maui-pr-devicetests (net11.0 CoreCLR iOS Helix Tests Run DeviceTests iOS (CoreCLR))` States: queued/running → `pending`, succeeded → `success`, failed → `failure`, canceled → `error`; each links to the job's log. When a later `/review` run on the same commit builds other jobs, the previous build's leftover statuses are marked "Not in the latest selected run". `review-run-tests-results.yml` gets `statuses: write`. Builds on dotnet#40615 (its commit is included here; merge that first or merge this one alone). ### Testing - `RunTests.Tests.ps1` passes (76), with a test for `New-RunTestsJobStatuses`. - Published the statuses for build 1699121 on dotnet#40611 by hand: the 7 UI test jobs show as `maui-pr-uitests (…)` with no workflow prefix. --------- Co-authored-by: Copilot CI <copilot-ci@microsoft.com>
…nchanged (dotnet#40615) ### Description of Change Follow-up to dotnet#40612. Running `review-run-tests-results.yml` with `head_sha` for dotnet#40550 found the two run-tests comments but published no job checks: the builds had already finished, the comment text did not change, and the loop skipped everything after the `$updated -ceq $comment.body` check — including the check updates. - The comment is only patched when it changed, but the `(selected run)` check and the per-job checks are synced for every refreshed section. - Comments are processed oldest first, so for one commit the newest build's job checks win and the older build's extra jobs are marked superseded. ### Testing `RunTests.Tests.ps1` passes (76). After merge: re-dispatch `review-run-tests-results.yml` with dotnet#40550's head SHA.
…otnet test migration to net11 (#40763) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Target Branch | This PR is for | Initial base | | --- | --- | | New features, API changes, or .NET 12 work (including .NET 12 fixes) | `main` | | .NET 11 servicing fixes | `net11`, for review | | Older servicing, release integration, infrastructure, or documentation | The branch designated for that work | - [x] I selected the applicable base branch using the [contribution guide](https://github.com/dotnet/maui/blob/main/.github/CONTRIBUTING.md#choose-your-pr-base-before-starting). Repository infrastructure only; targets `net11` so its CI, agentic and release tooling matches `main`. ### Description of Change Brings the repository-infrastructure merges from `main` (since `net11` diverged) to `net11`: `/review` run-tests / run-ui-tests / run-device-tests, MAUI Autopilot, release tooling, signing validation and related docs. Each commit is a `git cherry-pick -x` of the merged PR; all applied without conflicts (the `eng/` part of #40545 was already backported in #40629). **Included (28 commits):** - [release] Recover from squash-merged CI normalization PRs (#40566) - [Release state] Advance 11.0.1xx to SR3 (#40571) - [ci] /review run-tests, run-ui-tests and run-device-tests; MAI Code 2 as the second model (#40545) - Document that forward PRs must never use long-lived branches as head (#40582) - [ci] /review run-tests: standard /review comment layout; fix MAI Code 2 (#40591) - [ci] /review run-tests: don't rewrite Result badges of older comments (#40592) - [ci] /review run-tests: show each Azure DevOps job as a check on the PR (#40612) - Remove standalone /review gate workflow (#40595) - [ci] Hide /review run-tests command comments once acknowledged (#40593) - [ci] /review run-tests: report jobs as commit statuses named after the pipeline (#40624) - Remove standalone /review tests failure-analysis lane (#40596) - [ci] /review run-tests: build PRs only with their target branch's pipeline (#40628) - [ci] /review run-tests: report skipped, selection and run checks as commit statuses (#40627) - [ci] /review run-tests: fix the dispatch crash on existing statuses; log refused dispatches (#40631) - [ci] /review run-tests: let release-branch dispatches be pushed (#40634) - [ci] Re-enable signing validation in the official pipeline (#39524) - Group Dependabot NuGet updates for main and net11 (#40650) - [ci] Hide dogfood and skill validation comments (#40651) - Add MAUI Autopilot: /review autopilot drives review → fix → tests on opted-in PRs (#40668) - MAUI Autopilot: three-model cross-examined fixes (adds Claude Opus 5.5), Copilot review threads, test failure evidence, clear endings (#40672) - [release] Merge candidate into inflight daily without rewriting history (#40671) - MAUI Autopilot: three-model triage of failing tests and a needs-maintainer-decision label (#40707) - MAUI Autopilot: install the repository .NET SDK so fix rounds can run unit tests (#40732) - MAUI Autopilot: a maintainer's /review autopilot always runs (#40738) - MAUI Autopilot: every /review autopilot handles all earlier review suggestions; stop no-op issue mentions (#40743) - MAUI Autopilot: fix fork follow-ups (squash out-of-src commits, proper endings) and never fail on missing test evidence (#40746) - MAUI Autopilot: resolve merge conflicts, add UI screenshot baselines from Azure DevOps, back off on rate limits (#40750) - Migrate tests from Helix and XHarness to native dotnet test (#40661) [net11] — conflicts resolved to the net11 tree CI-validated in #40703 (`net11.0` TFM, CoreCLR **and Mono** device-test runtimes, net11 Arcade SDK); SourceGen tests for .NET 12-only features are not brought over. **Deliberately excluded:** - .NET 12 product features and bug fixes (animations, ContentButton, ScrollAnchorMode, trimming, XSG styles, Label.IsTextSelectable, Preferences enums, image metadata, QueryProperty, binding/route/XAML fixes, …). - #40060 Move main to .NET 12; main-only build-break fixes (#40666, #40674, #40708, #40720, #40751) and #40663 platform-compatibility re-enable (product code changes). - Dependabot bumps (#40639, #40640, #40641, #40643) — `net11` gets its own grouped Dependabot updates (#40650); localization check-ins. - #40615 — empty commit upstream. **Note for reviewers:** #40672 adds `maui-expert-autopilot-opus` (Claude Opus 5.5). `CopilotPipeline.Tests.ps1` → "contains no Anthropic model identifiers" fails on it exactly as it does on `main` today. Drop that workflow here if `net11` should keep that policy test green. ### Validation **CI (`/azp run` on this PR):** | Pipeline | Result | | --- | --- | | `maui-pr` [1703708](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703708) (build, pack, unit + integration tests on `dotnet test`/MTP) | ✅ succeeded | | `maui-pr-uitests` [1703714](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703714) | ✅ succeeded | | `maui-pr-devicetests` [1703715](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703715) | 38/41 jobs ✅ — all Android, iOS, Mac Catalyst (CoreCLR + Mono) pass | Device-test failures (Windows only): - `Windows controls packaged/unpackaged`: test host terminates with `0xDEAD` in the NavigationPage category — the known Windows blocker listed in #40661; the same two jobs fail on `main` after #40661 ([1703728](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703728)) and on #40703 ([1703325](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1703325)). - `Windows blazorwebview unpackaged`: one test, `InterceptedResponseWithoutABodyIsServedWithASingleContentTypeHeader(isContentNull: False)`, timed out after 30 s waiting for CoreWebView2. The same lane passed on #40703. GitHub checks: `Validate (PR)` (Release Readiness) fails in `MauiReleaseConfiguration.Tests.ps1` ("Wrong evaluated label on candidate/11.0.1xx-sr1"). It is triggered here because #40566 touches `MauiReleaseConfiguration.psm1`, and #40566 failed the same check on `main`; it also fails locally on unmodified `net11`. Skill-validation evals fail on unavailable `COPILOT_PAT_*` tokens and fixture fetches, the same as on #40661/#40703. **Local:** `actionlint` on changed workflows (exit 0); YAML and PowerShell parse of all changed files (no errors). Pester over the `powershell-script-tests.yml` paths: 26 failures vs 28 on unmodified `net11`. The only new failure is the Anthropic-model policy test (see note above), which also fails on `main`. ### Issues Fixed N/A — repository infrastructure sync. ### Let AI finish this PR - [ ] **Let the MAUI agent address review feedback and fix remaining issues on this PR.** Maintainers still decide whether it is merged. For PRs from forks, the agent opens a follow-up PR that keeps your commits. ---------


Description of Change
/review run-testsbuilds run on arun-tests/*dispatch commit, so Azure Pipelines reports their jobs on that commit and the PR's checks panel only shows themaui-pr-uitests (selected run)/maui-pr-devicetests (selected run)summary checks.Update-RunTestsResults.ps1now mirrors every job of the selected build as its own check on the PR head, e.g.maui-pr-uitests (Android UITests CoreClr Controls (API 30) Shell1)✅maui-pr-devicetests (net11.0 CoreCLR ios/catalyst/android Helix Tests Build Device Tests (CoreCLR))❌Each check links to the job's log and follows it (queued → in progress → success / failure / cancelled) on every results sweep. Checks are tagged
external_id: job:<build id>; when a later/reviewrun on the same commit builds something else, the previous build's job checks that are no longer part of it are marked neutral ("Superseded").Testing
New-RunTestsJobChecks;RunTests.Tests.ps1passes (76).