Skip to content

fix(ci): avoid full test runs for shared test fixture changes - #21495

Closed
Ankit Jain (radical) wants to merge 2 commits into
microsoft:mainfrom
radical:trigger-map-selection
Closed

Ankit Jain (radical) wants to merge 2 commits into
microsoft:mainfrom
radical:trigger-map-selection

Conversation

@radical

@radical Ankit Jain (radical) commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Description

CI for #21423 selected every PR test project and job after a template endpoint fixture changed:

a rule matching 'tests/Shared/TemplatesTesting/data/EndPointWriterHook_cs' selects ALL

The project graph already identified the template consumers, but a broad shared-fixture rule escalated the selection to ALL.

Replace that rule with actual consumer routes for template data, SDK provisioning, CLI E2E images, certificates, and test-archive support. Imported template inputs use the project graph; explicit routes retain runtime-only and deleted-file dependencies. Podman remains outerloop-only.

Replaying the original changed paths now selects Templates tests and advisory EndToEnd impact, with no unrelated jobs. Documentation explains why archive-support files need explicit routes rather than treating every NuGet-consuming job as a consumer.

Validation

Passed: 349 focused selector tests, including the runtime-only Hosting certificate distinction, plus full-graph selection probes. These local checks do not establish workflow execution.

dotnet test --project tests/Infrastructure.Tests/Infrastructure.Tests.csproj --no-launch-profile -- --filter-namespace 'Infrastructure.Tests.TestTriggerMap' --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

A template endpoint fixture change selected every PR test and job because
eng/github-ci/test-trigger-map.yml grouped narrowly consumed shared inputs
under ALL, overriding the graph's precise template-test attribution.

Route shared fixtures and archive-support files to their actual consumers.
Retain runtime-only and deleted-file dependencies, use graph attribution
for imported inputs, and keep Podman outside regular PR selection.

Document the conditional test-archive inputs and verify archive consumers
through evaluated project metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@radical Ankit Jain (radical) added the area-engineering-systems infrastructure helix infra engineering repo stuff label Oct 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚀 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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21495

Or

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Missing real-map selector tests for certificate dependencies and Docker/Podman inputs leave potential Hosting omissions and unintended full-matrix runs unguarded.

2 open issues
What changed in this PR

This PR narrows Aspire’s CI test selection for shared fixtures, addressing the full-suite escalation seen in #21423 while preserving runtime-only and deleted-file dependencies.

Changes:

  • Replaces broad shared-input rules with consumer-specific routes and keeps Podman outerloop-only.
  • Adds regression coverage for deleted fixtures and NuGet-dependent test archives.
  • Documents why archive-support inputs need explicit routing.
File Description
tests/​Infrastructure.Tests/​TestTriggerMap/​TestTriggerMapTests.cs Adds deleted-input and archive-consumer routing tests.
eng/​github-ci/​test-trigger-map.yml Narrows shared-fixture routes and excludes the outerloop-only Podman image.
docs/​ci/​test-trigger-map.md Explains explicit archive-support and runtime-fixture dependencies.

Review effort: Balanced

Comment thread eng/github-ci/test-trigger-map.yml Resolved
Comment thread eng/github-ci/test-trigger-map.yml Resolved
The existing deleted-certificate test did not cover Hosting's direct
runtime dependency on testCert.pfx.

Exercise the real map without graph attribution for testCert.pfx and
eku.client.pfx. Assert the exact consumer sets so removing Hosting's
runtime edge, adding it for client-only certificates, or selecting
unrelated tests and jobs fails the test.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified in the targeted CI test-routing changes.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

Copy link
Copy Markdown
Member Author

Superseded by #21810, which uses the upstream microsoft/aspire branch and includes the main merge and added selector regression coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-engineering-systems infrastructure helix infra engineering repo stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants