Skip to content

[release/13.2] Fix missed PR comments in auto-rerun workflow#15296

Merged
radical merged 4 commits intomicrosoft:release/13.2from
radical:fix-auto-rerun
Mar 18, 2026
Merged

[release/13.2] Fix missed PR comments in auto-rerun workflow#15296
radical merged 4 commits intomicrosoft:release/13.2from
radical:fix-auto-rerun

Conversation

@radical
Copy link
Copy Markdown
Member

@radical radical commented Mar 16, 2026

Description

This fixes the transient CI auto-rerun case where a failed CI attempt has more than one retry-safe matched job.

Previously, the workflow posted one job-level rerun request per matched job. When the first rerun request started a new CI attempt, later job-level rerun requests could fail with 403 The workflow run containing this job is already running. That made coverage of the other matched failed jobs inconsistent, and it also caused missed PR comments in those rerun cases because the failure happened before the workflow reached the PR comment path.

This change keeps the existing retry-safety analysis and guardrails, but switches execution to a single run-level rerun-failed-jobs request for the analyzed CI run. It also updates the workflow summary, PR comment, tests, and repo docs so they describe the new behavior accurately.

Dependencies: none.

Validation:

  • dotnet test tests/Infrastructure.Tests/Infrastructure.Tests.csproj -- --filter-class "*.AutoRerunTransientCiFailuresTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • 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
    • 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
    • No
  • Does the change require an update in our Aspire docs?

@radical radical requested a review from eerhardt as a code owner March 16, 2026 23:33
Copilot AI review requested due to automatic review settings March 16, 2026 23:33
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 16, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15296

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15296"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates CI resiliency and test-selection infrastructure, improves the VS Code Aspire extension UX/settings, and refreshes several playground/apphost samples and tooling versions.

Changes:

  • Switch CI transient failure auto-reruns to a single run-level rerun-failed-jobs execution path and enhance its eligibility/dry-run behavior.
  • Add/extend conditional test-selection + matrix filtering/audit tooling and wire additional metadata through test runs.
  • Improve the VS Code extension (resource tree hierarchy/sorting, dashboard auto-launch setting enum + UI), and update various playground samples/tooling dependencies.

Reviewed changes

