Skip to content

Improve releaseWizard's logchange.py to handle LTS release#4425

Merged
janhoy merged 2 commits into
apache:mainfrom
janhoy:logchange-script-lts-support
May 13, 2026
Merged

Improve releaseWizard's logchange.py to handle LTS release#4425
janhoy merged 2 commits into
apache:mainfrom
janhoy:logchange-script-lts-support

Conversation

@janhoy
Copy link
Copy Markdown
Contributor

@janhoy janhoy commented May 13, 2026

This PR improves logchange.py and the release wizard to handle two scenarios:

LTS release support in forward-port: A new --latest-lts-stable-branch argument causes changelog commits to also be forward-ported to the LTS stable branch (e.g. branch_9x) when releasing from a major-version branch that is the current LTS line. CHANGELOG.md and version-summary.md are never cherry-picked — they are always regenerated fresh on each target branch to avoid cross-major-version conflicts.

RC-number labelling in prepare: A new --rc-number argument (default: 1) appends RC<n> to commit messages for RC2+ releases.

Atomic two-commit workflow (both prepare and forward-port): the YAML/date-file changes are committed first (commit A), then logchangeGenerate runs and its output (CHANGELOG.md + version-summary.md) is committed separately (commit B). This avoids staging stale generated files alongside source YAML.

The release wizard is updated to expose is_lts_release and latest_lts_stable_branch in Jinja context and to conditionally pass the new flags in the rendered shell commands.

Testing

Tested with a shell simulation simulate.sh (gist) that replays a full realistic multi-branch release sequence in an isolated local repo:

  • Initial state: v9.10.0 (on branch_9x + main) and v10.0.0 (on main / branch_10x) already released.
  • Then simulates six releases in order: 10.1.0 (regular), 9.10.1 (LTS bugfix), 10.1.1 (stable bugfix), 9.11.0 (LTS minor), 9.11.1 (LTS bugfix) — each going through prepare and forward-port with the appropriate branch
    topology.
  • LTS releases use --latest-lts-stable-branch branch_9x; non-LTS releases omit it.
  • Verification step confirms all 7 version folders are present on main with the correct YAML files, no conflicts, and changelog/unreleased/ contains only .gitkeep.

This comment was marked as resolved.

Address copilot review comments
@janhoy
Copy link
Copy Markdown
Contributor Author

janhoy commented May 13, 2026

Some tweaks after more simulation. Here is the summary for the last simulation run I did locally using the simulate.sh script:

╔══════════════════════════════════════════════════════════╗
║  VERIFICATION                                          ║
╚══════════════════════════════════════════════════════════╝
Switched to branch 'main'

Version folders present on main:
  logchange-config.yml
  v10.0.0
  v10.1.0
  v10.1.1
  v9.10.0
  v9.10.1
  v9.11.0
  v9.11.1

YAML files per version folder:
  v10.0.0:     drop-xml-handler fluent-java-client jetty12-upgrade 
  v10.1.0:     1010-cache-leak-fix 1010-semantic-search 1010-zookeeper-39 
  v10.1.1:     1011-npe-doclist 
  v9.10.0:     lucene-910-upgrade range-facet-perf xss-fix 
  v9.10.1:     9101-oom-large-nested 9101-tls-cert-bypass 
  v9.11.0:     9110-bcrypt-auth 9110-drop-jdk11-note 9110-lts-incremental-repl 
  v9.11.1:     9111-config-reload-fix 9111-repl-failover-fix 9111-thread-leak-softcommit 

Expected YAML files per version:
  v9.10.0:     xss-fix  lucene-910-upgrade  range-facet-perf
  v9.10.1:     9101-tls-cert-bypass  9101-oom-large-nested
  v10.0.0:     fluent-java-client  drop-xml-handler  jetty12-upgrade
  v10.1.0:     1010-semantic-search  1010-cache-leak-fix  1010-zookeeper-39
  v10.1.1:     1011-npe-doclist
  v9.11.0:     9110-bcrypt-auth  9110-lts-incremental-repl  9110-drop-jdk11-note
  v9.11.1:     9111-repl-failover-fix  9111-thread-leak-softcommit  9111-config-reload-fix

CHANGELOG.md version headings on main:
  [10.1.1] - 2025-10-01
  [10.1.0] - 2025-06-01
  [10.0.0] - 2025-03-01
  [9.11.1] - 2026-02-01
  [9.11.0] - 2025-12-01
  [9.10.1] - 2025-08-15
  [9.10.0] - 2024-12-01

Unreleased folder on release branches (should contain only .gitkeep after prepare):
  ✓ branch_10_1:   unreleased/ is clean
  ✓ branch_9_10:   unreleased/ is clean
  ✓ branch_9_11:   unreleased/ is clean

Stale unreleased file check — 9111-config-reload-fix.yml:
  → This file had a tweaked title on branch_9_11, so git would not auto-remove it from other branches.
  ✓ main:          stale file correctly absent from unreleased/
  ✓ branch_9x:     stale file correctly absent from unreleased/
  ✓ branch_10x:    stale file correctly absent from unreleased/

Unreleased folder on main (may have pending entries for future releases):
  future-streaming-api.yml

╔══════════════════════════════════════════════════════════╗
║  SIMULATION SUMMARY                                    ║
╚══════════════════════════════════════════════════════════╝

Releases simulated:
  Version     Released      Changes       Forward-ported to
  ─────────────────────────────────────────────────────────────────────
  ✓ v10.1.0  2025-06-01  3 changes  → branch_10x, main
  ✓ v9.10.1  2025-08-15  2 changes  → branch_10x, main, branch_9x
  ✓ v10.1.1  2025-10-01  1 change   → branch_10x, main
  ✓ v9.11.0  2025-12-01  3 changes  → branch_10x, main, branch_9x
  ✓ v9.11.1  2026-02-01  3 changes  → branch_10x, main, branch_9x  [includes tweaked-title stale-file test]

Branch state after simulation:
    branch_10_1
    branch_10x
    branch_9_10
    branch_9_11
    branch_9x
  * main

Result checks:
  ✓ 7/7 expected version folders present on main
  ✓ All release branches have clean unreleased/ folders after prepare
  ✓ Tweaked-title stale unreleased file correctly removed from all branches by forward-port

  → logchange script tested: /Users/janhoy/git/solr/dev-tools/scripts/logchange.py
  → Total elapsed time: 23s

@janhoy janhoy changed the title Improve releaseWizard'd logchange.py to handle LTS release Improve releaseWizard's logchange.py to handle LTS release May 13, 2026
@janhoy janhoy merged commit 7a0a004 into apache:main May 13, 2026
4 of 5 checks passed
@janhoy janhoy deleted the logchange-script-lts-support branch May 13, 2026 22:17
janhoy added a commit that referenced this pull request May 13, 2026
janhoy added a commit that referenced this pull request May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants