Skip to content

ci(docker): wait until npm serves the whole release before building - #191

Merged
Madraka merged 1 commit into
mainfrom
ci/docker-wait-for-npm
Nov 10, 2026
Merged

Madraka merged 1 commit into
mainfrom
ci/docker-wait-for-npm

Conversation

@Madraka

@Madraka Madraka commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

The 0.7.1 release published to npm, but its Docker build failed with npm error notarget No matching version found for @cloudhal/[email protected].

What happened. scripts/publish-ci.ts waits up to five minutes for npm to serve every package, then tags anyway (by design, after 0.3.8 and 0.3.10). The Docker job starts as soon as publish finishes. npm registered @cloudhal/[email protected] at 10:54:26. The publish job ended at 10:53:24, and the Docker build ran npm install from 10:53:55 to 10:54:28.

Fix. A step in docker.yml runs before the build whenever a version is given. It checks npm view <pkg>@<version> for every package of the release group (.changeset/config.json fixed[0], 13 packages), every 30 s for up to 30 minutes. It fails with the missing names if npm still does not serve them. The release path and the hand dispatch both pass through it. Edge builds (no version) skip it.

Verified. actionlint is clean. The loop's logic, run locally against the registry, finds no missing package for 0.7.1 and 13 of 13 missing for 9.9.9.

The 0.7.1 image itself is being rebuilt by a hand dispatch of the current workflow, now that npm serves everything.

🤖 Generated with Claude Code

The 0.7.1 image build failed with ETARGET for @cloudhal/[email protected]. The publish job tags after waiting five minutes even when npm does not serve every package yet (scripts/publish-ci.ts), and npm registered analytics six minutes after its publish, a minute after the Docker build had started its npm install. The build job now polls npm view for every package of the release group (.changeset/config.json fixed[0]) at the version, every 30 s for up to 30 minutes, before it builds. No tag moves on a failure, as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Madraka <[email protected]>
@Madraka
Madraka merged commit fd4f22b into main Nov 10, 2026
11 checks passed
@Madraka
Madraka deleted the ci/docker-wait-for-npm branch November 10, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant