Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Apache Kafka Notes Generate

From Leeroopedia


Knowledge Sources
Domains Release_Engineering, Documentation
Last Updated 2026-02-09 12:00 GMT

Overview

Concrete tool for generating HTML release notes from JIRA data provided by the Kafka release module.

Description

The notes module generates release notes by querying Apache JIRA for all issues resolved in a given version. It uses the jira-python library to paginate through results, filters out unresolved issues, categorizes them by issue type, and renders an HTML document. The module also validates release readiness by checking that no open issues remain targeted at the release.

Usage

Run this module as a standalone script (python notes.py <version>) or import the query and filter_unresolved functions for programmatic use in a release pipeline.

Code Reference

Source Location

  • Repository: Apache Kafka
  • File: release/notes.py
  • Lines: L30-174

Signature

JIRA_BASE_URL = 'https://issues.apache.org/jira'
MAX_RESULTS = 100

def query(query, **kwargs):
    """
    Fetch all issues matching the JQL query from JIRA.
    Paginates through results using MAX_RESULTS per page.
    Additional kwargs forwarded to jira.search_issues.
    """

def filter_unresolved(issues):
    """
    Filters issues with unresolved status.
    Unresolved resolutions include None and other non-fix statuses.
    """

Import

from jira import JIRA
# Module used as: python notes.py <version>

I/O Contract

Inputs

Name Type Required Description
version str Yes Kafka release version (e.g., "3.7.0")
query (JQL) str Yes JIRA Query Language string

Outputs

Name Type Description
RELEASE_NOTES.html file HTML-formatted release notes written to stdout
query returns list List of JIRA issue objects matching the query

Usage Examples

Generate Release Notes

# Command-line usage
python notes.py 3.7.0 > RELEASE_NOTES.html
# Programmatic usage
from notes import query, filter_unresolved

issues = query(f'project = KAFKA AND fixVersion = "3.7.0"')
unresolved = filter_unresolved(issues)
if unresolved:
    print(f"WARNING: {len(unresolved)} unresolved issues remain")

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment