Skip to content

Commit 4254d2e

Browse files
adamintCopilot
andcommitted
Merge upstream main into VS Code funnel PR
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2 parents 12ef868 + af50564 commit 4254d2e

299 files changed

Lines changed: 22686 additions & 3233 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/issue-investigation/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The table lists repo-local and runtime-provided skills. Invoke a runtime-provide
4949
| --- | --- | --- | --- |
5050
| `area-cli`, `area-acquisition`, `area-templates` | `src/Aspire.Cli/`, `eng/scripts/get-aspire-cli*`, `src/Aspire.ProjectTemplates/` | CLI version, channel, install route, package feeds, clean temp directory, `.aspire` cache state, template name/options, OS/shell | `pr-testing`, `cli-e2e-testing`, `aspire-orchestration` |
5151
| `area-dashboard`, `area-telemetry` | `src/Aspire.Dashboard/`, `src/Aspire.Hosting.*`, OTLP/trace/log code | AppHost that emits the data, dashboard URL, browser steps, telemetry export, trace/log IDs, culture/localization, auth mode | `dashboard-testing`, `aspire-monitoring`, `startup-perf` |
52-
| `area-extension` | `extension/` | VS Code version, extension build/install method, configured Aspire CLI path, debug/command-palette steps, workspace shape, OS/shell | `playwright-cli`, `hex1b`, `pr-testing` |
52+
| `area-vscode-extension` | `extension/` | VS Code version, extension build/install method, configured Aspire CLI path, debug/command-palette steps, workspace shape, OS/shell | `playwright-cli`, `hex1b`, `pr-testing` |
5353
| `area-integrations` | `src/Components/**`, `src/Aspire.Hosting.*` integrations | Integration package/version, resource type, container image, external service/emulator, connection string/properties, upstream SDK behavior | `connection-properties`, `update-container-images`, `dependency-update` |
5454
| `area-app-model`, `area-orchestrator`, `area-service-discovery`, `area-terminal`, `area-polyglot` | `src/Aspire.Hosting/`, `src/Aspire.Hosting.AppHost/`, DCP/resource model code | AppHost source, resource graph, DCP/resource state, endpoint ports, process/container lifecycle, runtime versions, terminal recordings | `aspire`, `aspire-orchestration`, `hex1b` |
5555
| `area-app-testing`, `area-testing` | `tests/**`, `.github/workflows/**`, `tools/CreateFailingTestIssue/` | Test method/project, CI run/job/artifacts, OS matrix, quarantined/outerloop traits, failure rate, logs | `ci-test-failures`, `fix-flaky-test`, `test-management` |

.agents/skills/pr-testing/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Categorize the changes:
245245
- **Template changes**: Files in `src/Aspire.ProjectTemplates/`
246246
- **VS Code extension changes**: Files in `extension/`
247247
- **Test changes**: Files in `tests/`
248-
- **CI infrastructure changes**: GitHub Actions — files in `.github/workflows/`, `.github/actions/`, `.github/aw/`, `.github/agents/`, or CI scripts under `eng/scripts/`, `eng/testing/github-ci-trigger-patterns.txt`, `eng/test-retry-patterns.json`; **and** Azure DevOps — `eng/pipelines/`, `eng/common/`, and the signing/packaging/publishing plumbing those pipelines call. More broadly, anything that changes *how CI selects, builds, or runs* (e.g. `tools/**` invoked by CI, MSBuild test plumbing in `eng/**/*.props`/`*.targets`, or CI config/data JSON), even when no `.github/` or `eng/pipelines/` file is touched. (Skill/doc-only edits under `.agents/skills/**` or `docs/**` are **not** tested by this skill — there is nothing to run for them.)
248+
- **CI infrastructure changes**: GitHub Actions — files in `.github/workflows/`, `.github/actions/`, `.github/aw/`, `.github/agents/`, or CI scripts under `eng/scripts/`, `eng/github-ci/ci-skip-entirely-patterns.txt`, `eng/test-retry-patterns.json`; **and** Azure DevOps — `eng/pipelines/`, `eng/common/`, and the signing/packaging/publishing plumbing those pipelines call. More broadly, anything that changes *how CI selects, builds, or runs* (e.g. `tools/**` invoked by CI, MSBuild test plumbing in `eng/**/*.props`/`*.targets`, or CI config/data JSON), even when no `.github/` or `eng/pipelines/` file is touched. (Skill/doc-only edits under `.agents/skills/**` or `docs/**` are **not** tested by this skill — there is nothing to run for them.)
249249

