Skip to content

fix(renovate): migrate deprecated match fields and validate strictly - #80

Merged
jimisola merged 2 commits into
mainfrom
fix/renovate-config-migration
Aug 20, 2026
Merged

fix(renovate): migrate deprecated match fields and validate strictly#80
jimisola merged 2 commits into
mainfrom
fix/renovate-config-migration

Conversation

@jimisola

Copy link
Copy Markdown
Member

What & Why

renovate-config-validator --strict exits 1 on this config with "Config migration necessary". Two deprecated fields:

Was Now
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.yml ran 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 --strict closes 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 the matchPackagePrefixes form, 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 --strict because the Maven/Gradle rules containing these two fields were dropped as unused. A companion PR adds --strict to that org's validation workflow so both stay honest.

Test Plan

  • validate-renovate check passes with --strict now in place
  • Confirm the next Renovate run still groups Spring artifacts under spring ecosystem and applies the {{groupId}} packages fallback

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>
@jimisola

Copy link
Copy Markdown
Member Author

Follow-up commit, same gap found on the companion PR: validate-renovate.yml triggered only on .github/renovate.json5, so a PR editing either validation workflow and nothing else reports no checks at all. This PR happened to touch renovate.json5 too, so the check did run — but a PR adding --strict on its own would have merged unverified.

Added both workflow files to the paths filter. Written out for push and pull_request separately rather than shared via a YAML anchor, since GitHub Actions doesn't support anchors in workflow files.

@jimisola
jimisola merged commit 0c723ab into main Aug 20, 2026
12 checks passed
@jimisola
jimisola deleted the fix/renovate-config-migration branch August 20, 2026 08:06
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.

1 participant