Filter incrementals on UpdateBomVersion visitor#539
Merged
jonesbusy merged 3 commits intoDec 30, 2024
Conversation
27ec7c4 to
db1dfd8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix #534
Since it's the normal behavior to consume profile on
mvn/maven.config(this is activated by the rewrite-maven plugin) : https://github.com/openrewrite/rewrite-maven-plugin/blob/ebf4663c50bf5852050d73a2a0bca341e78e2fd7/src/main/java/org/openrewrite/maven/MavenMojoProjectParser.java#L546-L550But we don't want to consume incremental when we upgrade such version
BOM and parent are a particular use case, but if for some reason we upgrade dependencies via OpenRewrite we will have the same issue for plugin using incrementals since the profile is activated by default.
For parent we don' have incrementals and they don't use CD. If one day they follow CD scheme we will have the same issue
The workarround is to filter the "incrementals" repo when we resolve the version using OpenRewrite APIs
Testing done
Added a test that reproduce the issue. Ensure the test is passing after the fix
Submitter checklist