250250
> **If the PR touches CI infrastructure, follow the `ci-infra-testing.md` reference in this skill directory for that part.** Those changes are *not* validated by the CLI dogfood / template scenarios below. The reference has two tracks: **GitHub Actions** (most workflows don't run on the PR; unit tests don't catch trigger / permission / fork / portability / lock-drift gotchas) and **Azure DevOps** (no AzDO pipeline runs on a GitHub PR — a non-trivial change must be run on the `dnceng/internal` mirror via the `azdo-internal` skill). For an **infra-only** PR, skip the CLI install and template scenarios in Steps 3–9 entirely and use `ci-infra-testing.md` instead. For a mixed PR, do both.
251251

.agents/skills/pr-testing/ci-infra-testing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Follow this file when the PR touches any of:
4646
- `.github/actions/**` — composite actions
4747
- `.github/aw/**`, `.github/agents/**` — gh-aw config / agent docs
4848
- `eng/scripts/*.ps1`, `eng/scripts/*.sh` — scripts invoked by workflows
49-
- `eng/testing/github-ci-trigger-patterns.txt` — the CI-skip pattern file
49+
- `eng/github-ci/ci-skip-entirely-patterns.txt` — the CI-skip pattern file
5050
- `eng/test-retry-patterns.json` — auto-rerun retry patterns
5151

5252
**Azure DevOps (Track B):**
@@ -143,7 +143,7 @@ actually *validated the change*, not merely that they completed.
143143

144144
| Workflow | Runs on the PR when… |
145145
|----------|----------------------|
146-
| `ci.yml` | Always, **unless every** changed file matches a glob in `eng/testing/github-ci-trigger-patterns.txt` (then build/test jobs skip). |
146+
| `ci.yml` | Always, **unless every** changed file matches a glob in `eng/github-ci/ci-skip-entirely-patterns.txt` (then build/test jobs skip). |
147147
| `tests-quarantine.yml`, `tests-outerloop.yml` | **Only** if the PR touches one of: that file itself, `specialized-test-runner.yml`, `run-tests.yml`, `build-cli-e2e-image.yml`. Otherwise schedule/dispatch only. **The PR run is one project only** — a plumbing smoke test, not full coverage (see below). |
148148
| `markdownlint.yml` | On every PR — `pull_request` with **no** `paths` filter. |
149149
| `polyglot-validation.yml`, `typescript-api-compat.yml`, `typescript-sdk-tests.yml`, `extension-e2e-tests.yml` | **Reusable (`workflow_call`)** — not triggered directly. They run via `tests.yml` (itself called by `ci.yml`), so they execute on the PR when `ci.yml`/`tests.yml` run, subject to their own internal `if:` / path gating inside `tests.yml`. |
@@ -156,7 +156,7 @@ Concrete check for the CI-skip path:
156156
```bash
157157
# Will ci.yml skip build/test for this PR? Compare changed files to the skip globs.
158158
git --no-pager diff --name-only origin/main...HEAD
159-
cat eng/testing/github-ci-trigger-patterns.txt
159+
cat eng/github-ci/ci-skip-entirely-patterns.txt
160160
```
161161

