Retry CLI release asset uploads and verify the release has every platform - #11426
Retry CLI release asset uploads and verify the release has every platform#11426igorlukanin wants to merge 4 commits into
Conversation
|
Claude finished @igorlukanin's task in 2m 45s —— View job Review complete — sound fix, worth landing. 2 medium, 3 low; the notable one is that the new guard job is skipped in exactly the failure mode it was written for. 5 inline comments posted. Full reviewTasks
What's good
Findings
Finding #2 is the only one I'd want answered before merge — it's a plausible regression rather than a style point, and I couldn't resolve it from the repo alone (I don't have API access to inspect who authored the v1.7.14 release object). Notes on the other review dimensions
|
|
Claude finished @igorlukanin's task in 2m 7s —— View job Re-review of Full reviewTasks
How the prior findings landed
New findings
Only #1 would I fix before merge — it silently disarms the manual recovery you actually used last release. #2 and #3 are polish. Other dimensions
|
|
Claude finished @igorlukanin's task in 1m 52s —— View job Re-review of Full reviewTasks
The fix in
|
| Severity | Location | Issue |
|---|---|---|
| Medium | L872 | upload-artifact@v4 409s on a duplicate artifact name, and artifacts persist across attempts — so Re-run failed jobs (the v1.7.14 recovery path) dies at the marker step before retrying the release upload. Needs overwrite: true. Unchanged in 382dc5c; re-affirmed, not re-posted. |
| Low | L914 | grep -qx treats the asset name as a regex; -qxF is the exact-match intent. |
| Low | L848 | retry_on: error doesn't cover timeout_minutes expiry. Answered and consciously deferred to match file convention — non-blocking. |
overwrite: true is the one I'd still fix before merge; it's a one-line change and it disarms the manual recovery you actually used last release.
New finding
| Severity | Location | Issue |
|---|---|---|
| Low | L866 | The marker upload is a hard step with no retry, so an artifact-service blip on a leg whose release upload succeeded now reds an otherwise-complete release. Fails safe, but widens what can fail a release run; continue-on-error: true is the alternative if you'd rather it not gate. |
Other dimensions
- Correctness — the marker scheme reads clean end to end: per-target artifact names can't collide under
merge-multiple: true,sort -uis harmless,!cancelled()on both the marker steps and the guard job is the right choice in each place, and thestate == "uploaded" and .size > 0filter closes the stuck-asset hole. - Permissions —
download-artifact@v4for the current run goes through the Actions Results API with the runtime token, notGITHUB_TOKEN, so the guard'scontents: readnarrowing does not break the download. (Only cross-run downloads would needactions: read.) - Security — unchanged:
${{ matrix.target }}is the only expression reaching a shell and it's workflow-authored; tokens are passed viaenv:. - Performance — five tiny artifacts plus one short
ubuntu-24.04job per release. Negligible. - Testing — still not exercisable from a PR on a
push: tagsworkflow. The openoverwrite:finding in particular only surfaces during a re-run, i.e. when someone is already firefighting. - Documentation — the inline comments now carry the why for every non-obvious choice (
shell: bash, both!cancelled()sites, thestatefilter, the release-pre-exists assumption, and the empty-marker case). No user-facing docs change warranted.
…and match asset names literally
|
Claude finished @igorlukanin's task in 1m 22s —— View job Re-review of Full reviewTasks
The changes in
|
| Prior | Status |
|---|---|
upload-artifact 409 breaks re-run |
Fixed via overwrite: true. Resolved. |
| marker upload can redden a complete release | Fixed via continue-on-error: true. Resolved. |
grep -qx treats name as regex |
Fixed via -qxF. Resolved. |
| unreachable "matrix did not run" diagnostic | Fixed in 382dc5c (find … -exec cat). Resolved earlier. |
retry_on: error vs any |
Unchanged, thread left open. Answered and deferred to match file convention — non-blocking. |
New finding
| Severity | Location | Issue |
|---|---|---|
| Low | L873–878 | overwrite: true is delete-then-upload; with continue-on-error swallowing a failure after the delete, that target silently drops out of the guard's expected set. Only reachable on a re-run — which is the recovery path for a failed upload, so it's the one case where losing verification reproduces the gap. Narrow; retrying the marker upload instead of swallowing it would get both properties, but not worth blocking on. |
Other dimensions
- Correctness end to end — the marker scheme holds: per-target artifact names can't collide under
merge-multiple: true, one clean line per marker viaecho,sort -uharmless, the<<< "$expected"loop guarded by the preceding-ztest,state == "uploaded" and .size > 0closes the stuck-asset hole, and!cancelled()is the right choice at all three sites (both marker steps and the guard job). - Permissions —
download-artifact@v4for the current run uses the Actions Results API with the runtime token, so the guard'scontents: readnarrowing doesn't break it.--repopassed explicitly since the guard has no checkout. Both correct. - Security — unchanged:
${{ matrix.target }}is the only expression reaching a shell and it's workflow-authored; tokens go throughenv:rather than argv. - Performance — five tiny artifacts plus one short
ubuntu-24.04job per release. Negligible. - Testing — still not exercisable from a PR on a
push: tagsworkflow. The remaining low only surfaces during a re-run; the main paths (retry, guard, marker) will be validated by the next tagged release. - Documentation — inline comments now carry the why for every non-obvious choice (
shell: bash, all three!cancelled()sites, thestatefilter, the release-pre-exists assumption, the empty-marker case, and both new flags). No user-facing docs change warranted —install-cli.shbehavior is unchanged.
The v1.7.14 release shipped without
cube-aarch64-apple-darwin.tar.gz, so the documented install command404'd on every Apple Silicon Mac. The binary built fine — only the upload step failed, with a one-off
Connect Timeout Error (attempted address: api.github.com:443, timeout: 10000ms). Becausecube-clirunsfail-fast: falseand nothing depends on it, the rest of the release published normally and the gap was invisible until someone tried to install.Two changes:
nick-fields/retry@v3(the convention already used elsewhere in this workflow), 5 attempts with a 30s wait, so a single API blip no longer drops a platform. It now shells out togh release upload --clobberrather thansvenstaro/upload-release-action, since that action has no retry input of its own.shell: bashis set explicitly — the retry action defaults to powershell on Windows, where${GITHUB_REF_NAME}would not expand.cube-cli-assets-completejob runs after the matrix and fails the release if any of the five targets is missing from the release. A release that is missing a platform is now a red run instead of a silent 404.The missing v1.7.14 asset has been re-uploaded separately by re-running the failed job, so the install works on Apple Silicon again.
Only the
cube-cliupload path is touched here; the other fivesvenstaro/upload-release-actioncall sites (cubestored, native) have the same exposure but are left alone to keep this reviewable.CORE-694