fix(renovate): migrate deprecated match fields and validate strictly - #80
Merged
Conversation
matchPackagePrefixes and matchPackagePatterns are deprecated. Replaced with the matchPackageNames forms that renovate-config-validator itself produces, so the matching semantics are Renovate's own migration rather than a hand translation. The validation workflow ran without --strict, where a config needing migration exits 0 -- which is why this went unnoticed. Adding --strict makes the next deprecation fail the check instead of passing quietly. Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
The workflow triggered only on .github/renovate.json5, so a PR editing either validation workflow reported no checks at all. Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
Member
Author
|
Follow-up commit, same gap found on the companion PR: Added both workflow files to the |
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.
What & Why
renovate-config-validator --strictexits 1 on this config with "Config migration necessary". Two deprecated fields:matchPackagePrefixes: ["org.springframework", "org.springframework.security"]matchPackageNames: ["org.springframework{/,}**", "org.springframework.security{/,}**"]matchPackagePatterns: [".*"]matchPackageNames: ["/.*/"]Both replacements are Renovate's own migration output, taken verbatim from the validator's migration diff rather than hand-translated — so the matching semantics are whatever Renovate itself would have applied at runtime, not my interpretation of the glob and regex forms.
Why it went unnoticed
common-validate-renovate.ymlran the validator without--strict, and a config needing migration exits 0 in that mode. So CI has been green throughout while the config carried deprecated fields that Renovate was silently migrating on every run.Adding
--strictcloses that: the next deprecation fails the check instead of passing quietly. Verified both ways locally against the migrated file — exit 0 under--strict, as global config and as repo config.One observation, deliberately not changed
org.springframework.security{/,}**is redundant —org.springframework{/,}**already matches it, since the{/,}alternation includes the empty case. That redundancy existed identically in thematchPackagePrefixesform, so this PR preserves it rather than quietly changing behaviour during a mechanical migration. Worth removing separately if you agree.Related
Found while porting this preset to another org, whose trimmed copy passes
--strictbecause the Maven/Gradle rules containing these two fields were dropped as unused. A companion PR adds--strictto that org's validation workflow so both stay honest.Test Plan
validate-renovatecheck passes with--strictnow in placespring ecosystemand applies the{{groupId}} packagesfallback