mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
## What this PR does Finalize undrafted the release before retagging the rc images and pushing the cozy-installer chart, so release page announced version whose images and chart still returned `manifest unknown` (7m47s on v1.7.0: https://github.com/cozystack/cozystack/actions/runs/40864518300). Failed retag or chart push also left public release that re-run couldn't repair, because re-run looks for draft and finds none. Now draft lookup and `make_latest` decision are in own step `Resolve draft release`, before any registry write. Retag, chart and `Publish draft release` take the decision from its outputs, and publish goes last. Missing draft fails before anything is pushed, failed retag or chart leaves the draft for re-run. Body selection, orphaned draft repair, `prerelease` and restoring `latest` after older patch are unchanged. Deciding `latest` before the retag opens a window of minutes where two release PRs merged close together both decide they are newest, and the older line ends up with `latest` on release page, image `:latest` and `cozy-installer:latest`. So finalize runs one release at a time: job-level concurrency group built from the job's own `if:` (other closed PRs never join it), `cancel-in-progress: false` and `queue: max`, so third merged release waits instead of cancelling the pending one. Docs and comments in `tags.yaml` and `promote-rc.yaml` that said release is already public when finalize pushes the stable tag now say when it is published. Release checklist no longer says to undraft by hand when draft lookup fails. Closed-PR workflow runs from base branch, so supported lines get this in own PRs: #5480 (release-1.7) and #5481 (release-1.6). Tests: contract tests pin step order, that nothing publishes after failed registry step (no `continue-on-error`, no `if:` on publish, registry steps skip only for prerelease) and the concurrency group. Behaviour tests run both github-script steps under node against stubbed API (missing draft, orphaned draft, older patch after newer minor, all shipped changelog tags). Every new test fails against the old workflow, I also checked them against mutated copies of it. ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note fix(ci): finalize publishes the release page last, after the stable image tags and the cozy-installer chart exist, and finalizes one release at a time, so a release is no longer public while its images return manifest unknown ```