Include inherited labels in databasechangelog table #2870
Merged
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.
Impact
Description
Changes MarkChangeSetRanGenerator so that if a changeSet was included with an include/includeAll containing a
labels
attribute, those labels are included in thelabels
column ofdatabasechangelog
. Makes the behavior match what thecontexts
attribute was generally doing before.Fixes #2824
Fixes #2883 (please test)
However, when looking at the current behavior, I found the following wrong logic and made the following changes:
LabelExpression
and not aLabels
like it should. In the changelog file, we define just comma separated lists of labels, not a label expression.include()
,includeAll()
, andsetIncludeLabels()
functions to match the old versions that took a LabelExpression and converted them into Labels.DatabaseChangeLog.getIncludedLabels()
orChangeSet.getInheriteableLabels()
since java cannot overload return values. I don't think those should be methods generally used by extensions and so it is not worth switching to less useful names to preserve the API compatibility.Additional Context
I'm adding the ReleaseMajor label due to the changes in logic and APIs listed in the description. They should not be serious breaks and will likely not impact anyone, but something for users to be aware of.