162162
If you changed `tests-quarantine.yml` / `tests-outerloop.yml` / their shared
@@ -239,7 +239,7 @@ The repo unit-tests its workflow helper scripts (JavaScript, PowerShell, and
239239
bash) and asserts YAML contracts in `tests/Infrastructure.Tests/`. PR CI runs
240240
that project **only when `ci.yml`'s test job isn't skipped** — and it *is*
241241
skipped when every changed file matches a glob in
242-
`eng/testing/github-ci-trigger-patterns.txt`, which includes `eng/pipelines/**`
242+
`eng/github-ci/ci-skip-entirely-patterns.txt`, which includes `eng/pipelines/**`
243243
and `auto-rerun-transient-ci-failures.*` (see Step I-1). So for an infra-only PR
244244
that touches just those paths, CI does **not** run `Infrastructure.Tests` for
245245
you — run the matching class locally. When the test job does run, use the map
@@ -636,7 +636,7 @@ Cited PRs are real prior breakages (illustrative, not exhaustive).
636636
| Too-**broad** `paths:` on a build-heavy reusable workflow re-triggers it on every eng/CI change and exhausts runner disk. | New `pull_request` reusable-workflow triggers must scope `paths:` to just the orchestrating YAMLs, not `src/`/`**`. Simulate which files match before merge. (#12143, #15921) |
637637
| `tests-quarantine.yml` and `tests-outerloop.yml` carry **independent** shared `paths:` lists that must stay in sync. | Editing one → edit the other identically (each also lists itself). The only acceptable diff between their lists is the self-entry. (COPILOT INSTRUCTIONS comment at top of both files) |
638638
| Two-dot `git diff base..head` reports files changed on **base** since branch-point as PR changes; three-dot `base...head` is merge-base correct. | Grep workflows/scripts for `git diff --name-only` — prefer three-dot for "files this PR changed". (#17220) |
639-
| Editing `eng/testing/github-ci-trigger-patterns.txt` itself is a skippable change, so a typo there **won't** be caught by CI. | Validate new globs by hand against the action's conversion rules; consider temporarily removing the file's self-skip to force one validating CI run. |
639+
| Editing `eng/github-ci/ci-skip-entirely-patterns.txt` itself is a skippable change, so a typo there **won't** be caught by CI. | Validate new globs by hand against the action's conversion rules; consider temporarily removing the file's self-skip to force one validating CI run. |
640640

641641
### 5. OS / shell / runner portability
642642

.github/actions/enumerate-tests/action.yml

Lines changed: 76 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@ inputs:
66
type: string
77
default: ''
88
description: 'Additional MSBuild arguments passed to the test matrix generation step (e.g., /p:IncludeTemplateTests=true /p:OnlyDeploymentTests=true)'
9+
checkout:
10+
required: false
11+
default: 'true'
12+
description: 'Whether to check out the repo. Set false when the caller has already checked out (e.g. a prior select-tests step in the same job whose working tree must be preserved).'
13+
restore:
14+
required: false
15+
default: 'true'
16+
description: 'Whether to set up .NET, bootstrap the Arcade toolset, and restore the class-mode split test projects. Set false when the caller has already restored in the same job.'
17+
setupDotNet:
18+
required: false
19+
default: 'true'
20+
description: 'Whether to run actions/setup-dotnet. Set false when the caller has already installed the SDK in the same job (e.g. via dotnet.sh). Only consulted when restore is true; global.json declares tools.runtimes, so Arcade installs the SDK into repo-local .dotnet regardless and a system SDK is never read.'
21+
beforeBuildPropsPath:
22+
required: false
23+
default: ''
24+
description: 'Path to an OverrideProjectToBuild props file (imported by eng/Build.props via $(BeforeBuildPropsPath)) that restricts the -test build, and thus the enumeration, to a subset of test projects. Empty enumerates everything.'
925

1026
# Output format: JSON with structure {"include": [{...}, ...]}
1127
# Each entry contains:
@@ -31,31 +47,88 @@ runs:
3147
using: "composite"
3248
steps:
3349
- name: Checkout code
50+
if: ${{ inputs.checkout == 'true' }}
3451
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3552

3653
- name: Set up .NET Core
54+
if: ${{ inputs.restore == 'true' && inputs.setupDotNet == 'true' }}
3755
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
3856
with:
3957
global-json-file: ${{ github.workspace }}/global.json
4058

41-
- name: Restore
59+
- name: Clean test enumeration artifacts
60+
shell: bash
61+
run: |
62+
find artifacts -name '*.tests-metadata.json' -delete 2>/dev/null || true
63+
find artifacts -name '*.tests-partitions.json' -delete 2>/dev/null || true
64+
rm -f artifacts/canonical-test-matrix.json artifacts/ClassModeTestProjects.props artifacts/ToolsetBootstrap.props
65+
66+
- name: Bootstrap Arcade toolset
67+
if: ${{ inputs.restore == 'true' }}
68+
shell: bash
69+
run: |
70+
mkdir -p artifacts
71+
cat > artifacts/ToolsetBootstrap.props <<'EOF'
72+
<Project>
73+
<ItemGroup>
74+
<OverrideProjectToBuild Include="$(RepoRoot)tools/ExtractTestPartitions/ExtractTestPartitions.csproj" />
75+
</ItemGroup>
76+
</Project>
77+
EOF
78+
./restore.sh /p:BeforeBuildPropsPath=${{ github.workspace }}/artifacts/ToolsetBootstrap.props
79+
80+
- name: Generate metadata and source partitions
81+
shell: bash
82+
run: >
83+
./build.sh -test
84+
/p:TestRunnerName=TestEnumerationRunsheetBuilder
85+
/p:TestMatrixOutputPath=artifacts/canonical-test-matrix.json
86+
/p:GenerateCIPartitions=true
87+
/p:TestEnumerationMetadataOnly=true
88+
/p:SkipGenerateCanonicalTestMatrix=true
89+
${{ inputs.beforeBuildPropsPath != '' && format('/p:BeforeBuildPropsPath={0}', inputs.beforeBuildPropsPath) || '' }}
90+
/bl
91+
${{ inputs.buildArgs }}
92+
93+
- name: Find class-mode split test projects
94+
id: class_mode
95+
shell: pwsh
96+
run: >
97+
./eng/scripts/write-class-mode-test-props.ps1
98+
-ArtifactsDir artifacts
99+
-OutputPropsPath ${{ github.workspace }}/artifacts/ClassModeTestProjects.props
100+
-GitHubOutputName count
101+
102+
- name: Restore class-mode split test projects
103+
if: ${{ inputs.restore == 'true' && steps.class_mode.outputs.count != '0' }}
42104
shell: bash
43-
run: ./restore.sh
105+
run: ./restore.sh /p:BeforeBuildPropsPath=${{ github.workspace }}/artifacts/ClassModeTestProjects.props
44106

45107
- name: Build ExtractTestPartitions tool
108+
if: ${{ steps.class_mode.outputs.count != '0' }}
46109
shell: bash
47110
run: dotnet build tools/ExtractTestPartitions/ExtractTestPartitions.csproj -c Release --nologo -v quiet
48111

49-
- name: Generate canonical test matrix
112+
- name: Generate class partitions and canonical test matrix
113+
if: ${{ steps.class_mode.outputs.count != '0' }}
50114
shell: bash
51115
run: >
52116
./build.sh -test
53117
/p:TestRunnerName=TestEnumerationRunsheetBuilder
54118
/p:TestMatrixOutputPath=artifacts/canonical-test-matrix.json
55119
/p:GenerateCIPartitions=true
120+
/p:BeforeBuildPropsPath=${{ github.workspace }}/artifacts/ClassModeTestProjects.props
56121
/bl
57122
${{ inputs.buildArgs }}
58123
124+
- name: Generate canonical test matrix
125+
if: ${{ steps.class_mode.outputs.count == '0' }}
126+
shell: pwsh
127+
run: >
128+
./eng/scripts/build-test-matrix.ps1
129+
-ArtifactsDir artifacts
130+
-OutputMatrixFile artifacts/canonical-test-matrix.json
131+
59132
- name: Expand matrix for GitHub Actions
60133
id: expand_matrix
61134
shell: pwsh

0 commit comments

Comments
 (0)