migrateAndValidate gives config errors in local tests put seems to have no issue in the Renovate App #22058
-
I'm using the Mend Renovate hosted app on github.com.
Was this something which used to work for you, and then stopped?It used to work, and then stopped Describe your problem.Until 35.62.0 this was working fine with 0 errors/warnings indicated in our renovate config. As of that release (and every version after, as of 35.74.1) it produces 2 errors in our CI environment that do not make sense. "errors": [
{
"topic": "Configuration Error",
"message": "Configuration option `lockFileMaintenance` should be a json object"
},
{
"topic": "Configuration Error",
"message": "Configuration option `vulnerabilityAlerts` should be a json object"
}
] Our renovate config does not use presets for these 2 options and are most definitely JSON objects, as follows: {
...,
"lockFileMaintenance": {
"enabled": true,
"schedule": "every 2 weeks before 7am on Monday"
},
"vulnerabilityAlerts": {
"enabled": true,
"labels": ["Type: Security", "Priority: 1 - Critical"],
"transitiveRemediation": true
},
...
} In the Renovate App the logs do not mention any errors so I am unsure of what is happening here? INFO: Repository started
{
"renovateVersion": "35.74.0"
}
...
DEBUG: migrateAndValidate()
DEBUG: No config migration necessary Our CI tests: import { migrateAndValidate } from 'renovate/dist/config/migrate-validate.js'
import config from './default.json' assert { type: "json" }
it('is a valid config', async () => {
expect.assertions(2)
const { errors, warnings } = await migrateAndValidate({}, config)
expect(errors).toEqual([])
expect(warnings).toEqual([])
}) Relevant debug logs.Logs
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
The only relevant change between 35.61.0...35.62.0#diff-77e30705ef596d3d526b4b4ecda8aabe5d54163a2fda16a9d684c7a03390b004L20-L59 |
Beta Was this translation helpful? Give feedback.
-
Please give steps to reproduce. e.g. a public repo someone should clone and then run command(s) on |
Beta Was this translation helpful? Give feedback.
-
It's caused by this if statement: renovate/lib/config/validation.ts Line 571 in 198b2fd Which compares the prototype chain against the And the prototype chain isn't preserved when using
|
Beta Was this translation helpful? Give feedback.
-
Resolved in 35.144.x |
Beta Was this translation helpful? Give feedback.
Resolved in 35.144.x