Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
1e63065
add logchange plugin
dsmiley Jan 18, 2025
b38a7b2
Fix
dsmiley Jan 20, 2025
3cc1497
Task generateChangeYaml
dsmiley Jan 20, 2025
5ba088f
sorted deps
dsmiley Jan 21, 2025
0421dc9
Bump version
janhoy Jun 20, 2025
04251c2
Add logchange-config.yml
janhoy Jun 20, 2025
e6a6132
Dev-doc and gradle.properties template
janhoy Jun 21, 2025
ebb0d82
Auto generate title
janhoy Jun 21, 2025
a577537
Merge branch 'main' into logchange
janhoy Jun 21, 2025
13dc016
Merge branch 'main' into logchange
janhoy Jun 21, 2025
03fb455
Prefix gradle.properties keys with 'user'
janhoy Jun 21, 2025
09756e1
Update dev-docs/changelog.adoc
janhoy Jun 21, 2025
26be74c
Repeated 'deprecated' docs
janhoy Jun 21, 2025
3558b97
Merge remote-tracking branch 'dsmiley/logchange' into logchange
janhoy Jun 21, 2025
1f1be03
Upgrade to 1.19.5 and start using versioned unreleased dirs
janhoy Jun 22, 2025
9d57c49
Remove config for unreleasedVersionDir
janhoy Jun 22, 2025
68343bf
Customized entryTypes for solr
janhoy Jun 22, 2025
535c661
Merge branch 'main' into logchange
janhoy Jul 1, 2025
f58ac9c
Merge branch 'main' into logchange
janhoy Oct 20, 2025
362acdf
Use single unreleased folder
janhoy Oct 20, 2025
cc696a0
Do not gitignore CHANGELOG.md
janhoy Oct 20, 2025
0c1fa19
Remove target version feature from changelog.gradle
janhoy Oct 20, 2025
e890f16
Rewrite dev-docs for single unreleased folder
janhoy Oct 20, 2025
8337c29
Bump logchange version
janhoy Oct 20, 2025
0faad7c
New script changes2logchange.py to migrate CHANGES.txt to logchange f…
janhoy Oct 20, 2025
0e099ab
Updated docs to mention no need for changelog for minor issues
janhoy Oct 20, 2025
9216ee8
Remove the optimized type
janhoy Oct 20, 2025
b995e6f
Doc change
janhoy Oct 20, 2025
be619cf
Generate newest entries in 'unreleased' folder
janhoy Oct 20, 2025
463892d
Add a github workflow to warn about lack of changelog
janhoy Oct 20, 2025
31992b2
Update PR template
janhoy Oct 21, 2025
7be559d
Update addVersions.py
janhoy Oct 21, 2025
b10c09b
Update addDepsToChanges.py to write yaml
janhoy Oct 21, 2025
7b2c8bf
New changes2html.py script and change gradle task
janhoy Oct 21, 2025
6d34500
Note about not using upgrade_notes type
janhoy Oct 21, 2025
6cc1684
Escape only < and >
janhoy Oct 21, 2025
297acb5
Dummy changelog file to keep build from failing
janhoy Oct 21, 2025
2398f39
Document migratino tool in dev-docs, including new option to convert …
janhoy Oct 21, 2025
3e494b6
s/disallowed/deprecated/
janhoy Oct 21, 2025
6bdfe64
Add a README (tmp) in the changelog/ folder
janhoy Oct 21, 2025
bcfb568
Include CHANGELOG.md in tarball
janhoy Oct 21, 2025
a1fad3c
Remove CHANGES.txt mention from addDepsToChanges.py
janhoy Oct 21, 2025
a26cfd1
Remove sentence from dev-docs/git.adoc
janhoy Oct 21, 2025
6e965bb
Fix ExternalPaths.java
janhoy Oct 21, 2025
2e1711f
Remove unused script releasedJirasRegex.py
janhoy Oct 21, 2025
d9a1344
Update smokeTestRelease.py to require CHANGELOG.md
janhoy Oct 21, 2025
1e9a97b
Update releaseWizard changelog handling
janhoy Oct 21, 2025
2e20ca0
License header for README
janhoy Oct 22, 2025
c5755af
ExternalPaths check other path which is allowed
janhoy Oct 22, 2025
b1db3ff
Clarify docs
janhoy Oct 22, 2025
b130f53
Fix releaseWizard.yaml syntax errors
janhoy Oct 22, 2025
3fc4e84
Correct spelling of dev-docs/changelog.adoc
janhoy Oct 22, 2025
2c8f6db
Rename task
janhoy Oct 22, 2025
9dc20a0
Clean up the changelog.adoc doc
janhoy Oct 22, 2025
adc0b09
Re-organize adoc
janhoy Oct 22, 2025
a4f661f
Rename task once again as writeChangelog with an alias changelog
janhoy Oct 22, 2025
59dd661
Wrong numbering in adoc
janhoy Oct 22, 2025
9cc30b0
Improve addDepsTochanges
janhoy Oct 22, 2025
e4a8933
Improve addDepsTochanges
janhoy Oct 22, 2025
0a3949e
Merge remote-tracking branch 'dsmiley/logchange' into logchange
janhoy Oct 22, 2025
e874d67
Revert unneccessary whitespace change in wiz
janhoy Oct 22, 2025
0fe8fc7
Rewrite extract_jira_issues_from_title
janhoy Oct 22, 2025
1ac5622
Mention task aliases
janhoy Oct 22, 2025
c50748c
Refactor changes2html.py to make it more readable and smaller
janhoy Oct 22, 2025
074d639
Packaging build - include CHANGELOG.md from correct folder
janhoy Oct 22, 2025
0ae2fbd
Nicer filename for changes yaml files
janhoy Oct 22, 2025
d1a8c4a
changes2logchange.py: Allow spaces in changelog yml files
janhoy Oct 22, 2025
bdadd40
Merge branch 'main' into logchange
janhoy Oct 22, 2025
2c68693
Add a changelog yml to the PR
janhoy Oct 22, 2025
265c156
Fixes in changelog validation workflow
janhoy Oct 22, 2025
9d160cb
No need to print more than a link to changelog doc
janhoy Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,9 @@ ij_yaml_space_before_colon = false
ij_yaml_spaces_within_braces = true
ij_yaml_spaces_within_brackets = true

