Repository navigation
Commit d613f48
ci(publish): a failing dev build no longer blocks the release, which runs as its own job (unblocks 8.0.0-rc.37) (#423)
## What this fixes
8.0.0-rc.37 is not on npm. #420 merged it, but the publish run failed
before any release step ran
([run](https://github.com/prisma/prisma-cli/actions/runs/46844536826)).
Nothing reached npm, and there is no git tag and no GitHub Release.
`publish.yml` publishes a dev build and the release in one job, dev
build first. The dev build's check failed, so the job stopped before the
release half.
The dev build failed for a reason unrelated to the release:
- The dev build pins each product to its `dev` dist-tag. The CLI took
the ORM's `dev`, 8.0.1-dev.42, and Composer's `dev`, 0.41.0-dev.1.
- But Composer 0.41.0-dev.1 depends on ORM 8.0.0-rc.26 exactly. So the
install held two versions of `@prisma/orm-toolchain`.
- The conformance check installs the packed CLI and checks, among other
things, that the shell's ORM pin is the version actually installed. It
refused.
The release pins ORM 8.0.0-rc.26 and Composer 0.41.0, which agree. Its
checks never ran.
After this PR, the workflow has three jobs:
```text
version reads the root package.json; decides the dev version and whether this run releases
dev stamps, builds, checks and publishes the dev build (needs: version)
release builds, checks and publishes the committed version (needs: version; only on a release)
```
`dev` and `release` run side by side, so a failing dev build no longer
stops a release, and the reverse.
## How rc.37 publishes after this merges
Merging this does not publish rc.37. A push releases only when it
changes the root version, and this merge does not. Re-running the failed
run would not help either: a re-run uses that run's own workflow file,
with the old single job.
So a maintainer dispatches `Publish to npm` from `main`, with `dist-tag`
empty and `dry-run` off. A dispatch is a full release run, unchanged by
this PR: the release checks, the publish under `next`, the git tag
`v8.0.0-rc.37`, and a pre-release GitHub Release not marked "Latest".
That run will show red, because its dev build still fails. The `release`
job's result is what counts. The dev build stays red until the products'
dev builds agree again. Fixing that is not part of this PR; the release
coordinator is taking it to Will. The choice is between:
- Composer's dev builds following the ORM's dev builds;
- the CLI's dev build taking the ORM version that Composer's dev build
depends on.
## What changes
- `publish.yml`, beyond the three jobs above:
- The `release` job drops the "Restore the committed versions" step.
That step undid the dev build's version stamp in the shared workspace.
The release job starts from its own clean checkout.
- Each job publishes `@prisma/cli-engine` after its own checks and
before its own CLI publish, as the single job did, so a CLI version
never reaches npm without its engine. `publish-packages.sh` treats a
version already on npm as done. If both jobs publish the engine at the
same moment, the second gets npm's "already published" error, which that
script also treats as done. A dev build could already publish the engine
when the release half would have failed later, so this is not new.
- The dev step and artifact that
`check-dev-build-with-cloud-deploy-action.yml` reads keep their names.
That workflow searches every job's steps, so it still finds them.
- Docs:
- `docs/oss/versioning.md` says the two halves are separate jobs and
why, and says what a dry run actually does.
- `docs/oss/release-automation.md` gains a troubleshooting row for a run
that is red at the dev check: read the release job first.
## How it was checked
- `actionlint` is clean.
- A dry-run dispatch of this branch
([run](https://github.com/prisma/prisma-cli/actions/runs/46845221680)),
on rc.37 as committed on `main`:
- `release` built rc.37, passed `check:grammar` and conformance,
uploaded the tarballs, and skipped only the publish steps, as a dry run
does.
- `dev` failed at its check for the reason above, and did not stop
`release`.
- A code review by a separate reviewer found nothing wrong in the
workflow. Its comment and doc fixes are in.
## Alternatives considered
- **Make the dev check non-blocking (`continue-on-error`) inside the one
job.** Rejected: a dev build that fails its checks must not publish.
Only its effect on the release should go.
- **Skip the dev build when a run releases.** Rejected: that is how the
workflow used to work. The release commit then never reached the `dev`
tag, so `dev` named an older version than the release until an unrelated
commit landed.
Agent: cobain-55
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent a067110 commit d613f48
3 files changed
Lines changed: 92 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| 57 | + | |
| 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 | + | |
53 | 87 | | |
54 | 88 | | |
55 | 89 | | |
| |||
65 | 99 | | |
66 | 100 | | |
67 | 101 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 102 | | |
79 | 103 | | |
80 | 104 | | |
81 | 105 | | |
82 | | - | |
| 106 | + | |
83 | 107 | | |
84 | 108 | | |
85 | 109 | | |
| |||
98 | 122 | | |
99 | 123 | | |
100 | 124 | | |
| 125 | + | |
| 126 | + | |
101 | 127 | | |
102 | 128 | | |
103 | 129 | | |
| |||
114 | 140 | | |
115 | 141 | | |
116 | 142 | | |
117 | | - | |
| 143 | + | |
118 | 144 | | |
119 | 145 | | |
120 | 146 | | |
| |||
129 | 155 | | |
130 | 156 | | |
131 | 157 | | |
132 | | - | |
| 158 | + | |
133 | 159 | | |
134 | 160 | | |
135 | 161 | | |
| |||
146 | 172 | | |
147 | 173 | | |
148 | 174 | | |
149 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
150 | 188 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
157 | 206 | | |
158 | 207 | | |
159 | | - | |
160 | 208 | | |
161 | 209 | | |
162 | 210 | | |
163 | 211 | | |
164 | 212 | | |
165 | 213 | | |
166 | 214 | | |
167 | | - | |
168 | 215 | | |
169 | 216 | | |
170 | 217 | | |
171 | 218 | | |
172 | 219 | | |
173 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
174 | 229 | | |
175 | 230 | | |
176 | 231 | | |
177 | 232 | | |
178 | 233 | | |
179 | | - | |
| 234 | + | |
180 | 235 | | |
181 | 236 | | |
182 | | - | |
| 237 | + | |
183 | 238 | | |
184 | 239 | | |
185 | 240 | | |
186 | | - | |
| 241 | + | |
187 | 242 | | |
188 | | - | |
| 243 | + | |
189 | 244 | | |
190 | 245 | | |
191 | 246 | | |
| |||
198 | 253 | | |
199 | 254 | | |
200 | 255 | | |
201 | | - | |
| 256 | + | |
202 | 257 | | |
203 | 258 | | |
204 | | - | |
| 259 | + | |
205 | 260 | | |
206 | 261 | | |
207 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
0 commit comments