Make the output of renovate-config-validator CI / automation friendlier #36298
Okeanos
started this conversation in
Suggest an Idea
Replies: 1 comment 1 reply
-
|
Please check if the env variables in https://docs.renovatebot.com/config-overview/#logging-variables apply (e.g. format) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Tell us more.
Renovate ships with the renovate-config-validator module that helps greatly with keeping configs valid across version changes.
I have a workflow set up that runs the following snippet after Renovate proposes PRs to ensure my Renovate config is up to date and does not use deprecated or otherwise broken functionality:
As you can see in my workflow above I would like to automate some aspects of the output parsing. Right now that requires flaky output parsing by using
tailor similar and then manually creating a structured document in the form of a JSON document for further processing. When config errors are present this obviously stops working altogether because my minimal script doesn't account for that (yet).Based on the config validator documentation, some personal testing, and the current v40 release source code the following happens here as best as I understand it:
stdout, even theWARNandERRORmessages that appear when a migration is necessary (--strictflag) or a config error was foundI am wondering whether I am either just holding this wrong (and would greatly appreciate a pointer in a better direction) or whether changes can be made to the Renovate Config Validator to support more automation friendly output. During my research I did stumble across this discussion and the linked log remapping issue. However, I am not entirely keen on reconfiguring the log level. Also, because
stdoutis used all the time, I am not sure this would actually do anything for the purpose I have in mind, i.e. distinguish messages intended for humans and machine parsable output.What I have in mind would be something like a
--output=jsonflag that:stderror a dedicated log file{ "file": "default.json5", "isValid": true, "migration": { "oldConfig": {}, "newConfig": {} }, "errors": [ { "topic": "", "message": "" } ] }In my eyes this would make the renovate-config-validator more robust in a CI/CD environment and overall enhance utility.
This could, in the future be enhanced with additional output formats like
github-actionsto directly annotate the parsed config file using GitHub workflow commands.Beta Was this translation helpful? Give feedback.
All reactions