[dev-tools/scripts/releaseWizard.yaml]
trim_trailing_whitespace = false

# dos files
[{*.bat,*.cmd}]
end_of_line = crlf
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Before creating a pull request, please file an issue in the ASF Jira system for

* https://issues.apache.org/jira/projects/SOLR

For something minor (i.e. that wouldn't be worth putting in release notes), you can skip JIRA.
For something minor (i.e. that wouldn't be worth putting in release notes), you can skip JIRA.
To create a Jira issue, you will need to create an account there first.

The title of the PR should reference the Jira issue number in the form:
Expand Down Expand Up @@ -42,3 +42,4 @@ Please review the following and check all that apply:
- [ ] I have run `./gradlew check`.
- [ ] I have added tests for my changes.
- [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
- [ ] I have added a [changelog entry](https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc) for my change
113 changes: 113 additions & 0 deletions .github/scripts/validate-changelog-yaml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

"""
Validates changelog YAML files in changelog/unreleased/ folder.

Checks:
- File is valid YAML
- Contains required 'title' field (non-empty string)
- Contains required 'type' field (one of: added, changed, fixed, deprecated, removed, dependency_update, security, other)
- Contains required 'authors' field with at least one author
- Each author has a 'name' field (non-empty string)
"""

import sys
import yaml


def validate_changelog_yaml(file_path):
"""Validate a changelog YAML file."""
valid_types = ['added', 'changed', 'fixed', 'deprecated', 'removed', 'dependency_update', 'security', 'other']

try:
with open(file_path, 'r', encoding='utf-8') as f:
data = yaml.safe_load(f)

# Check if file contains a mapping (dictionary)
if not isinstance(data, dict):
print(f"::error file={file_path}::File must contain YAML mapping (key-value pairs)")
return False

# Validate 'title' field
if 'title' not in data or not data['title']:
print(f"::error file={file_path}::Missing or empty 'title' field")
return False

if not isinstance(data['title'], str) or not data['title'].strip():
print(f"::error file={file_path}::Field 'title' must be a non-empty string")
return False

# Validate 'type' field
if 'type' not in data or not data['type']:
print(f"::error file={file_path}::Missing or empty 'type' field")
return False

if data['type'] not in valid_types:
print(f"::error file={file_path}::Invalid 'type': '{data['type']}'. Must be one of: {', '.join(valid_types)}")
return False

# Validate 'authors' field
if 'authors' not in data or not data['authors']:
print(f"::error file={file_path}::Missing or empty 'authors' field")
return False

if not isinstance(data['authors'], list):
print(f"::error file={file_path}::Field 'authors' must be a list")
return False

if len(data['authors']) == 0:
print(f"::error file={file_path}::Field 'authors' must contain at least one author")
return False

# Validate each author
for i, author in enumerate(data['authors']):
if not isinstance(author, dict):
print(f"::error file={file_path}::Author {i} must be a mapping (key-value pairs)")
return False
if 'name' not in author or not author['name']:
print(f"::error file={file_path}::Author {i} missing or empty 'name' field")
return False
if not isinstance(author['name'], str) or not author['name'].strip():
print(f"::error file={file_path}::Author {i} 'name' must be a non-empty string")
return False

# All validations passed
print(f"✓ {file_path} is valid")
print(f" Title: {data['title']}")
print(f" Type: {data['type']}")
print(f" Authors: {', '.join(a['name'] for a in data['authors'])}")
return True

except yaml.YAMLError as e:
print(f"::error file={file_path}::Invalid YAML: {e}")
return False
except Exception as e:
print(f"::error file={file_path}::Error validating file: {e}")
return False


if __name__ == '__main__':
if len(sys.argv) < 2:
print("Usage: validate-changelog-yaml.py <yaml-file>")
sys.exit(1)

file_path = sys.argv[1]
if not validate_changelog_yaml(file_path):
sys.exit(1)
127 changes: 127 additions & 0 deletions .github/workflows/validate-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Validate Changelog

on:
pull_request:
branches:
- '*'

jobs:
validate-changelog:
name: Check changelog entry
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Check for no-changelog label
id: check-label
run: |
LABELS='${{ toJson(github.event.pull_request.labels) }}'
if echo "$LABELS" | grep -q '"no-changelog"'; then
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi

- name: Check for CHANGES.txt edits
if: steps.check-label.outputs.skip == 'false'
run: |
# Get the list of changed files
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)

if echo "$CHANGED_FILES" | grep -q "^solr/CHANGES\.txt$"; then
echo "::error::Use of solr/CHANGES.txt is deprecated. Please create a changelog yaml file instead."
echo ""
echo "Instead of editing CHANGES.txt, please:"
echo "1. Run: ./gradlew writeChangelog"
echo "2. Edit the generated YAML file in changelog/unreleased/"
echo "3. Commit both the code change and the YAML file"
echo ""
echo "For more information, see: dev-docs/changelog.adoc"
echo ""
echo "If this PR should not have a changelog entry (e.g., documentation-only changes),"
echo "add the 'no-changelog' label to this PR."
exit 1
fi

- name: Check for changelog entry
if: steps.check-label.outputs.skip == 'false'
run: |
# Get the list of changed files
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)

# Check if any files were added to changelog/unreleased/
if echo "$CHANGED_FILES" | grep -q "^changelog/unreleased/"; then
echo "✓ Changelog entry found"
exit 0
fi

# Check if only docs/tests/comments were changed (common exceptions)
HAS_NON_DOCS_CHANGES=false
while IFS= read -r file; do
# Skip changelog, docs, tests, and certain config files
if ! echo "$file" | grep -qE "(^changelog/|^solr/solr-ref-guide/|^dev-docs/|\.md$|\.adoc$|^solr/.*/test|\.gradle$|\.properties$|README|NOTICE|LICENSE)"; then
HAS_NON_DOCS_CHANGES=true
break
fi
done <<< "$CHANGED_FILES"

if [ "$HAS_NON_DOCS_CHANGES" = false ]; then
echo "✓ No code changes detected (docs/tests only)"
exit 0
fi

echo "::error::This PR appears to contain code changes but no changelog entry was added."
echo ""
echo "Please add a changelog entry by:"
echo "1. Running: ./gradlew writeChangelog"
echo "2. Editing the generated YAML file in changelog/unreleased/"
echo "3. Committing the YAML file"
echo ""
echo "For more information, see: dev-docs/changelog.adoc"
echo ""
echo "If this PR should not have a changelog entry (e.g., refactoring, internal cleanup),"
echo "add the 'no-changelog' label to this PR."
exit 1

- name: Validate changelog YAML structure
if: steps.check-label.outputs.skip == 'false'
run: |
# Get the list of changed files
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)

