Check the release prerequisites before doing anything irreversible - #216
Merged
Conversation
There was a problem hiding this comment.
license-eye has totally checked 416 files.
| Valid | Invalid | Ignored | Fixed |
|---|---|---|---|
| 309 | 1 | 106 | 0 |
Click to see the invalid file list
- tools/releasing/.gitignore
wu-sheng
force-pushed
the
fix-release-script-noop-commit
branch
from
August 30, 2026 12:47
938e567 to
82cdc79
Compare
Cutting 0.11.0 stopped at "nothing to commit, working tree clean" and did nothing else. set_release_version ends by committing the version bump with a plain `git commit`, which exits non-zero when nothing is staged, and the script runs under `set -e`. Nothing is staged in the ordinary case: the guide tells the release manager to set Chart.yaml before starting, and the kustomize image tags are set in that same function precisely so the identical call inside `make release` is a no-op. The better prepared the repository, the more certainly the release aborted -- with a message that reads like success. Both release commits take --allow-empty now. That also closes something quieter: the regeneration step a few lines down does `git commit --amend`, and with no commit of its own to amend it would have rewritten master's HEAD, folding generated files into someone else's commit and changing the tree the tag was about to point at. The deeper problem is that release.sh checked almost nothing up front. It verified the signing key and the tools, then went straight on to push a tag -- so a prerequisite discovered late is not merely inconvenient, recovering means deleting a tag from the remote. tools/releasing/preflight.sh now checks the lot first: the tools, the signing key including whether it carries an @apache.org UID and appears in the published KEYS file, gh authentication, both dist URLs, that Chart.yaml and the changelog agree on the version and that its tag is still free, that no abandoned candidate is sitting in dist/dev, and that the tree is clean with the generated chart files in sync. It reports every problem rather than stopping at the first. release.sh runs it as step 1 and takes the resolved signing key from it, rather than detecting one itself as it used to -- the detection existed in both places, which is exactly the kind of second copy that drifts. Running it before the signer prompt also means a release manager is not asked to confirm a key and only then told that svn is unreachable. It is explicit about what it cannot establish from a developer machine rather than implying otherwise: svn commit access, because testing it means writing to the ASF dist area; the Docker Hub repository secrets, because listing them needs an admin token; and whether the Docker Hub publish path works at all, since it has never run. Also adds tools/releasing/.gitignore, mirroring apache/skywalking's, with the licence header this repository requires on one -- release.sh clones into that directory and stages an svn working copy beside it, and both were showing up as untracked in the release manager's checkout.
wu-sheng
force-pushed
the
fix-release-script-noop-commit
branch
from
August 30, 2026 13:00
82cdc79 to
9fa9e6d
Compare
kezhenxu94
approved these changes
Aug 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cutting 0.11.0 stopped immediately:
and nothing else happened — no tag, no artifacts, no upload.
The abort
set_release_versionends with a plaingit commit, which exits non-zero when nothing isstaged, and the script runs under
set -e. Nothing is staged in the ordinary case: theguide tells you to set
Chart.yamlbefore starting, and the kustomize image tags are set inthat same function specifically so the identical call inside
make releaseis a no-op. Thebetter prepared the repository, the more certainly the release aborted — with a message that
reads like success.
Both release commits take
--allow-emptynow. That also closes something quieter: theregeneration step a few lines down does
git commit --amend, and with no commit of its own toamend it would have rewritten
master's HEAD — folding generated files into someone else'scommit and changing the tree the tag was about to point at.
The deeper problem
release.shchecked almost nothing up front. It verified the signing key and the tools, thenwent straight on to push a tag — so a prerequisite discovered late is not merely
inconvenient: recovering means deleting a tag from the remote.
tools/releasing/preflight.shnow checks the lot first, and reports every problem rather thanstopping at the first:
release.shsources it and callsrun_preflightas its step 2, so the two cannot drift.It is deliberately explicit about what it cannot establish from a developer machine, rather
than implying otherwise: svn commit access (testing it means writing to the ASF dist area), the
Docker Hub repository secrets (listing them needs an admin token), and whether the Docker Hub
publish path works at all — it has never run.
Also
tools/releasing/.gitignore, mirroringapache/skywalking's, carrying the licence header thisrepository requires on one.
release.shclones into that directory and stages an svn workingcopy beside it; both were showing up as untracked in the release manager's checkout.
Verified
Reproduced the abort under
set -e(exit 1, the line after the commit never runs) and confirmedthe fix (exit 0, the amend lands on the script's own commit with the base commit still its
parent). Ran
preflight.shagainst this machine both dirty and clean — it correctly blocked onan uncommitted tree and passed once committed.
No damage from the aborted run
No
v0.11.0tag locally or on the remote;dist/dev/skywalking/swckis still empty.