Skip to content

Filter incrementals on UpdateBomVersion visitor#539

Merged
jonesbusy merged 3 commits into
jenkins-infra:mainfrom
jonesbusy:feature/filter-incrementals
Dec 30, 2024
Merged

Filter incrementals on UpdateBomVersion visitor#539
jonesbusy merged 3 commits into
jenkins-infra:mainfrom
jonesbusy:feature/filter-incrementals

Conversation

@jonesbusy
Copy link
Copy Markdown
Collaborator

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-L550

But 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

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@jonesbusy jonesbusy force-pushed the feature/filter-incrementals branch from 27ec7c4 to db1dfd8 Compare December 30, 2024 08:41
@jonesbusy jonesbusy marked this pull request as ready for review December 30, 2024 08:56
@jonesbusy jonesbusy merged commit 68a18ae into jenkins-infra:main Dec 30, 2024
@jonesbusy jonesbusy deleted the feature/filter-incrementals branch December 30, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UpdateBomVersionVisitor get update from incrementals instead of public

1 participant