Repository navigation
[ci] Fix internal builds - #20455
[ci] Fix internal builds#20455
Conversation
Internal template builds abort after 20 minutes after the expanded starter-template matrix, even though the template project declares custom timeout values. MtpBaseArgs was composed from defaults in Testing.props before project-level properties were evaluated, so the declared 15-minute hang timeout was emitted as 10 minutes and the basic-build session remained capped at 20 minutes. Compose the MTP arguments from Testing.targets after project evaluation, give the combined internal basic-build run a 30-minute session budget, and add regression coverage for both the normal and basic-build argument sets. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The Template Tests job includes checkout, artifact staging, and SDK preparation within its existing 30-minute limit. Raising the test session timeout to 30 minutes would still allow the enclosing Azure Pipelines job to terminate the run before the test host reaches its own deadline. Give the job a 45-minute budget so the combined basic-build suite receives its full timeout plus setup and cleanup headroom. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
MTP argument composition now happens in Testing.targets so project timeout overrides are evaluated before the shared runner arguments are built. Update workflow comments, contributor guidance, test skills, and CI docs that still named Testing.props as the composition source. Keep Testing.props references only where the underlying filter properties remain defined there. 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 -- 20455Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20455" |
Tests selectorSelects the full PR test matrix + all PR-gated jobs (ALL) — a rule matching '.github/workflows/run-tests.yml' selects ALL Selection computed for commit |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The official pipeline YAML changed, but validation covered only a reduced template-only pipeline rather than a complete internal run at the PR head.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes internal Template Tests timing out by honoring project-level MTP timeout overrides and increasing pipeline headroom.
Changes:
- Moves MTP argument composition from
Testing.propstoTesting.targets. - Uses a 30-minute session timeout for combined internal template tests.
- Adds regression coverage and updates related documentation.
| File | Description |
|---|---|
tests/Infrastructure.Tests/MicrosoftTestingPlatformTests.cs |
Tests emitted timeout and filter arguments. |
tests/Aspire.Templates.Tests/README.md |
Documents timeout behavior. |
tests/Aspire.Templates.Tests/Aspire.Templates.Tests.csproj |
Adds the internal 30-minute timeout. |
eng/Testing.targets |
Composes MTP arguments after project evaluation. |
eng/Testing.props |
Removes early argument composition. |
eng/pipelines/azure-pipelines.yml |
Raises the Template Tests job timeout. |
docs/specs/cli-identity-sidecar.md |
Updates the authoritative file reference. |
docs/ci/mtp-args-pipeline.md |
Documents the revised argument pipeline. |
AGENTS.md |
Updates testing guidance. |
.github/workflows/run-tests.yml |
Updates the MTP source reference. |
.github/workflows/reproduce-flaky-tests.yml |
Updates comments referencing MTP configuration. |
.github/workflows/deployment-tests.yml |
Updates the MTP convention reference. |
.agents/skills/fix-flaky-test/SKILL.md |
Updates flaky-test guidance. |
.agents/skills/fix-flaky-test/run-test-repeatedly.sh |
Updates configuration comments. |
.agents/skills/fix-flaky-test/run-test-repeatedly.ps1 |
Updates configuration comments. |
.agents/skills/cli-e2e-testing/SKILL.md |
Updates CLI E2E guidance. |
💡 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. |
|
[automated] Extended CI confidence requires action Reviewer actions
Ready-to-use pr-testing prompt
Change classification
Confidence at a glance🔴 Internal Azure DevOps definition 1602 — Complete final-head validation is missing
🔴 Outerloop shared invocation — Full-project execution is missing
🟢 Final-head GitHub CI and red-check reconciliation — No unresolved PR-caused failure found
🟢 Focused timeout regression coverage — Final-head assertions passed
⚪ Deployment end-to-end execution — Not applicable
|
|
/backport to release/13.6 |
|
Started backporting to |
|
Ankit Jain (@radical) backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix template test timeout overrides in CI
Using index info to reconstruct a base tree...
M tests/Aspire.Templates.Tests/README.md
Falling back to patching base and 3-way merge...
Auto-merging tests/Aspire.Templates.Tests/README.md
Applying: Allow template tests to use the extended timeout
Using index info to reconstruct a base tree...
M eng/pipelines/azure-pipelines.yml
Falling back to patching base and 3-way merge...
Auto-merging eng/pipelines/azure-pipelines.yml
CONFLICT (content): Merge conflict in eng/pipelines/azure-pipelines.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Allow template tests to use the extended timeout
Error: The process '/usr/bin/git' failed with exit code 128 |
Description
Official internal builds are broken because the
Template Testsstage now needs about 25 minutes, but the test session is terminated after 20 minutes. The completed tests pass; the pipeline fails because Microsoft.Testing.Platform aborts the still-running session.In build 3086035, 129 tests passed with no failures before the deadline:
The timeout exits with code 3. The existing
--ignore-exit-code 8behavior did not change and is unrelated: exit code 8 only represents a run in which no tests executed.Why it started failing
#20046 added two 51-case starter-template classes, increasing the internal
basic-buildworkload by 102 cases. GitHub CI shards these tests by class, but the internal pipeline runs everybasic-buildcase in one process.That PR also upgraded xUnit to v4. The internal run initially failed before executing tests because the runner still passed the removed
--report-xunitoptions. #20314 corrected the reporting options, allowing the expanded suite to run and exposing the 20-minute timeout:--report-xunit; no tests ran.Root cause
The workload increase made the existing 20-minute session limit too short. A separate, previously latent evaluation-order bug prevented the template project from overriding that limit correctly.
MtpBaseArgswas composed ineng/Testing.propsbefore the project file was evaluated. Although the template project declared a 15-minute hang timeout, the emitted command still used the repository defaults:The Azure Pipelines job also had a 30-minute limit, leaving no setup or cleanup headroom around a 30-minute test session.
Fix
eng/Testing.targets, after project evaluation, so project timeout overrides take effect.basic-buildinvocation a 30-minute session timeout while retaining the 20-minute timeout for class-sharded runs.Validation
Infrastructure.Tests: 3 passed.The template-test task succeeded. The validation used a template-only scratch pipeline and reused package artifacts from the earlier full build, so it does not represent a complete internal pipeline run at this PR's head.
Surprises and call-outs
Testing.targetsmakes existing project-level MTP timeout overrides effective across the repository, not only for template tests.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?