Scanning recipe for upgrading parent blows up#7472
Draft
BoykoAlex wants to merge 3 commits into
Draft
Conversation
Contributor
|
Just checking in on this PR and the underlying scanning phase limitation. We are currently blocked on migrating some customer projects because we cannot rename properties (like |
The scanner's deep `ResolvedPom.resolve(...)` is brittle: the new parent's dependencyManagement is interpolated against the current pom's property map, which can fail when a property was renamed by a prior recipe or when the user's property value no longer fits the new parent. The failure was surfaced as a misleading warning marker on `<parent>`, even when the upgrade itself worked. Try the deep resolve so descendants can still see the new parent's managed dependencies. If it throws, fall back to a shallow updated marker that swaps in the new parent reference; each pom's `maybeUpdateModel` will re-resolve from the post-edit XML.
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.
An example of a scanning recipe for upgrading the parent version that just blows up. Unclear how to deal with this. If an an attempt to update the jackson BOM version before the parent version is updated doesn't help. In fact the scanning part of the
UpdateParentVersionblows up even if this is the only recipe being executed. Doesn't seem like changing the parent and resolving everything in the scanning phase is a good idea...@timtebeek @kdvolder