# Find all YAML files added to changelog/unreleased/
YAML_FILES=$(echo "$CHANGED_FILES" | grep "^changelog/unreleased/.*\.ya\?ml$" || true)

if [ -z "$YAML_FILES" ]; then
exit 0
fi

echo "Validating changelog YAML files..."
VALIDATION_FAILED=false

while IFS= read -r file; do
if [ -z "$file" ]; then
continue
fi

echo ""
echo "Validating: $file"

# Validate using a Python script
python3 .github/scripts/validate-changelog-yaml.py "$file"

if [ $? -ne 0 ]; then
VALIDATION_FAILED=true
fi

done <<< "$YAML_FILES"

if [ "$VALIDATION_FAILED" = true ]; then
echo "Please see dev-docs/changelog.adoc for more info."

exit 1
fi
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ gradle/wrapper/gradle-wrapper.jar

# WANT TO ADD MORE? You can tell Git without adding to this file:
# See https://git-scm.com/docs/gitignore
# In particular, if you have tools you use, add to $GIT_DIR/info/exclude or use core.excludesFile
# In particular, if you have tools you use, add to $GIT_DIR/info/exclude or use core.excludesFile
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- @formatter:off -->
<!-- noinspection -->
<!-- Prevents auto format, for JetBrains IDE File > Settings > Editor > Code Style (Formatter Tab) > Turn formatter on/off with markers in code comments -->

