Skip to content

releaseWizard: fix changelog forward-port for a release on an older… - #5021

Open
dsmiley wants to merge 1 commit into
apache:mainfrom
dsmiley:releaseWizard-forward-port-fix
Open

dsmiley wants to merge 1 commit into
apache:mainfrom
dsmiley:releaseWizard-forward-port-fix

Conversation

@dsmiley

@dsmiley dsmiley commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

… major branch

logchange.py forward-port failed releasing 9.11.0: it tried to cherry-pick 9.x feature commits onto branch_10x and main.

  • Only cherry-pick commits touching changelog/v{version}/. Selecting everything under changelog/ picked up every feature commit with a changelog entry since the release branch diverged from the target.
  • Pull each target branch (fast-forward only) before cherry-picking, so the final push isn't rejected.
  • Resolve modify/delete conflicts confined to changelog/unreleased/ by removing the entry; -X ours doesn't settle those. Skip a pick that is already applied.
  • Discard other versions' regenerated version-summary.md files, which otherwise block the next checkout.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

…ajor branch

logchange.py forward-port failed releasing 9.11.0: it tried to cherry-pick 9.x feature commits onto branch_10x and main.

* Only cherry-pick commits touching changelog/v{version}/. Selecting everything under changelog/ picked up every feature commit with a changelog entry since the release branch diverged from the target.
* Pull each target branch (fast-forward only) before cherry-picking, so the final push isn't rejected.
* Resolve modify/delete conflicts confined to changelog/unreleased/ by removing the entry; -X ours doesn't settle those. Skip a pick that is already applied.
* Discard other versions' regenerated version-summary.md files, which otherwise block the next checkout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dsmiley
dsmiley requested a review from janhoy October 4, 2026 18:39
@dsmiley

dsmiley commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Disclaimer: I don't do python. Just vibing with Claude here as triage issues I found. Nonetheless it had this to say when I asked for verification:

 What the real run exercised:                                                                                                                            │ 120 +    else:                                                                          
                                                                                                                                                          │ 121 +        print("  Nothing left to apply — skipping.")                               
  - Narrowed commit selection: 6 changelog-only commits per target instead of 77.                                                                         │ 122 +        git(["cherry-pick", "--skip"], cwd=git_root)                               
  - Pull before pick: all three targets fast-forwarded (they were 77, 71 and 16 behind).                                                                  │ 123 +    return True                                                                    
  - Conflict resolution: modify/delete conflicts in changelog/unreleased/ were auto-removed and the pick continued — confirmed in the log for branch_9x (4│ 124 +                                                                                   
    files).                                                                                                                                               │ 125 +                                                                                   
  - Restore after regenerate: the stray v10.0.0/version-summary.md change no longer blocked the checkout of branch_9x.                                    │ 126  def strip_unreleased_block(changelog_path: Path, dry_run=False):                   
                                                                                                                                                          │ 127      """Remove the [unreleased] block that logchangeGenerate emits.                 
  Caveats worth stating honestly:                                                                                                                         │ 128                                                                                     
                                                                                                                                                          │ 398          msg_b = f"Regenerate CHANGELOG.md for v{version}"                          
  - Two runs, not one clean pass. The first run did branch_10x and main, then failed before branch_9x. I added the restore fix and the second run         │ 399          print(f"  Committing: {msg_b!r}")                                          
    finished. The final script has not done a start-to-finish run from a clean state.                                                                     │ 400          git(["commit", "-m", msg_b], cwd=git_root, dry_run=dry_run)                
  - Skip-empty-pick path never ran. On the re-run, git reported 0 commits to pick for branch_10x and main, so that code is untested.                      │ 401 +    git(["restore", "changelog/"], cwd=git_root, dry_run=dry_run)                  
  - --push was not used. You pushed by hand, so the script's push step is untested with these changes (it wasn't modified).                               │ 402                                                                                     
  - --dry-run not run with the changes.                                                         

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant