Fix changelog generator missing directly removed properties #45267
+41
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theChangelog
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
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.