Repository navigation
chore(QTDI-3926): Make release push atomic and fail-closed - #1351
Conversation
Critic Round 1 — FindingsNo Blocker or Major findings. Files: release-git-common.sh (new), release-4-docker-image-creation.sh (mod), release-git-push-test.sh (new).
Verified: fetch failure and moved remote abort before any push; DRY_RUN pushes only the branch with --dry-run and updates no ref; remote-refusal case shows both refs rejected by the atomic push (pre-receive hook output seen in log). Approval gate: APPROVED — no Blocker or Major findings. 3 Minor noted (non-blocking). Signed: Claude Sonnet 5.5 |
🔍 Code Review — QTDI-3926Reviewed 3 files (shell scripts only; java-/tck- rules not applicable).
Severity counts: Critical fixed: 0, Warnings: 0, Info: 3. Signed: Claude Sonnet 5.5 |
Push the branch and the tag in one atomic operation instead of relying on --follow-tags, and abort before any push when the remote branch cannot be fetched or moved during the release. DRY_RUN keeps pushing the branch only, with --dry-run. Add an offline bare-repository simulation of the release push. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
9c38471 to
2eb3b40
Compare
There was a problem hiding this comment.
🟡 Changes recommended
A critical race remains because the fetched branch tip is not protected by a force-with-lease during the push, and the added scenario is not covered by the default build.
2 open issues
What changed in this PR
This PR hardens the Docker-stage release push by atomically publishing the release branch and tag, while validating the remote branch before pushing and adding an offline simulation of release scenarios.
Changes:
- Adds shared fail-closed remote-branch validation.
- Replaces the Docker-stage
--follow-tagspush with an atomic branch/tag push while preserving dry-run behavior. - Adds manual coverage for successful, refused, moved-branch, dry-run, and fetch-failure scenarios.
- The simulation is not integrated into the default build.
| File | Description |
|---|---|
| .jenkins/scripts/release/release-git-push-test.sh | Adds a manual offline bare-repository simulation covering successful and failed release-push scenarios. |
| .jenkins/scripts/release/release-git-common.sh | Adds shared remote-branch fetch and validation logic for release pushes. |
| .jenkins/scripts/release/release-4-docker-image-creation.sh | Uses the shared validation helper and performs atomic branch/tag publication while preserving branch-only dry-run behavior. |
Review effort: Lite
The 'Docker image creation' message printed the release version as the branch and the branch as the version. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ase push The fail-closed check and the push are separate steps: the remote branch could be deleted or rewound in between and the push would still publish the tag. Push with --force-with-lease on the commit that was just fetched, and add simulations of an advance, a rewind and a deletion of the branch between the check and the push. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|



0 New Issues
0 Fixed Issues
0 Accepted Issues
No data about coverage (62.90% Estimated after merge)
https://qlik-dev.atlassian.net/browse/QTDI-3926
Requirements
Why this PR is needed?
QTDI-3926: the release script pushed the branch and tag with
--follow-tags, which is not atomic. A moved or unreachable remote branch could leave the tag pushed without the branch (or vice versa) during a release.What does this PR adds (design/code thoughts)?
.jenkins/scripts/release/release-git-common.sh: pushes branch + tag in a singlegit push --atomic, and aborts before any push if the remote branch cannot be fetched or has moved during the release (fail-closed).release-4-docker-image-creation.shuses the helper.DRY_RUNstill pushes only the branch, with--dry-run.release-git-push-test.sh: offline bare-repository simulation of the release push (manual test, not wired into CI). Covers fetch failure, moved remote, DRY_RUN and remote refusal (both refs rejected).release-5/release-6unchanged (single-ref pushes).NO_DOCKER(pre-existing).Verification:
bash -nclean; simulation script passes locally. No Java changes, somvn verifyis not affected.AI contribution metrics
100%(174/174 changed lines)100%unavailable — no plan revision files foundAI generated code
https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code
🤖 Generated with Claude Code