Commit 2ecbe34
authored
ci: retry desktop runtime staging on a transient registry failure (#179)
## Related Issue
No issue — this came out of the release pull request going red on a
dependency nothing in the shipped runtime uses.
## Problem
The `Artifact security` job blocked the `2.0.0` release with:
```
ERR_PNPM_NO_MATCHING_VERSION No matching version found for @tanstack/query-core@5.102.3
This error happened while installing the dependencies of @pymodel/vis-web@0.1.1
The latest release of @tanstack/query-core is "5.102.2".
```
`@tanstack/react-query@5.102.3` had been published before its
`query-core` peer of the same version was resolvable. `pnpm-lock.yaml`
pins `5.101.4`, which was installable throughout — but `pnpm deploy
--legacy` re-resolves from the registry and ignores the lockfile, and
says so:
```
WARN A pnpm-lock.yaml file exists. The current configuration prohibits to read or write a lockfile
```
So a mid-publish window at npm, in a dev-only workspace package the
desktop runtime never loads, fails a release gate.
## What changed
The deploy now runs up to three times with a widening back-off (5s, then
20s).
`withDeployRetries` takes its clock by injection, so the policy is
tested without a real wait or a real registry. A deterministic failure
still fails after the attempts run out, and rethrows its own error
rather than a wrapper that would hide which command broke.
The trade is explicit: roughly half a minute added to a genuinely broken
build, against a release gate that no longer goes red because npm was
mid-publish.
### What this is not
This treats the symptom. The real question is why a `--filter
@pymodel/pythinker-code deploy` resolves `@pymodel/vis-web`'s
dependencies at all — that package is a visual debugging tool, already
ignored in `.changeset/config.json`, and nothing in the packaged runtime
imports it. Scoping the deploy would remove the failure class rather
than retry it.
That was measured before settling for a retry. Adding
`--frozen-lockfile` and `--config.lockfile=true` to the legacy deploy is
**inert**: the resulting closure is byte-identical (a `diff` of the full
file lists is empty), and mutating a dependency to a non-existent
version still exits 0. Dropping `--legacy` fails with
`ERR_PNPM_DEPLOY_NONINJECTED_WORKSPACE`, which is why the flag is there.
The cold-runner resolution cannot be reproduced on a warm local store,
so the scoped fix needs to be developed against CI rather than guessed
at here.
[skip changeset] — build tooling only; nothing here reaches the
published package.
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md)
document.
- [ ] I have linked a related issue (external PRs: the issue must have a
maintainer's `/approve`).
- [x] I have added tests that prove my feature works.
- [x] Ran `gen-changesets` skill, or this PR needs no changeset.
- [x] Ran `gen-docs` skill, or this PR needs no doc update.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved desktop runtime deployment reliability by automatically
retrying failed deployment attempts.
- Added increasing wait times between retries to help recover from
temporary failures.
- Deployment errors are clearly reported when all retry attempts fail.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 362cac1 commit 2ecbe34
2 files changed
Lines changed: 129 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 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 | + | |
60 | 114 | | |
61 | 115 | | |
62 | 116 | | |
| |||
109 | 163 | | |
110 | 164 | | |
111 | 165 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
118 | 181 | | |
119 | 182 | | |
120 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
| |||
50 | 56 | | |
51 | 57 | | |
52 | 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 | + | |
0 commit comments