<!-- This file is automatically generate by logchange tool 🌳 🪓 => 🪵 -->
<!-- Visit https://github.com/logchange/logchange and leave a star 🌟 -->
<!-- !!! ⚠️ DO NOT MODIFY THIS FILE, YOUR CHANGES WILL BE LOST ⚠️ !!! -->


DUMMY changelog file.

We are in the process of migrating from CHANGES.txt to a structured approach to changelog generation. See [SOLR-17619](https://issues.apache.org/jira/browse/SOLR-17619) as well as [dev-docs/changelog.adoc](dev-docs/changelog.adoc) for details.

[unreleased]
------------

### Added (1 change)

- Dummy issue [SOLR-123](https://issues.apache.org/jira/browse/SOLR-123) (janhoy)

[9.9.0] - 2025-07-24
--------------------

### Added (1 change)

- Dummy issue for release 9.9 [SOLR-124](https://issues.apache.org/jira/browse/SOLR-124) (janhoy)
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ plugins {
alias(libs.plugins.diffplug.spotless) apply false
alias(libs.plugins.nodegradle.node) apply false
alias(libs.plugins.openapi.generator) apply false
alias(libs.plugins.logchange)
}

// Declare default Java versions for the entire project and for SolrJ separately
Expand Down Expand Up @@ -216,3 +217,5 @@ apply from: file('gradle/solr/packaging.gradle')
apply from: file('gradle/solr/solr-forbidden-apis.gradle')

apply from: file('gradle/node.gradle')

apply from: file('gradle/changelog.gradle')
21 changes: 21 additions & 0 deletions changelog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
# New changelog process

We are in the process of migrating to a new way of managing our changelog. Please see [dev-docs/changelog.adoc](../dev-docs/changelog.adoc) for details.

In a transition period it is still possible to merge your changelog entry to `solr/CHANGES.txt`, but then you can only use the new process.
Loading
Loading