Repository navigation
Harden integration data updater against CI-red PRs - #2229
David Pine (IEvangelist) wants to merge 2 commits into
Conversation
- Resolve inherited ATS capabilities projected onto derived handles (e.g. BaseKubernetesResource.Metadata) as a fallback tier. - Move known TypeScript export gaps into the test; drop hand-added entries from the updater-owned api-generation-failures.json. - Make the standalone-dashboard sample pin check version-agnostic. - Count untracked generated files in the PR body area table. - Run test:unit in the updater; on failure, list failures and withhold the auto-merge label; abort if tests rewrite generated data. - Generate twoslash types to a temp file in tests instead of the tracked aspire.d.ts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The updater can mistake a generic test-failure heading for bot-owned label removal and re-add a label on the next passing run, overriding a maintainer’s manual hold.
1 open issue
What changed in this PR
This PR hardens aspire.dev’s integration-data updater against validation gaps exposed by #2212, aligning its checks more closely with CI.
Changes:
- Runs unit tests before publication, controls auto-merge labeling, detects test-induced data changes, and corrects generated-file counts.
- Resolves inherited TypeScript API members and separates known export gaps from generator failures.
- Makes dashboard image checks version-independent and isolates twoslash test output.
| File | Description |
|---|---|
src/frontend/tests/unit/twoslash-types-generator.vitest.test.ts |
Generates declarations in a temporary directory with cleanup. |
src/frontend/tests/unit/integration-data-updater.vitest.test.ts |
Covers test failures, data mutations, and added-file counts. |
src/frontend/tests/unit/dashboard-image-references.vitest.test.ts |
Accepts consistent upstream major.minor image pins. |
src/frontend/tests/unit/api-reference.vitest.test.ts |
Records known missing TypeScript exports in a dedicated allowlist. |
src/frontend/src/utils/api-reference/typescript-provider.ts |
Adds inherited-member resolution as a fallback. |
src/frontend/src/utils/api-reference-core.ts |
Adds base-type hierarchy metadata to TypeScript handles. |
src/frontend/src/data/api-generation-failures.json |
Removes two manually maintained export-gap entries. |
src/frontend/scripts/update-integration-data.ps1 |
Adds unit-test gating, mutation checks, and accurate file counts. |
.github/workflows/update-integration-data.yml |
Uses test results to manage auto-merge labels and report status. |
Review effort: Balanced
| elif [ "$AUTO_MERGE" = "true" ] && [ "$has_label" != "true" ] && | ||
| grep -qF -- "$failure_marker" <<< "$previous_body"; then |
There was a problem hiding this comment.
Fixed in c4dc45f. The failure heading is no longer used as proof of label removal. The workflow now writes a hidden <!-- update-integration-data: auto-merge label held by updater --> marker only when it removes (or, on PR creation, withholds) the label, and carries it across consecutive failing runs only if the previous body had it. A passing run re-adds the label only when that marker is present, so a manual hold is preserved.
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
The unit-test failure heading no longer implies the updater removed the label. A hidden marker is written only when the workflow removes or withholds the label, carried across consecutive failing runs, so a maintainer's manual hold is never overridden by a later passing run. Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

Summary
#2212 failed
Frontend validationeven though #2049 closed with "All packages passed API generation". API generation was fine; the failures came from gaps between the updater and CI.Root causes and fixes
Declared export …entries toapi-generation-failures.json. The updater rewrites that file from real generator failures, so it dropped them and the declared-export test failed. Those entries also turned off stale-version checks for both packages.BaseKubernetesResource.Metadatawas a resolver bug. ATS projects inherited members onto each derived handle (PersistentVolumeClaim.metadata,KubernetesManifestResource.metadata), but the resolver ignoredbaseTypeHierarchy. I added a base-hierarchy match that runs only when nothing matches the type directly, so base-type references that resolve today don't become ambiguous.AzureApiManagementResource.Identityis a real upstream gap: it's marked[AspireExport], but ATS doesn't emit it. It now sits in an allowlist inside the test, next to the existing Radius exception.validate:api-datadoesn't run the data-dependent unit tests. The updater now runsbun run test:unit. If tests fail, it still opens or refreshes the PR but leaves off the:octocat: auto-mergelabel and lists the failing tests in the body. On a later passing run, it puts the label back only if the bot removed it, so a maintainer's hold stays.nightly/dashboard:13.6, butsamples.jsonis synced from upstream, which now uses17.0. The test now accepts any consistentmajor.minorpin.Get-AreaCountsusedgit diff HEAD, which skips untracked generated files. chore: Update integration data and GitHub stats (11/26/26) #2212 reported "0 added, 69 removed" when those were version bumps.twoslash-types-generatorregenerated the trackedaspire.d.tsin place. It now writes to a temp file. The updater also aborts iftest:unitchanges any file in the paths it stages.The next updater run rebases #2212 onto
mainand picks these up.Third-party links and affiliations
None
Validation
vitest run tests/unit/api-reference.vitest.test.ts tests/unit/dashboard-image-references.vitest.test.ts tests/unit/integration-data-updater.vitest.test.ts tests/unit/twoslash-types-generator.vitest.test.ts: passed (107 tests) onmaindata.chore/update-integration-data): passed (81 tests). CI failed on that data before this change.bun run lint: passed.vitest run: 1558 passed, 1 failed (incremental-build,spawn bun ENOENT). It fails the same way on unmodifiedmainon this Windows machine, so it's a local environment issue.