Renovate attempts to post 'Artifact update problem' with invalid content #19532
-
Not sure if this is worth opening as an issue, but flagging here for discussion, and visibility in case it's useful context for anyone else. We had an issue with our renovate setup. We run self-hosted renovate via the NPM package installed on top of our Docker image, and use GitLab. We were accidentally running renovate against an old version of our Docker image, which contained versions of both Ruby and Bundler that predated those used to generate our As a result, when renovate attempted to open a merge request to bump a gem version, it was hitting an artifact update problem trying to modify the Here's a (lightly redacted) snippet from the debug logs:
When renovate was attempting to post the "⚠ Artifact update problem" comment to the merge request it created, this failed with a 400 error. As a result, the setup problem was masked for us and hard to track down - we didn't realize what was happening until digging into the debug logs. It turns out the issue is that the error message emitted by bundler includes characters that are not allowed in GitLab comments. Note this part of the I appreciate this is a wild edge-case and the bad output appears to be generated by bundler. I guess the only fix would be to sanitize the comment body before attempting to post it from ensureComment. It looks like there's an existing sanitize utility function that strips out secrets. Perhaps that could also remove invalid characters. Anyway, mostly posting here in case anyone else runs into the issue and is Googling it ❤️ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Thanks for reporting this. Each platform (e.g. gitlab) has a renovate/lib/modules/platform/gitlab/index.ts Lines 696 to 714 in 6db995d So that would be the place to add such massaging if it is platform-specific (however cleaning out |
Beta Was this translation helpful? Give feedback.
Thanks for reporting this.
Each platform (e.g. gitlab) has a
massageMarkdown()
function, e.g.renovate/lib/modules/platform/gitlab/index.ts
Lines 696 to 714 in 6db995d