Repository navigation
Refuse to make an empty patch release when tweak is 1 - #109489
Merged
alexey-milovidov merged 3 commits intoJul 7, 2026
Merged
Conversation
For a patch release the version tweak equals the number of commits since the previous release tag. A tweak of 1 means the only commit on top of the previous release is the automated post-release version bump, so there is nothing to release. Tagging it produces a spurious empty release such as `v25.8.28.1-lts` (whose follow-up version-bump PR ClickHouse#109440 was closed). Break the release in `ReleaseInfo.prepare` in that case. Recovery runs (`only-repo`/`only-docker`) rebuild an already-tagged release and do not tag, so the check is skipped there, mirroring the out-of-order check. Related: ClickHouse#109440
leshikus
marked this pull request as ready for review
July 6, 2026 12:16
Contributor
|
Workflow [PR], commit [c2e6e34] Summary: ✅ AI ReviewSummaryThis PR refines the empty patch-release guard in Final VerdictStatus: ✅ Approve |
Move the tweak==1 guard ahead of the out-of-order check in `ReleaseInfo.prepare`. An empty patch release (only the automated version bump since the previous tag) is the more fundamental "nothing to release" condition, and checking it first gives a clearer error. It also makes the guard reachable when replaying an old empty-release commit whose branch has since advanced (which otherwise trips the out-of-order check first).
The tweak==1 empty-release guard also fired on the first user-facing stable/lts release of a freshly cut branch: that release goes through the patch path with version.patch == 1, its previous tag is the non-user-facing vX.Y.1.1-new, and the single automated testing->stable version-update commit also yields tweak == 1. Blocking it was wrong — no stable/lts release exists on the branch yet. Extract the decision into ReleaseInfo._is_empty_patch_release and exempt the patch == 1 case. The post-release bump always increments patch, so an already-published branch is always at patch >= 2 on an empty rerun. Add unit tests covering the reject (patch>=2, tweak==1) and allow (patch==1 first release; tweak>1) paths. Reported by the AI reviewer on ClickHouse#109489
alexey-milovidov
approved these changes
Jul 7, 2026
Merged
via the queue into
ClickHouse:master
with commit Jul 7, 2026
9c09274
175 of 176 checks passed
maxknv
reviewed
Jul 8, 2026
Member
There was a problem hiding this comment.
@leshikus, the tests that run in CI are located in ./ci/tests/, right? lets move ./tests/ci/test_* there.
pull Bot
pushed a commit
to mikeyhodl/ClickHouse
that referenced
this pull request
Jul 10, 2026
The CI unit-test job runs `pytest ci/tests/` (see `ci/jobs/ci_tests_job.py`), so unit tests placed under `tests/ci/` were never executed in CI. Move the three recently added unit-test files there: - `test_create_release.py` - `test_cherry_pick_branches.py` - `test_pr_version_info.py` Each module under test still lives in `tests/ci/` and imports its siblings by bare name, so the import puts that directory on `sys.path` only for the duration of the import and removes it afterwards, mirroring the existing `ci/tests/test_download_release_packages.py`. Follow-up to ClickHouse#109489
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
The tweak==1 empty-release guard also fired on the first user-facing stable/lts release of a freshly cut branch: that release goes through the patch path with version.patch == 1, its previous tag is the non-user-facing vX.Y.1.1-new, and the single automated testing->stable version-update commit also yields tweak == 1. Blocking it was wrong — no stable/lts release exists on the branch yet. Extract the decision into ReleaseInfo._is_empty_patch_release and exempt the patch == 1 case. The post-release bump always increments patch, so an already-published branch is always at patch >= 2 on an empty rerun. Add unit tests covering the reject (patch>=2, tweak==1) and allow (patch==1 first release; tweak>1) paths. Reported by the AI reviewer on ClickHouse#109489
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
…-release Refuse to make an empty patch release when tweak is 1
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
The CI unit-test job runs `pytest ci/tests/` (see `ci/jobs/ci_tests_job.py`), so unit tests placed under `tests/ci/` were never executed in CI. Move the three recently added unit-test files there: - `test_create_release.py` - `test_cherry_pick_branches.py` - `test_pr_version_info.py` Each module under test still lives in `tests/ci/` and imports its siblings by bare name, so the import puts that directory on `sys.path` only for the duration of the import and removes it afterwards, mirroring the existing `ci/tests/test_download_release_packages.py`. Follow-up to ClickHouse#109489
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.
When creating a patch release, the version's
tweakcomponent equals the number of commits since the previous release tag (seeGit.tweak). Right after a release, the pipeline pushes an automated "Update autogenerated version to ... and contributors" commit to the release branch. If a patch release is then started on that HEAD without any real changes on top, the computedtweakis1— the only commit since the previous release is that version bump. Tagging it produces a spurious, empty patch release such asv25.8.28.1-lts.This adds a guard in
ReleaseInfo.prepare: for a patch release, if the computedtweakis1, the release is refused with a clear error. Recovery runs (only-repo/only-docker) rebuild an already-tagged release and do not tag, so the check is skipped there, mirroring the existing out-of-order check.Related: #109440
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Version info
26.7.1.639(included in26.7and later)