Repository navigation
Commit 5eeb02c
ci(docker-publish): wait until npm serves the CLI's install tree before the image build (#25674)
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
- **Tier H.** This PR needs an approval from one of GOVERNED_APPROVERS
before the seat readies and lands it.
- **Recovery of the 18.1.0 image** is out of scope here. The card names
two ways: a re-run of the failed job, or the next landing's
release-integrity backfill.
- **Claim.** The seat's claim on #25613 is comment 6385843623, and it
names this branch.
- **`skip-changeset`.** No published package is touched; the PR changes
only a workflow.
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01LKHDniRQSWjRJyDtacwpEd
Co-authored-by: Claude <noreply@anthropic.com>1 parent 7cd2ebf commit 5eeb02c
1 file changed
Lines changed: 66 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
59 | 125 | | |
60 | 126 | | |
61 | 127 | | |
| |||
0 commit comments