lockFileMaintenance
and a packageRule
with matchCurrentVersion
cause Renovate crash
#24964
Labels
core:package-rules
Relating to package-rules e.g. matchers
priority-2-high
Bugs impacting wide number of users or very important features
type:bug
Bug fix of existing functionality
Discussed in #24958
Originally posted by Badbond October 2, 2023
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us what version of Renovate you run.
35.152.0
If you're self-hosting Renovate, select which platform you are using.
github.com
Was this something which used to work for you, and then stopped?
It used to work, and then stopped
Describe the problem
When trying to upgrade Renovate from 35.141.3 to 35.159.7 (slim) in our self-hosted solution, we noticed that Renovate crashed in certain repositories with specific Renovate configuration. We were able to isolate the issue to release 35.152.0.
When combining
lockFileMaintenance.enabled: true
together with apackageRule
that usesmatchCurrentVersion
, theversioning
in here isnull
, which is invalid input for the Zod library here. The logs attached show the error that is thrown.https://github.com/Badbond/renovate-reproduction-case-lockfile-maintenance shows a minimal reproduction case that shows this behavior.
This issue is still apparent in 37.3.0 (latest at the time of testing). The issue is also apparent with the Mend Renovate GitHub App. In fact, the logs attached are those of the GitHub app run against the reproduction repository.
It furthermore seems a simple
null
to''
conversion ofversioning
insidemodules/versioning/index.ts
fixes it, which seems to be in line with the intentions of the default for this argument. If you agree on this issue, would you like me to open a PR for this?Relevant debug logs
Logs
Have you created a minimal reproduction repository?
I have linked to a minimal reproduction in the description above
The text was updated successfully, but these errors were encountered: