-
Notifications
You must be signed in to change notification settings - Fork 809
SOLR-17619 Use logchange for changelog management #3044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
However it doesn't work because a conflict of Groovy transitive dependencies between this plugin and elsewhere in our build: @malliaridis I could really use your help on this aspect please. Build plugins seem special/different from a dependency standpoint. |
|
@dsmiley Hello, check logchange/logchange#397 (comment) |
|
Marking the dependency to Thanks for addressing this @marwin1991 so quickly. 💪 |
And move logchange config
|
I added a gradle task that generates a change YAML. This is tailored for our project, pre-fills some things, and is overall less of a hassle that |
malliaridis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested changes on Windows, but fails with
Could not save markdown to file: .\changelog\unreleased\0001-adding-changelog-support.yml because: .\changelog\unreleased\0001-adding-changelog-support.ymlThe file is successfully created, but is empty. As this is still a draft, consider this as an early feedback. :)
I also feel overwhelmed with all these dialogs popping up over and over again, but the questions that are asked are valuable if the answers are included in the changelog.
What I saw is that you are getting some of the data that are asked from the branch name, which would reduce the input dialogs. Is it possible to disable the specific questions in case the value could be fetched?
|
I think the plugin's generation of the YAML is too problematic and has too little value-add. This draft PR includes a task "generateChangeYaml" that generates it; we should use that instead. |
|
Hello, We can improve commands:
add:
questions:
fileName:
skip: true
value: "changelog/unreleased/${branchName}.yml"
variables:
- name: branchName
command: "git rev-parse --abbrev-ref HEAD"But maybe adding new entry can be handle by your own custom task with needs suited for you? Generally its pure yml file and in 99% cases I use copy paste :) I use add task (mvn mojo) for renovate post task to create entries in no interactive mode about dependency updates. For dependabot logchange/logchange#429 |
|
Maybe the "add" feature of the logchange plugin is more useful to Maven. In Gradle, with native scripting, it was quite easy to tailor something specific to the project's needs. |
janhoy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial comments. Have not taken the gradle stuff for a spin yet.
Suppose we'll write a script to convert CHANGES.txt to a changelog/archive.md file so the history can be preserved, see https://github.com/logchange/logchange?tab=readme-ov-file#archives
Support PR ref More author details
# Conflicts: # gradle/template.gradle.properties
dsmiley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for carrying the torch forward here!
Co-authored-by: David Smiley <dsmiley@apache.org>
# Conflicts: # gradle/template.gradle.properties
Use dev-docs link in comment
- Nicer filenames - Extract jira issues from title / commit msg
- Nicer filenames - Extract jira issues from title / commit msg
# Conflicts: # dev-tools/scripts/addDepsToChanges.py # dev-tools/scripts/scriptutil.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a new structured approach to changelog management using the logchange tool. Instead of maintaining a monolithic CHANGES.txt file, changes are now tracked as individual YAML files in versioned directories, which are then compiled into a CHANGELOG.md file.
Key changes:
- Replaces
CHANGES.txtwith YAML-based changelog fragments inchangelog/directory structure - Implements logchange gradle plugin for changelog generation and release management
- Adds tooling for creating, validating, and migrating changelog entries
Reviewed Changes
Copilot reviewed 27 out of 29 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
solr/test-framework/src/java/org/apache/solr/util/ExternalPaths.java |
Updates source home detection to use build.gradle instead of CHANGES.txt |
solr/solr-ref-guide/modules/upgrade-notes/pages/solr-upgrade-notes.adoc |
Updates documentation references from CHANGES.txt to CHANGELOG.md |
solr/packaging/build.gradle |
Updates distribution to include CHANGELOG.md instead of CHANGES.txt |
solr/licenses/README.committers.txt |
Updates documentation reference to generic "changelog" |
gradle/validation/rat-sources.gradle |
Excludes new changelog files from RAT license validation |
gradle/template.gradle.properties |
Adds changelog generator configuration properties |
gradle/libs.versions.toml |
Adds logchange plugin dependency and version |
gradle/documentation/changes-to-html/changes2html.py |
New Python script to convert CHANGELOG.md to HTML |
gradle/documentation/changes-to-html/changes2html.pl |
Removes legacy Perl script for CHANGES.txt conversion |
gradle/documentation/changes-to-html.gradle |
Updates task to use Python script for CHANGELOG.md conversion |
gradle/changelog.gradle |
New gradle file implementing changelog generation tasks |
dev-tools/scripts/smokeTestRelease.py |
Updates release validation to check for CHANGELOG.md |
dev-tools/scripts/scriptutil.py |
Adds utility function for extracting JIRA issues from titles |
dev-tools/scripts/releasedJirasRegex.py |
Removes script that extracted JIRA regex from CHANGES.txt |
dev-tools/scripts/releaseWizard.yaml |
Updates release wizard to use new changelog workflow |
dev-tools/scripts/changes2logchange.py |
New migration script to convert CHANGES.txt to YAML format |
dev-tools/scripts/addVersion.py |
Removes CHANGES.txt update logic from version addition |
dev-tools/scripts/addDepsToChanges.py |
Updates dependency update script to create YAML entries |
dev-tools/scripts/README.md |
Updates documentation for script changes |
dev-docs/git.adoc |
Removes note about CHANGES.txt cherry-pick issues |
dev-docs/changelog.adoc |
New comprehensive documentation for changelog workflow |
changelog/logchange-config.yml |
Configuration file for logchange tool |
changelog/README.md |
Brief documentation about new changelog process |
CHANGELOG.md |
Dummy changelog file for testing |
.github/workflows/validate-changelog.yml |
New workflow to validate changelog entries in PRs |
.github/PULL_REQUEST_TEMPLATE.md |
Adds changelog entry checklist item |
.editorconfig |
Adds configuration for releaseWizard.yaml |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Add validation of changelog files Fix some comments by Copilot
Review changes
Co-authored-by: David Smiley <dsmiley@apache.org> (cherry picked from commit 9d0a652)
Co-authored-by: David Smiley <dsmiley@apache.org> (cherry picked from commit 9d0a652)
Co-authored-by: David Smiley <dsmiley@apache.org> (cherry picked from commit 9d0a652)
|
Thanks @janhoy ! |
https://issues.apache.org/jira/browse/SOLR-17619
See logchange/logchange#397
run
./gradlew addfor the wizard-style gradle task, or use our own simpler template./gradlew writeChangelogIncluded in this PR
addVersion.pyandaddDeps2changes.py.