Skip to content

Commit 78039a7

Browse files
committed
SOLR-17979 RM script changes for 9.10 release
1 parent f8223bc commit 78039a7

File tree

7 files changed

+1938
-90
lines changed

7 files changed

+1938
-90
lines changed

dev-docs/changelog.adoc

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,91 @@ links:
155155
url: https://issues.apache.org/jira/browse/SOLR-17960
156156
----
157157

158+
=== 6.3 Changelog validation tool
159+
160+
There is a tool `dev-tools/scripts/validateChangelogs.py` that will do a
161+
cross-branch validation of changelog folders. It takes no arguments and
162+
discovers the branch structure automatically, and checks that each branch
163+
(unstable, stable, release, previous-stable, previous-bugfix) are in sync
164+
with remote and "clean". Then it checks that the changelog folders are the
165+
same across branches and computes some statistics on how many unreleased
166+
features are from each branch.
167+
168+
The tool can also output a consolidated `CHANGELOG.md` file which calculates
169+
what (unreleased) features are likely to be released in what version. This
170+
resembles what we used to have in our `CHANGES.txt` on main branch before.
171+
The tool is integrated in the releaseWizard.
172+
173+
usage: validateChangelogs.py -h
174+
175+
Example report output (Json or Markdown):
176+
177+
[source,json,title=Example json report]
178+
----
179+
{
180+
"success": false,
181+
"errors": [
182+
"Folder v9.8.1 not found on branches: {'branch_9_9'}",
183+
"Folder v9.9.0 not found on branches: {'branch_9_9'}"
184+
],
185+
"warnings": [],
186+
"branch_report": {
187+
"branch_9_9": {
188+
"version": "9.9.1",
189+
"has_changelog_folder": false,
190+
"id": "previous_major_bugfix"
191+
},
192+
"branch_9x": {
193+
"version": "9.10.0",
194+
"unreleased_count": 31,
195+
"id": "previous_major_stable",
196+
"new_count": 31,
197+
"new": [
198+
"SOLR-17541-deprecate -cloudhttp2solrclient-builder.yml",
199+
"SOLR-17619 Use logchange for changelog management.yml"
200+
],
201+
"not_in_newer_count": 1,
202+
"not_in_newer": [
203+
"SOLR-17541-deprecate -cloudhttp2solrclient-builder.yml"
204+
]
205+
},
206+
"branch_10_0": {
207+
"version": "10.0.0",
208+
"unreleased_count": 146,
209+
"id": "release",
210+
"new_count": 5,
211+
"new": [
212+
"GITHUB#3666-removing redundant check if field exists in.yml",
213+
"SOLR-12089-remove deprecated -breaksugestiontiebreaker-.yml",
214+
"SOLR-14070-deprecate cloudsolrclient-s zookeeper hosts.yml"
215+
],
216+
"not_in_newer_count": 2,
217+
"not_in_newer": [
218+
"SOLR-16562-solr-16578- upgrade caffeine to 3-1-4 and.yml",
219+
"SOLR-17012-update apache hadoop to 3-3-6 and apache curator.yml"
220+
]
221+
},
222+
"branch_10x": {
223+
"version": "10.1.0",
224+
"unreleased_count": 147,
225+
"id": "stable",
226+
"new_count": 2,
227+
"new": [
228+
"PR#3758-logs- removed webapp-solr and also removed from.yml",
229+
"SOLR-17963-these solrcloud commands no longer aquire locks.yml"
230+
]
231+
},
232+
"main": {
233+
"version": "11.0.0",
234+
"unreleased_count": 147,
235+
"id": "main",
236+
"new_count": 0,
237+
"new": []
238+
}
239+
}
240+
}
241+
----
242+
158243
== 7. Further Reading
159244

160245
* xref:https://github.com/logchange/logchange[Logchange web page]

dev-tools/scripts/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,27 @@ Each YAML file complies with the schema outlined in `dev-docs/changelog.adoc`.
182182
# Default behavior
183183
python3 dev-tools/scripts/changes2logchange.py solr/CHANGES.txt
184184

185+
### validateChangelogs.py
186+
187+
Validates changelog folder structure and feature distribution across development branches (main, stable, release).
188+
Ensures all changelog/vX.Y.Z folders are identical, no released files exist in unreleased folder, and generates
189+
a consolidated CHANGELOG.md that shows expected versions for each unreleased change. This will resemble the CHANGES.txt
190+
file we used to have on the main branch. The script also warns about the same JIRA being mentioned across files.
191+
192+
usage: validateChangelogs.py [<options>...]
193+
194+
Validate Solr changelog structure across branches
195+
196+
options:
197+
-h, --help show this help message and exit
198+
-r, --report-file PATH File to write report to (default: stdout)
199+
-c, --changelog-file PATH File to write generated CHANGELOG.md preview to
200+
-w, --work-dir PATH Working directory (default TEMP dir)
201+
--fetch-remote Fetch fresh branch list from remote
202+
-f, --format {md,json} Report output format (default: md)
203+
--skip-sync-check Skip branch in sync validation
204+
--check-duplicates Check for duplicate JIRA issues
205+
185206
### gitignore-gen.sh
186207

187208
TBD

0 commit comments

Comments
 (0)