Skip to content

Fix changelog generator missing directly removed properties #45267

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yybmion
Copy link

@yybmion yybmion commented Apr 23, 2025

Issue

Closes #40075

The configuration properties changelog generator misses items that are removed without prior deprecation. When a property is removed without being deprecated first (like during the Flyway 10 upgrade), these changes are reflected in the metadata but not included in the generated changelog.

Solution

Modified the computeDifferences method in the Changelog class to detect properties that only exist in the new metadata with error-level deprecation and properly mark them as DELETED in the changelog. This ensures that properties that are added to a new version with error-level deprecation (indicating immediate removal) are correctly included in the "Removed in X.X" section of the changelog.

Specifically, added logic to check for properties in the new metadata that

  1. Don't exist in the old metadata
  2. Have an error-level deprecation
  3. Should be classified as DELETED rather than being ignored

Tests

The existing test diffContainsDifferencesBetweenLeftAndRightInputs already verifies this functionality by testing that properties with error-level deprecation are properly classified as DELETED.

To make the test cover this fix, we enhanced the sample-2.0.json test data to include an additional property (test.removed.directly) that demonstrates a property removed without prior deprecation, marked with error-level deprecation and a reason "Removed in Upgrade 10".

After fix, this test confirms that both regular removed properties and those marked with error-level deprecation are correctly included in the changelog.

The changelog generator did not detect properties that were added to a new
version with error-level deprecation (indicating immediate removal). This
commonly occurs when upgrading dependencies like Flyway 10, where properties
are removed without prior deprecation.

Modified the computeDifferences method to detect properties that only exist
in the new metadata with error-level deprecation and properly mark them as
DELETED in the changelog.

Signed-off-by: yybmion <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configuration properties changelog generator misses items that are removed without prior deprecation
2 participants