You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Copilot (via GitHub)" <gi...@apache.org> on 2026/05/11 13:21:34 UTC

Re: [PR] New logchange.py script to simplify changelog in wizard [solr]

Copilot commented on code in PR #4413:
URL: https://github.com/apache/solr/pull/4413#discussion_r3219210896


##########
dev-tools/scripts/releaseWizard.yaml:
##########
@@ -887,6 +749,77 @@ groups:
   - prerequisites
   is_in_rc_loop: true
   todos:
+  - !Todo
+    id: changelog_update_rc
+    title: Prepare changelog for RC{{ rc_number }}
+    description: |
+      Moves changelog entries into `changelog/v{{ release_version }}/` and
+      regenerates `CHANGELOG.md` without a release date (the date is written
+      post-vote by the *forward_port_changelog* task in the publish phase).
+
+      The script is smart about which RC this is:
+
+      * **RC1**: `changelog/v{{ release_version }}/` does not yet exist, so the
+        script runs `logchangeRelease --releaseDate none` to move every file from
+        `changelog/unreleased/` into the new version folder.
+      * **RC2+**: the version folder already exists, so the script copies only the
+        *new* files present in `changelog/unreleased/` that are not yet in the
+        version folder, then re-generates `CHANGELOG.md`.
+
+      The result is committed to `{{ release_branch }}` only.  Cherry-picking to
+      `{{ stable_branch }}` and `main` is deferred until after a successful vote
+      (see *forward_port_changelog* in the publish phase).
+
+      Can be run standalone:
+
+        python3 dev-tools/scripts/logchange.py prepare \
+          --version {{ release_version }} \
+          --release-branch {{ release_branch }}
+    depends: dependency_updates_changes
+    commands: !Commands
+      root_folder: '{{ git_checkout_folder }}'
+      commands_text: Prepare changelog folder and regenerate CHANGELOG.md for RC{{ rc_number }}
+      confirm_each_command: false
+      commands:
+      - !Command
+        cmd: python3 -u dev-tools/scripts/logchange.py prepare --version {{ release_version }} --release-branch {{ release_branch }} --gradle-cmd {{ gradle_cmd }} --commit
+        comment: Move unreleased entries to version folder, regenerate CHANGELOG.md, and commit
+        logfile: changelog-update-rc.log
+        tee: true
+      - !Command
+        # Note: uses 'origin' as the remote. If your remote has a different name,
+        # run manually: git push <remote> {{ release_branch }}
+        cmd: git push origin {{ release_branch }}
+        comment: Push prepared changelog to {{ release_branch }}

Review Comment:
   `changelog_update_rc` pushes `{{ release_branch }}` before `validate_changelog_unreleased` runs. That means a broken changelog state could get pushed upstream even if validation fails. Consider moving the `git push` into a separate task that depends on successful validation (or make it opt-in) to keep remote branches clean.



##########
dev-tools/scripts/README.md:
##########
@@ -182,6 +182,28 @@ Each YAML file complies with the schema outlined in `dev-docs/changelog.adoc`.
     # Default behavior
     python3 dev-tools/scripts/changes2logchange.py solr/CHANGES.txt
 
+### logchange.py
+
+Handles changelog git operations for each release candidate and the final
+post-vote forward-porting to other branches. Integrated into the Release Wizard
+but can also be run standalone. See `dev-docs/changelog.adoc` section 5.4 for details.

Review Comment:
   The PR description mentions a new `dev-tools/scripts/logchange.py` script, but the implementation/docs here introduce `dev-tools/scripts/changelogRelease.py`. To avoid confusion for reviewers and future readers, align the PR description (or naming) with what’s actually added.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org