Closed ianlewis closed 4 weeks ago
Added the renovate-config-validator as a required pre-submit check on the branch protection rule.
Hi @ianlewis :wave:
I see you have a lot of questions about Renovate. I help maintain the Renovate docs, so I'm taking a shot at helping you. I hope you find this information helpful. :wink:
config:base
was renamed to config:recommended
in v36
Fixes renovate config to use the
config:best-practices
preset rather than theconfig:base
preset sinceconfig:base
seems to have gone away at some point.
config:base
was renamed to config:recommended
in Renovate's major 36.0.0
release. So that's why you have difficulty finding the old name.
Read the Renovate docs, Release notes, breaking changes for 36 section to learn more. Renovate's major releases now have maintainer commentary, that's always handy to read.
config:best-practices
and best practices for updatingYou're using config:best-practices
now. :partying_face: I recommend you read the Renovate docs, Upgrade best practices page. That also explains a bit more about the config:best-practices
preset.
schedule
config not allowing 4 am
with a spaceAlso fixes the
schedule
config by using theschedule:monthly
preset. The previousschedule
config seems to have been invalid because "4 am" had space between "4" and "am" (this was fixed in theslsa-verifier
repo on slsa-framework/slsa-verifier#727 but was never fixed here).
The Renovate docs show the correct format in the schedule
config option docs. But I can see how you may read past this, or assume that 4 am
will work! I'll add a admonition to the Renovate docs, so it warns you about this limitation. :wink:
Also adds a pre-submit to run the
renovate-config-validator
to ensure that renovate config is valid. This pre-submit will need to be made required in the repository branch protection rule formain
in
Read the Renovate docs, config validation to learn about the ways you can validate Renovate's config.
@HonkingGoose thanks for the pointers. I did find those docs aside from the release notes.
I was a bit surprised that renovate reopened an old issue when the config was invalid instead of opening a new one. This meant that it was buried in the issues list and I missed it.
I was also surprised that the dashboard didn't include anything about the config errors so I was led down the wrong path for a while.
It would be kind of cool if renovate could automatically send PRs to fix some common issues (like the 4 am thing) with it's config or send PRs to migrate old deprecated config. Maybe that's wishful thinking though :)
@HonkingGoose thanks for the pointers. I did find those docs aside from the release notes.
You're welcome! Thanks for actually reading (most) of the docs! :heart: There's a lot to read so I don't expect you to read all. :smile:
I was a bit surprised that Renovate reopened an old issue when the config was invalid instead of opening a new one. This meant that it was buried in the issues list and I missed it.
I was also surprised that the Dependency Dashboard didn't include anything about the config errors so I was led down the wrong path for a while.
I don't know enough to answer these questions. Please subscribe to this discussion:
Edit: Here's a PR that allows Renovate to create a new config warning issue:
It would be kind of cool if Renovate could automatically send PRs to fix some common issues (like the 4 am thing) with it's config or send PRs to migrate old deprecated config. Maybe that's wishful thinking though :)
You're in luck, Renovate can already migrate old stuff in your config. This is an experimental feature, so it may only work partially. Review config migration PRs, before merging them.
Read the Renovate docs, configMigration
config option to learn how it works, and the limitations/problems we know about.
I guess the configMigration
option can not fix bad syntax, or logical errors.
configMigration
on the Renovate repositoryconfigMigration
PRs because you use the config:best-practices
presetThe config:best-practices
preset has this config:
{
"configMigration": true,
"extends": [
"config:recommended",
"docker:pinDigests",
"helpers:pinGitHubActionDigests",
":pinDevDependencies"
]
}
See how config:best-practices
sets configMigration
to true
. So you will get Config Migration PRs when needed. :wink:
I hope this helps you again. :smile:
Summary
Fixes renovate config to use the
config:best-practices
preset rather than theconfig:base
preset sinceconfig:base
seems to have gone away at some point.Also fixes the
schedule
config by using theschedule:monthly
preset. The previousschedule
config seems to have been invalid because "4 am" had space between "4" and "am" (this was fixed in theslsa-verifier
repo on https://github.com/slsa-framework/slsa-verifier/pull/727 but was never fixed here).Also adds a pre-submit to run the
renovate-config-validator
to ensure that renovate config is valid. This pre-submit will need to be made required in the repository branch protection rule formain
in the repository settings after this PR is merged.Fixes #3634 #404
Testing Process
make renovate-config-validator
to check that the config is valid.Checklist