docs: versioning
should not be combined with matchUpdateTypes
#17220
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.
Changes
Documents an edge case that may produce unexpected results for users.
Context
We had a user create a
packageRule
like this:With this rule in place, Renovate opened a PR tying to upgrade a Maven dependency from
9.4.1.jre8
to9.4.1.jre16
as a patch update, which was unexpected to them.After debugging, we confirmed that the custom
versioning
never took effect because of a chicken-and-egg problem. Basically, Renovate tries to apply package rules several times at different points in time, like:That first time, it skipped the user's rule because it said it only applied to patch-level updates, but Renovate didn’t yet have that information to match against. That meant the versioning was never applied in "step 1", so it fell back to its default Maven handling. Then, when it had all the available versions in "step 2", it saw that Maven considered those to be patch releases, so the rule kicked in at that point, but it was too late for the versioning to do anything (so it only applied the grouping stuff).
It would therefore be helpful to document that rules defining the
versioning
should not also definematchUpdateTypes
to avoid this behavior. (Splitting the rule into two - one forversioning
and another for grouping - fixed this for the user.)Alternatively, it might be useful to raise some kind of proactive warning if a user configures both
versioning
andmatchUpdateTypes
in the same rule, but I figured documenting this limitation wouldn't hurt.Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: