This is an automated email from the ASF dual-hosted git repository.
showuon pushed a commit to branch 4.0
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/4.0 by this push:
new 3901c8519ee KAFKA-19166: Fix RC tag in release script (#19518)
3901c8519ee is described below
commit 3901c8519eed751fd1ba659b4f12b61087f8ed4f
Author: David Arthur <[email protected]>
AuthorDate: Tue Apr 22 05:04:22 2025 -0400
KAFKA-19166: Fix RC tag in release script (#19518)
The release script was pushing the RC tag off of a temporary branch that
was never merged back into the release branch. This meant that our RC
and release tags were detached from the rest of the repository.
This patch changes the release script to merge the RC tag back into the
release branch and pushes both the tag and the branch.
Reviewers: Luke Chen <[email protected]>
---
release/git.py | 8 ++++++--
release/release.py | 4 +++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/release/git.py b/release/git.py
index 61de830ecea..9cb106df2fd 100644
--- a/release/git.py
+++ b/release/git.py
@@ -128,8 +128,12 @@ def create_tag(tag, **kwargs):
cmd(f"Creating git tag {tag}", ["git", "tag", "-a", tag, "-m", tag],
**kwargs)
-def push_tag(tag, remote=push_remote_name, **kwargs):
+def push_ref(ref, remote=push_remote_name, **kwargs):
__defaults(kwargs)
- cmd("Pushing tag {tag} to {remote}", f"git push {remote} {tag}")
+ cmd(f"Pushing ref {ref} to {remote}", f"git push {remote} {ref}")
+def merge_ref(ref, **kwargs):
+ __defaults(kwargs)
+ cmd(f"Merging ref {ref}", f"git merge {ref}")
+
diff --git a/release/release.py b/release/release.py
index b3a428f6516..d0cba6f1782 100644
--- a/release/release.py
+++ b/release/release.py
@@ -297,6 +297,7 @@ textfiles.replace(f"{repo_dir}/docs/js/templateData.js",
"-SNAPSHOT", "", regex=
git.commit(f"Bump version to {release_version}")
git.create_tag(rc_tag)
git.switch_branch(starting_branch)
+git.merge_ref(rc_tag)
# Note that we don't use tempfile here because mkdtemp causes problems with
being able to determine the absolute path to a file.
# Instead we rely on a fixed path
@@ -367,7 +368,8 @@ confirm_or_fail("Have you sufficiently verified the release
artifacts?")
print(templates.deploy_instructions())
confirm_or_fail("Have you successfully deployed the artifacts?")
confirm_or_fail(f"Ok to push RC tag {rc_tag}?")
-git.push_tag(rc_tag)
+git.push_ref(rc_tag)
+git.push_ref(starting_branch)
# Move back to starting branch and clean out the temporary release branch
(e.g. 1.0.0) we used to generate everything
git.reset_hard_head()