Repository navigation
Unblock Integration Data Updater and parallelize API regeneration - #1813
Merged
David Pine (IEvangelist) merged 3 commits intoOct 5, 2026
Conversation
The scheduled Integration Data Updater failed in the TypeScript API phase because the shipped Aspire CLI (13.6.0) reports a known scanner defect as "Duplicate capability" errors for inherited proxy AddTo methods in Aspire.Hosting.Azure.Provisioning.Kusto and .Network. The scanner fix is in microsoft/aspire#20443. Since the 13.6 content update, the generator fails closed on any dump error, so the whole run aborted. - AtsJsonGenerator: add --tolerate-known-scanner-diagnostics. It accepts only the inherited duplicate-capability diagnostic, prints each tolerated message, and still fails on any other error. - generate-ts-api-json.ps1: generate packages concurrently in dependency waves (core, independent packages, scan-context packages), add timeouts and retries for the Aspire CLI and the transformer, and list tolerated diagnostics in the summary. - update-integration-data.ps1: surface tolerated diagnostics as workflow warnings and in a PR-body section with a review checklist item. - generate-package-json.ps1: restore package graphs concurrently, with retries. - Update the update-integrations skill and the generator READMEs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The matcher can suppress genuine same-namespace duplicate capabilities without verifying inheritance.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds resilient, parallel API regeneration and a temporary ATS scanner-diagnostic tolerance.
Changes:
- Parallelizes C# restores and TypeScript generation with retries and timeouts.
- Tolerates and reports recognized inherited-capability diagnostics.
- Documents the updated generation workflow.
| File | Description |
|---|---|
tests/AtsJsonGenerator.Tests/AtsTransformerHelperTests.cs |
Tests diagnostic matching and rejection. |
tests/AtsJsonGenerator.Tests/AtsJsonGeneratorTests.cs |
Tests reporting tolerated diagnostics. |
src/tools/PackageJsonGenerator/README.md |
Documents parallel restores and retries. |
src/tools/PackageJsonGenerator/generate-package-json.ps1 |
Parallelizes and retries package restores. |
src/tools/AtsJsonGenerator/README.md |
Documents generation behavior. |
src/tools/AtsJsonGenerator/Helpers/KnownScannerDiagnostics.cs |
Recognizes tolerated scanner diagnostics. |
src/tools/AtsJsonGenerator/Helpers/AtsTransformer.cs |
Adds optional diagnostic tolerance. |
src/tools/AtsJsonGenerator/GenerateCommand.cs |
Exposes the tolerance CLI option. |
src/tools/AtsJsonGenerator/generate-ts-api-json.ps1 |
Adds parallel waves, retries, timeouts, and reporting. |
src/frontend/scripts/update-integration-data.ps1 |
Surfaces tolerated diagnostics in CI and PR bodies. |
.agents/skills/update-integrations/SKILL.md |
Updates integration-generation guidance. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The known-scanner-diagnostic tolerance matched only the message shape, so a genuine collision between unrelated types that share a capability ID (for example, Contoso.Generated/BaseProxy.addTo defined independently by FooProxy and BarProxy) would also have been suppressed. The matcher now also requires both defining types to be handle types in the dump that are, or derive from, the type that owns the capability ID, per HandleTypes.BaseTypeHierarchy. Types missing from the dump fail closed. The affected Kusto and Network dumps from the stable CLI still tolerate all seven diagnostics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
David Pine (IEvangelist)
enabled auto-merge (squash)
October 2, 2026 14:13
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 2
Open (2)
Resolved since last review (1)
Invoke-PackageRestore runs inside ForEach-Object -Parallel workers, but it wrote its status line with Write-Host and Resolve-NuGetPackageRestoreGraph wrote retry warnings with Write-Warning from those workers, so output from concurrent restores interleaved nondeterministically. Capture retry warnings with -WarningVariable and return them, along with the status details, as data. A new Write-PackageRestoreStatus function prints each restore's warnings and status as one block on the main runspace as results stream in, for both the parallel and sequential paths. Failure details are still reported in package order after all restores finish. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Eric Erhardt (eerhardt)
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Fixes the failing scheduled Integration Data Updater run, and makes API regeneration faster and more resilient.
Root cause. The TypeScript API phase failed with
144 succeeded, 2 failed, 7 skipped. The two failures wereAspire.Hosting.Azure.Provisioning.KustoandAspire.Hosting.Azure.Provisioning.Network(13.6.0-preview.1.26479.8).The shipped Aspire CLI (
13.6.0+56f3e9c0d) exports an inheritedAddToonce per derived proxy type, all under the base type's capability ID. It reports every collision as aDuplicate capabilityerror and exits 1, although it still writes the dump. Since #1599 the generator fails closed on any dump error, so the whole run aborted. The scanner fix is microsoft/aspire#20443.Changes
Narrow tolerance (AtsJsonGenerator). The new
--tolerate-known-scanner-diagnosticsflag accepts only the inherited duplicate-capability diagnostic. Both definitions must be in the capability's namespace, on different types, with the same member name, and that name must match the capability method. Each defining type must also be a handle type in the dump that is the type owning the capability ID or lists it inHandleTypes.BaseTypeHierarchy, so unrelated types that share a capability ID still fail. Each tolerated message is printed, and any other error diagnostic still fails.Fail-closed script wiring.
generate-ts-api-json.ps1passes the flag only when the CLI exits nonzero without timing out and still writes a dump. The package fails if nothing was actually tolerated.Reporting (orchestrator).
update-integration-data.ps1emits a::warningannotation for tolerated diagnostics. It also adds a Tolerated ATS scanner diagnostics section and a review checklist item to the PR body it generates. The section lists the packages and has a collapsible list of diagnostics.Faster, more resilient TypeScript generation.
generate-ts-api-json.ps1processes packages concurrently in dependency waves:Up to
min(cores, 8)packages run at a time. SetASPIRE_TS_API_PARALLELISMto override this;-AspireRepoPathruns stay sequential. Each Aspire CLIdumpandexportcall has a 10-minute timeout and gets up to 3 attempts. The transformer and the enum supplement each have a 5-minute timeout. Each package's log is printed as a block when that package finishes, so logs stay readable.Faster C# generation.
generate-package-json.ps1restores package graphs concurrently and retries each restore up to 3 times. It honors-Parallelismand-Sequential, and its output and summary format are unchanged. Each restore's retry warnings and status line print together from the main runspace when that restore finishes.Docs. Updated the
update-integrationsskill and both generator READMEs.Reviewer notes
KnownScannerDiagnostics.cssays this too.13.6.0-preview.1.26478.8with13.6.0-preview.1.26479.8. The first bot PR will bump the 50 catalog entries that are pinned to26478.8; this PR doesn't include that bump.Aspire.Hosting.Radiusmodule. This isn't caused by this PR.withDotnetProgramContainerImage, theIDotnetProgramResourceoverload ofwithContainerImage. This happens even with theAspire.Hosting.Dotnetscan context, and the script onmaindrops it too.gh workflow run update-integration-data.yml --repo microsoft/aspire.devinstead of waiting for the next scheduled run.Third-party links and affiliations
None
Validation
All runs used the same Aspire CLI as CI (
13.6.0+56f3e9c0d, set viaASPIRE_CLI_PATH) on a 20-core Windows machine. The default parallelism there was 8; CI's 4-vCPU runner will use 4.dotnet test tests/AtsJsonGenerator.Tests: passed (37/37). This includes new tests that accept and report matching diagnostics. They also reject look-alike and unrelated errors, unrelated types that share a capability ID, and defining types missing from the dump'sHandleTypes.--tolerate-known-scanner-diagnostics. Both exited 0, with 5 and 2 diagnostics tolerated. Without the flag, both still fail.c644c4c7), I rangenerate-package-json.ps1on three packages with-Framework bogus -Parallelism 2to force the retry and failure path. Each package's retry warnings and status line printed as one block from the main runspace, and failure details followed in package order. The script oneca5c048interleaved output from concurrent restores. Success runs, in parallel and with-Sequential, produced identical JSON.workflow_dispatchon my fork atc644c4c7. All passed: Tools Tests (41 PackageJsonGenerator and 37 AtsJsonGenerator tests), Forbidden Words over96fb149d..c644c4c7, and CodeQL (no C# alerts; the only JS/TS alert is in existing code this PR doesn't touch). All upstream checks passed oneca5c048, andc644c4c7only changesgenerate-package-json.ps1.pnpm exec vitest run --config vitest.config.ts tests/unit/update-integrations.vitest.test.ts(insrc/frontend): passed (42/42).26479.8, used a cold NuGet cache, and pointedASPIRE_API_*at a staging directory.pwsh src/tools/PackageJsonGenerator/generate-package-json.ps1 -OutputDir <stage>/pkgs:Done! Success: 210 | Failed: 0 | Skipped: 7in 3:21.pnpm run normalize:api-data -- --pkgs: passed.pnpm run update:ts-api:Complete: 146 succeeded, 0 failed, 7 skippedin 4:05 (3:47 of it generation). It tolerated 5 Kusto and 2 Network diagnostics.pnpm run validate:api-data: passed. It reconciled 217 package identities, matched 146 modules to C# provenance, checked 74 DTO shapes and 2,873 inheritance chains, and checked attribute payloads against HEAD.update:ts-apilog, the orchestrator's parsing and PR-body code rendered both packages, all 7 diagnostics, and the::warningannotation.main, using the same inputs:26478.8builds.Success: 210 | Failed: 0 | Skipped: 7, and 208 of 210 files are byte-identical. The other 2 (Aspire.HostingandAspire.Hosting.JavaScript13.6.0) differ only insourceCommit, because my warm cache held a pre-release build of those packages.