Repository navigation
[ci] Fix internal builds - #20448
[ci] Fix internal builds#20448Ankit Jain (radical) wants to merge 3 commits into
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>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20448Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20448" |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Several authoritative references still incorrectly identify Testing.props as the MTP argument source.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
What changed in this PR
Moves MTP argument composition to post-project evaluation so template-specific timeouts take effect.
Changes:
- Composes MTP arguments in
Testing.targets. - Adds a 30-minute combined template-test timeout and 45-minute job budget.
- Adds regression coverage and documentation.
| File | Description |
|---|---|
eng/Testing.props |
Removes early MTP argument composition. |
eng/Testing.targets |
Composes arguments after project evaluation. |
eng/pipelines/azure-pipelines.yml |
Extends the template-test job timeout. |
tests/Aspire.Templates.Tests/Aspire.Templates.Tests.csproj |
Adds the basic-build session timeout. |
tests/Aspire.Templates.Tests/README.md |
Documents timeout behavior. |
tests/Infrastructure.Tests/MicrosoftTestingPlatformTests.cs |
Tests both timeout configurations. |
docs/ci/mtp-args-pipeline.md |
Updates the MTP argument pipeline documentation. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
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>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The repository-wide MTP evaluation change and official pipeline timing behavior warrant final human review despite focused regression and internal-stage validation.
Review effort: Balanced
Findings: None
Resolved since last review (1)
|
Can anything be done to make it faster rather than increasing timeouts? |

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?