Repository navigation
Ignore just-published npm releases in polyglot TypeScript validation - #21634
Conversation
Floating npm ranges in TypeScript AppHosts can resolve a version whose tarball is not yet downloadable right after an upstream publish, failing with E404. Restrict npm resolution to releases at least one day old. Fixes #21633 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21634Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21634" |
Tests selector1 / 100 PR test projects · 1 PR job, from 1 changed file. Selected PR test projects (1 / 100)
Selected PR jobs (1)
How these were chosen — grouped by what changed📄 Job reasons
Selection computed for commit |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the npm release-cutoff change in TypeScript validation.
No open issues 🎉
What changed in this PR
Reduces fresh-release npm E404 failures in TypeScript Polyglot SDK Validation, addressing #21633 and extending the approach used for CLI E2E shells in #21615.
Changes:
- Computes a UTC cutoff one day before the validation run and passes it into the container as
npm_config_before. - Documents why npm range resolution excludes just-published releases; image-build tool installs remain unchanged.
| File | Description |
|---|---|
.github/workflows/polyglot-validation.yml |
Adds the npm release cutoff to the TypeScript validation container and explains the workaround. |
Review effort: Balanced
|
✅ No documentation update needed. docs_optional → build_or_ci_only. Triggered signal: |
Description
Fixes the npm fresh-release E404 part of the
Polyglot SDK ValidationTypeScript flake tracked in #21600.Root cause
TypeScript AppHost scaffolds and fixtures declare floating npm ranges. The TypeScript validation container runs
npm installwithout a release-age limit. If a run installs a few minutes after an upstream publish, npm picks the new version from the packument while its tarball still returns 404.aspire init --language typescriptthen fails withnpm error code E404/❌ The app could not be created.In the last 7 days this caused 5 failed jobs across 3 unrelated branches (details in #21633). Each failure came 2–4 minutes after the upstream publish of
@typescript-eslint/typescript-estree@8.72.1or@types/estree@1.0.10. These are the same publishes #21615 fixes for the CLI E2E Docker shells, but that PR doesn't cover this container.Fix
The
Run TypeScript SDK validationstep now passesnpm_config_before=<now − 1 day>into the container (npmbeforeconfig). This matches #21615. npm range resolution inaspire init, the fixture installs, the JavaScript app installer and the Nuxt fixture only selects releases that have had time to propagate. The global tool installs at image build time are unaffected. pnpm, Yarn and Bun don't read this setting. No retries, sleeps or skips are added.Validation
1.1.0(published 2 minutes ago, tarball 404) and1.0.0(30 days old).npm install pkg@^1.0.0fails withnpm error code E404, the CI signature.1.0.0.playground/NuxtApp/webinstalls, with 596 packages includingnuxt@4.5.2.tests/PolyglotAppHosts/*/TypeScriptand integration playgroundpackage.jsonfiles resolve. No ETARGET.actionlint: passes onpolyglot-validation.yml.Other intermittent TypeScript validation failures from the same window have different causes and are not addressed here: the Nuxt dev-mode health wait timing out (3),
bun installConnectionRefused(2), and an MCR pull failure (1).Fixes #21633
Checklist
🤖 Posted by AspireAgent (AI Agent)