Skip to content

Skip CI entirely for API/ATS baseline-only PRs - #19939

Open
Ankit Jain (radical) with Copilot wants to merge 3 commits into
radical-test-trigger-map-designfrom
copilot/update-ci-skip-patterns
Open

Skip CI entirely for API/ATS baseline-only PRs#19939
Ankit Jain (radical) with Copilot wants to merge 3 commits into
radical-test-trigger-map-designfrom
copilot/update-ci-skip-patterns

Conversation

Copilot AI commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description

PRs that touch only generated API baseline files still ran the full CI matrix even though nothing build- or test-relevant changed (e.g. #19938, #19936). Those baselines are generated release artifacts, so a baseline-only PR should skip CI entirely — while a PR that touches a baseline alongside real source must keep routing normally for the source file.

Skip gate

Added the generated baseline files to eng/github-ci/ci-skip-entirely-patterns.txt (the top-level CI skip gate):

src/*/api/*.cs
src/*/api/*.ats.txt
src/Components/*/api/*.cs
src/Components/*/api/*.ats.txt

These patterns match only the direct api/ child of a project directory. A recursive src/**/api/** glob was deliberately rejected: it also matches real starter-template sources such as src/Aspire.Cli/Templating/Templates/java-starter/api/, and it would swallow *.tscompat.suppression.txt — which is not a generated baseline and must stay visible to the typescript-api-compat route.

Selector map

  • Removed the src/Aspire.Hosting*/api/*.ats.txt path rule. The prefilter reads the same skip-patterns file, so baseline files are now dropped before either selector layer runs and the rule can never fire.
  • That rule was the only thing routing job:polyglot for most Aspire.Hosting.* integrations, so removing it would have silently dropped polyglot coverage for ordinary integration source changes. To preserve it, every project that owns a tests/PolyglotAppHosts/<project> fixture is now listed in the polyglot affected_project_rules entry. This is the correct home per the section's invariant — production-project triggers belong in affected_project_rules, not path_rules — and unlike a family-wide Aspire.Hosting* glob it does not pull in fixture-less projects such as Aspire.Hosting.Tasks and Aspire.Hosting.Analyzers.
  • Updated docs/ci/test-trigger-map.md to match.

Test coverage

tests/Infrastructure.Tests/TestTriggerMap/SelectTestsAcceptanceTests.cs gains assertions that fail if the routing regresses:

  • Root and nested-component baselines (src/*/api/, src/Components/*/api/) are prefiltered.
  • api/*.tscompat.suppression.txt is not prefiltered and still routes job:typescript-api-compat.
  • Starter-template sources under a Templates/.../api/ path are not prefiltered.
  • A hosting integration source change routes job:polyglot.
  • Baseline-only change selects nothing; baseline + real source in one PR still routes the source.

Verification

Behavior was confirmed by running the selector rather than reading the YAML:

Changed file Result
src/Components/Aspire.Azure.AI.Inference/api/Aspire.Azure.AI.Inference.cs prefiltered, 0 jobs
src/Aspire.Hosting/api/Aspire.Hosting.tscompat.suppression.txt routes job:typescript-api-compat
src/Aspire.Cli/Templating/Templates/java-starter/api/Foo.java not prefiltered, routes normally
src/Aspire.Hosting.Redis/RedisBuilderExtensions.cs routes job:polyglot

dotnet test --project tests/Infrastructure.Tests/Infrastructure.Tests.csproj --no-launch-profile -- --filter-namespace "*.TestTriggerMap" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true" — 218 passed, 0 failed.

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
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No

Copilot AI self-assigned this Sep 4, 2026
Copilot AI balanced review requested due to automatic review settings September 4, 2026 17:50

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.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Copilot AI review requested due to automatic review settings September 4, 2026 18:00
Copilot AI changed the title [WIP] Update CI path filtering for generated API files Skip CI entirely for API/ATS baseline-only PRs Sep 4, 2026

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

The glob mishandles suppression and component files, while removed routing leaves integration export changes without polyglot validation.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread eng/github-ci/ci-skip-entirely-patterns.txt Outdated
Comment thread eng/github-ci/test-trigger-map.yml
@github-actions

github-actions Bot commented Sep 4, 2026

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 -- 19939

Or

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

Copilot AI review requested due to automatic review settings September 4, 2026 18:46
@radical
Ankit Jain (radical) force-pushed the copilot/update-ci-skip-patterns branch from db6e7a9 to 76fd8db Compare September 4, 2026 18:46
@radical
Ankit Jain (radical) changed the base branch from main to radical-test-trigger-map-design September 4, 2026 18:46

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

The skip glob also excludes real starter-template source files, and the new polyglot rule over-routes unrelated Hosting projects.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 3
  • Review effort level: Balanced

Comment thread eng/github-ci/ci-skip-entirely-patterns.txt Outdated
Comment thread eng/github-ci/test-trigger-map.yml Outdated
Comment thread docs/ci/test-trigger-map.md Outdated
@github-actions

This comment has been minimized.

Copilot AI review requested due to automatic review settings September 4, 2026 19:59
@radical
Ankit Jain (radical) force-pushed the copilot/update-ci-skip-patterns branch from f8f6d69 to e4acd5c Compare September 4, 2026 19:59
@github-actions

This comment has been minimized.

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

The suppression-baseline regression test uses a nonexistent path and does not guard against an overbroad api/** skip pattern.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread tests/Infrastructure.Tests/TestTriggerMap/SelectTestsAcceptanceTests.cs Outdated
@github-actions

This comment has been minimized.

Copilot AI and others added 3 commits September 4, 2026 16:26
Co-authored-by: radical <1472+radical@users.noreply.github.com>
Keep real template sources and suppression baselines in CI while skipping generated API artifacts. Route hosting projects with polyglot fixtures through the job without over-matching unrelated projects.

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

Copilot-Session: 8c5beb4c-0641-4918-8b29-d53c83727a78
Point the prefilter regression test at the actual api/*.tscompat.suppression.txt
location. This catches the overbroad api/** skip pattern that would hide the
TypeScript compatibility route.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8c5beb4c-0641-4918-8b29-d53c83727a78
@radical
Ankit Jain (radical) force-pushed the copilot/update-ci-skip-patterns branch from da67569 to 06c985d Compare September 4, 2026 20:26

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.

🔵 Needs a closer look

Polyglot routing omits two source packages consumed by runtime fixtures, allowing relevant changes to skip validation.

Review details

Suppressed comments (3)

eng/github-ci/test-trigger-map.yml:447

  • Aspire.Hosting.Azure.ConnectorNamespace is missing from this curated list, but tests/PolyglotAppHosts/Aspire.Hosting.Azure.Sandboxes/TypeScript/aspire.config.json:7 restores that source project at runtime. It has no project-reference edge that Layer 1 can use, so ConnectorNamespace source changes will not select job:polyglot. Add it to this rule.
      - Aspire.Hosting.Azure.CognitiveServices
      - Aspire.Hosting.Azure.ContainerRegistry

eng/github-ci/test-trigger-map.yml:452

  • Aspire.Hosting.Azure.Kubernetes is also a runtime package of the polyglot AppHost (tests/PolyglotAppHosts/Aspire.Hosting/TypeScript/aspire.config.json:8, with equivalent Java/Python fixtures), but it is absent here and has no project-reference edge to a listed fixture owner. With the ATS path rule removed, a source-plus-baseline change for this integration no longer selects job:polyglot. Add this project to the rule.
      - Aspire.Hosting.Azure.KeyVault
      - Aspire.Hosting.Azure.Kusto

tests/Infrastructure.Tests/TestTriggerMap/SelectTestsAcceptanceTests.cs:1083

  • This regression test only samples an integration whose fixture directory has the same name, so it cannot catch omitted cross-fixture runtime packages. That gap currently lets both Aspire.Hosting.Azure.Kubernetes and Aspire.Hosting.Azure.ConnectorNamespace be absent from the polyglot project rule. Add focused coverage for an indirectly consumed package, or structurally compare fixture packages entries with the curated rule.
        var mixed = selector.Select([sourceFile], [integrationName], new SelectorOptions());
        Assert.False(mixed.SelectsAll);
        Assert.NotEmpty(mixed.TestProjects.Union(mixed.Jobs));
        Assert.Contains("job:polyglot", mixed.Jobs);
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI review requested due to automatic review settings September 4, 2026 20:27

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

The skip patterns, project routing, tests, and documentation are consistent and preserve required source-change coverage.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Tests selector

1 / 99 PR test projects · 0 PR jobs, from 3 changed files.

Selected PR test projects (1 / 99)

Infrastructure.Tests

Selected PR jobs (0)

none


How these were chosen — grouped by what changed

📄 eng/github-ci/ci-skip-entirely-patterns.txt (changed)
1 directly: Infrastructure.Tests

📄 eng/github-ci/test-trigger-map.yml (changed)
1 directly: Infrastructure.Tests

🧪 tests/Infrastructure.Tests/TestTriggerMap/SelectTestsAcceptanceTests.cs (changed test)
1 directly: Infrastructure.Tests

Job reasons

none


Selection computed for commit 06c985d.

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.

4 participants