Copilot reviewed 77 out of 704 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
playground/TypeScriptApps/AzureFunctionsSample/AppHost/tsconfig.json Adds TS build configuration for Azure Functions AppHost sample.
playground/TypeScriptApps/AzureFunctionsSample/AppHost/package.json Adds Node/TS package metadata for the AppHost sample.
playground/TypeScriptApps/AzureFunctionsSample/AppHost/apphost.ts Adds an Aspire TypeScript AppHost orchestration script for the sample.
playground/TypeScriptApps/AzureFunctionsSample/AppHost/apphost.run.json Adds run profile metadata for the AppHost sample.
playground/TypeScriptApps/AzureFunctionsSample/AppHost/.modules/base.ts Adds generated TS SDK base types for the sample.
playground/TypeScriptApps/AzureFunctionsSample/AppHost/.modules/.codegen-hash Tracks generated module version/hash.
playground/TypeScriptApps/AzureFunctionsSample/.vscode/launch.json Adds VS Code launch configuration for the sample.
playground/TypeScriptAppHost/vite-frontend/package.json Updates Vite/React deps and pins Node engine range.
playground/TypeScriptAppHost/apphost.ts Updates sample to use unified reference API; adds cancellation token usage snippet.
playground/TypeScriptAppHost/.modules/transport.ts Adds CancellationToken type + capability argument validation.
playground/TypeScriptAppHost/.modules/base.ts Extends ReferenceExpression (conditional mode + getValue + wrapper registration).
playground/FoundryAgentEnterprise/frontend/package.json Updates Vite deps and adds Node engine constraints.
playground/FoundryAgentBasic/FoundryAgentBasic.AppHost/appsettings.Production.json Removes embedded Azure settings from sample defaults.
playground/FoundryAgentBasic/FoundryAgentBasic.AppHost/appsettings.Development.json Removes embedded Azure settings from sample defaults.
playground/FoundryAgentBasic/FoundryAgentBasic.AppHost/Program.cs Updates Foundry AppHost wiring to new builder APIs.
playground/FoundryAgentBasic/FoundryAgentBasic.AppHost/FoundryAgentBasic.AppHost.csproj Updates UserSecretsId for the sample host.
playground/AspireWithJavaScript/AspireJavaScript.Vue/package.json Updates Vue tooling deps + Node engine constraint.
playground/AspireWithJavaScript/AspireJavaScript.Vite/package.json Updates Vite/React tooling deps + Node engine constraint.
global.json Updates pinned .NET SDK/tooling version.
extension/src/views/AspireAppHostTreeProvider.ts Adds resource sorting + parent/child resource nesting in tree view.
extension/src/views/AppHostDataRepository.ts Adds resource properties, improves describe-follow error handling/backoff.
extension/src/utils/AspireTerminalProvider.ts Adds ANSI yellow color constant.
extension/src/test/rpc/interactionServiceTests.test.ts Updates tests for new dashboard auto-launch setting enum semantics.
extension/src/test/appHostTreeView.test.ts Updates test resource factory to include new properties field.
extension/src/server/interactionService.ts Implements dashboard auto-launch as enum + adds “Settings” action + refresh command.
extension/src/loc/strings.ts Adds new localized strings (Settings label, apphost terminated message).
extension/src/debugger/languages/dotnet.ts Removes DevKit build task path; forces build before debugging.
extension/src/debugger/AspireDebugSession.ts Adds terminal message when apphost session terminates; uses yellow styling.
extension/package.nls.json Updates user-visible strings and adds enum setting descriptions.
extension/package.json Changes enableAspireDashboardAutoLaunch setting from boolean to enum string.
extension/loc/xlf/aspire-vscode.xlf Updates/extends localization entries for new/changed strings.
extension/README.md Major rewrite/expansion of extension documentation and settings guidance.
extension/Extension.proj Adds an extra MSBuild element in the extension project (looks unintended).
eng/testing/github-ci-trigger-patterns.txt Adds auto-rerun workflow files to CI trigger patterns list.
eng/scripts/test-selection-rules.unified.json Adds draft unified rules model for conditional test selection.
eng/scripts/test-selection-rules.schema.json Adds JSON schema for rules-based test selection config.
eng/scripts/test-selection-rules.json Adds initial selector config (currently ignores all paths).
eng/scripts/test-selection-rules.hybrid.json Adds draft hybrid rules model for conditional test selection.
eng/scripts/test-selection-rules.audit.json Adds audit-mode selector config and category triggers.
eng/scripts/test-selection-rules.README.md Adds documentation for test selection rules configuration and integration.
eng/scripts/split-test-matrix-by-deps.ps1 Hardens matrix parsing/validation for include payload.
eng/scripts/find-test-scope-audit-misses.ps1 Adds audit script comparing predicted scope vs actual failing TRX results.
eng/scripts/filter-test-matrix-by-scope.ps1 Adds script to filter test matrices by affected projects (with audit mode).
eng/scripts/build-test-matrix.ps1 Adds enablePlaywrightInstall metadata into generated matrix entries.
eng/pipelines/azure-pipelines-unofficial.yml Updates Windows image; adds Node/yarn/vsce setup steps.
eng/Xunit3/Microsoft.Testing.Platform.targets Passes conditional-selection env var through test execution.
eng/Versions.props Adds System.Security.Cryptography.Pkcs version property.
eng/Testing.targets Moves GitHub Actions runner detection out of targets file.
eng/Testing.props Adds IsGitHubActionsRunner detection.
eng/TestEnumerationRunsheetBuilder/TestEnumerationRunsheetBuilder.targets Changes NuGet requirement detection property name.
eng/SpecializedTestRunsheetBuilderBase.targets Adjusts unsupported project rules; adds runner overrides and CLI-archive flag; passes conditional-selection env var.
docs/specs/test-selection-by-changed-paths.md Adds historical spec for test selection by changed paths.
docs/specs/polyglot-apphost.md Documents CancellationToken ergonomics in generated TypeScript.
docs/specs/bundle.md Expands integration assembly loading architecture documentation.
docs/conditional-tests-run.md Adds up-to-date doc for conditional tests behavior and config.
docs/ci/conditional-test-selection-hybrid.md Adds hybrid design doc draft.
docs/ci/conditional-test-selection-comparison.md Adds comparison doc (hybrid vs unified rules).
docs/ci/ci-trigger-patterns.md Removes old CI trigger patterns documentation file.
docs/ci/auto-rerun-transient-ci-failures.md Updates doc to match run-level rerun behavior + new safety rails.
docs/ci/TestingOnCI.md Clarifies enumerate-tests action can skip env prep.
Directory.Packages.props Adds MSBuild package pins; updates tool/package versions.
Directory.Build.props Adds MSBuild props enabling conditional-selection gating for template scenarios.
Aspire.slnx Adds new projects (TypeSystem, Managed, TestSelector, analyzers) to solution.
.github/workflows/specialized-test-runner.yml Adds CLI-archive requirement detection and wiring through to run-tests.
.github/workflows/run-tests.yml Adds inputs/env props for conditional test selection run-all + affected projects.
.github/workflows/deployment-tests.yml Improves recordings extraction + adds retryable asciinema upload + comment dedupe.
.github/workflows/cli-e2e-recording-comment.yml Adds retryable asciinema upload + comment dedupe + collapsible summary formatting.
.github/workflows/ci.yml Tweaks failure aggregation logic comments/guards.
.github/workflows/auto-rerun-transient-ci-failures.yml Adds manual dry-run, expands auto attempts, trims log fetch, and gates rerun on execution-eligible.
.github/skills/deployment-e2e-testing/SKILL.md Updates skill doc for automator-based API usage.
.github/skills/cli-e2e-testing/SKILL.md Updates skill doc toward Hex1b automator API + new guidance.
.github/actions/enumerate-tests/action.yml Adds prepareEnvironment toggle and uses repo-local dotnet.sh for tool build.
.CodeQL.yml Excludes playground/tests from CodeQL scanning.
Files not reviewed (5)
  • playground/AspireWithJavaScript/AspireJavaScript.Vite/package-lock.json: Language not supported
  • playground/AspireWithJavaScript/AspireJavaScript.Vue/package-lock.json: Language not supported
  • playground/FoundryAgentEnterprise/frontend/package-lock.json: Language not supported
  • playground/TypeScriptAppHost/vite-frontend/package-lock.json: Language not supported
  • playground/TypeScriptApps/AzureFunctionsSample/AppHost/package-lock.json: Language not supported

@radical radical marked this pull request as draft March 16, 2026 23:45
radical and others added 2 commits March 16, 2026 19:46
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@radical radical changed the base branch from main to release/13.2 March 17, 2026 00:39
@radical radical changed the title Use run-level reruns for transient CI retries [release/13.2] Use run-level reruns for transient CI retries Mar 17, 2026
@radical radical marked this pull request as ready for review March 17, 2026 00:41
@radical radical changed the title [release/13.2] Use run-level reruns for transient CI retries [release/13.2] Fix missed PR comments in auto-rerun workflow Mar 17, 2026
@radical radical added this to the 13.2 milestone Mar 17, 2026
@radical radical requested a review from Copilot March 17, 2026 01:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an edge case in the transient CI auto-rerun workflow where multiple retry-safe jobs could cause subsequent job-level rerun requests to fail (403), leading to inconsistent rerun coverage and missed PR comments. It switches rerun execution to a single run-level “rerun failed jobs” request while keeping the existing matcher and safety rails.

Changes:

  • Replace per-job rerun requests with a single run-level rerun-failed-jobs request in the workflow script.
  • Update PR comment and workflow summary text to describe the new rerun behavior.
  • Update behavior-focused infrastructure tests and CI workflow documentation to match the new contract.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/auto-rerun-transient-ci-failures.js Switch rerun execution to a single run-level rerun request and adjust summary/PR comment output accordingly.
tests/Infrastructure.Tests/WorkflowScripts/AutoRerunTransientCiFailuresTests.cs Update tests to assert the single run-level rerun request and the updated summary/comment text.
docs/ci/auto-rerun-transient-ci-failures.md Update documented behavior contract to reflect run-level rerun of all failed jobs once eligibility gates pass.

@radical radical requested review from joperezr and removed request for ReubenBond March 17, 2026 01:40
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Update the transient CI rerun contract test and docs to match the PR comment wording used by the workflow script.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
job_id: job.id,
});
}
await github.request('POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs', {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this rerun all failed jobs?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

@radical radical enabled auto-merge (squash) March 17, 2026 20:05
@radical radical merged commit a500f9a into microsoft:release/13.2 Mar 18, 2026
502 of 505 checks passed
@dotnet-policy-service dotnet-policy-service bot modified the milestone: 13.2 Mar 18, 2026
Copilot AI pushed a commit that referenced this pull request Mar 18, 2026
* Use run-level reruns for transient CI retries

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Polish transient rerun PR messaging

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix auto-rerun workflow contract test

Update the transient CI rerun contract test and docs to match the PR comment wording used by the workflow script.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants