Implementation:Apache Kafka Git Push And Vote Template
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Release_Engineering, Governance |
| Last Updated | 2026-02-09 12:00 GMT |
Overview
Concrete tool for pushing git tags and generating RC vote email templates provided by the Kafka release module.
Description
The git module provides push_ref for pushing tags to the remote repository. The templates module provides rc_vote_email_text which generates a complete vote email template with links to all staged artifacts, documentation, Docker images, Maven staging, and CI builds.
Usage
Import these functions at the final phase of release candidate staging. Call push_ref to publish the tag, then rc_vote_email_text to generate the vote email for the mailing lists.
Code Reference
Source Location
- Repository: Apache Kafka
- File: release/git.py (L123-126), release/templates.py (L192-248)
Signature
def push_ref(ref, remote=push_remote_name, **kwargs):
"""Pushes a git ref (tag or branch) to the specified remote."""
def rc_vote_email_text(release_version, rc, rc_tag, dev_branch, docs_version):
"""
Generates the RC vote email template with links to:
- Release notes, KEYS file, source/binary artifacts
- Docker images, Maven staging, Javadoc
- Git tag, documentation, protocol docs
- CI build links
Returns a multi-line string with To/Subject/Body.
"""
Import
from git import push_ref
from templates import rc_vote_email_text
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| ref | str | Yes | Git ref to push (tag name) |
| remote | str | No | Remote name (default: "apache-github") |
| release_version | str | Yes | Release version string (e.g., "3.7.0") |
| rc | int | Yes | Release candidate number (e.g., 0) |
| rc_tag | str | Yes | RC tag name (e.g., "3.7.0-rc0") |
| dev_branch | str | Yes | Development branch name |
| docs_version | str | Yes | Documentation version for URLs |
Outputs
| Name | Type | Description |
|---|---|---|
| push_ref | None | Tag pushed to remote repository |
| rc_vote_email_text returns | str | Complete vote email template text |
Usage Examples
Push Tag and Generate Vote Email
from git import push_ref
from templates import rc_vote_email_text
rc_tag = "3.7.0-rc0"
# Push the release tag
push_ref(rc_tag)
# Generate vote email
email = rc_vote_email_text(
release_version="3.7.0",
rc=0,
rc_tag=rc_tag,
dev_branch="3.7",
docs_version="37"
)
print(email)
Related Pages
Implements Principle
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment