Skip to content

ci(docker-publish): wait until npm serves the CLI's install tree before the image build - #25674

Merged
os-zhuang merged 1 commit into
mainfrom
claude/project-thread-beijtf
Oct 24, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/project-thread-beijtf

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #25613

Clause-②: no
Metadata-protocol: none

On a release, the Docker image job starts about a minute after changeset publish returns. At that point npm can still answer 404 for some of the fixed group's tarballs. On 18.1.0 that made the image build fail: npm install -g @objectstack/cli@18.1.0 got E404 on spec-18.1.0.tgz (release run 40078805767, job 120834761830). The same URL answered 200 a few minutes later.

What changed

.github/workflows/docker-publish.yml gets a new step, Wait until npm serves the CLI's install tree, between Validate version input and the image build. Its inline Node script:

  • walks @objectstack/cli@VERSION's @objectstack/* dependency tree on the registry, starting from the CLI's own manifest and following dependencies (each range's operator is stripped, because the group is lockstep);
  • for every package, needs both the version manifest and a HEAD on its dist.tarball to answer 200;
  • reads a newly found dependency at once and waits only on a miss, backing off 5 s → 10 s → … → 60 s, bounded at 10 minutes;
  • on a timeout, writes one ::error:: per package still missing and exits 1;
  • treats a network error as a miss, so it is retried like a 404.

Both callers get it: workflow_call from release.yml and workflow_dispatch. A rebuild of a version that is already out passes in seconds.

Local verification

These runs used the extracted script, with Node 22 against the live registry:

case result
VERSION=18.1.0 npm serves @objectstack/cli@18.1.0 and 54 @objectstack/* dependencies. exit 0, about 20 s
VERSION=18.0.0 the same line for 18.0.0, exit 0
VERSION=99.0.0, deadline shortened to 20 s waits 5 s, then 10 s, then ::error::npm does not serve @objectstack/cli@99.0.0 …, exit 1
  • The workflow parses as YAML, and the step order reads back as written.
  • node scripts/pm/dispatch-gates.mjs --ran: 39 derived families, 39 run, all exit 0.
  • check-governed-merges.mjs --branch HEAD: GOVERNED, tier H (.github/workflows/**), 66 changed lines.

Acceptance notes


🤖 Generated with Claude Code

https://claude.ai/code/session_01LKHDniRQSWjRJyDtacwpEd

…re the image build

On a release, the Docker job starts about a minute after `changeset
publish` returns. npm can still answer 404 for some of the fixed
group's tarballs then, so the image's `npm install -g` failed on 18.1.0
(spec-18.1.0.tgz). A new step walks @objectstack/cli@VERSION's
@objectstack/* dependency tree on the registry and waits, with bounded
backoff (10 min), until every manifest and tarball answers 200. On a
timeout it names each package that is still missing.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LKHDniRQSWjRJyDtacwpEd
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

3 participants