-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create PR comment on branch update failures #9434
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@viceice This is not a duplicate of those since this is about the fact that Renovate doesn't put a comment when it fails to update a branch. The error could be anything. What if GitLab returns "Error: Something went wrong"? It doesn't matter if the error is LFS-related or not, the behavior is still the same 🙂 . |
To elaborate, this is the scenario:
EDIT: Added this to the issue description. |
Sure but the cause is the same. So feel free to add another pr to handle this specific git error in our git layer. 🤗 |
You should at least see a warning on the dashboard |
But what about the general case? Are you saying that for general errors it's better to assume that users will verify on the dashboard whether there are any errors with the MR? 🤔 |
Ok, can you please update the PR description to reflect what should be happen? Then reopen the issue. |
Updated the description, let me know what you think! Idk if this is an easy task or not, but it may not be too bad. |
Should be easy to find and add the comment. The challenge may be removing it after without adding unnecessary API calls in the other 99.9% of cases |
What Renovate type, platform and version are you using?
Latest, self-hosted Renovate, on GitLab.
Describe the bug
If Renovate fails to update a branch for an MR, it doesn't add a comment to that MR.
E.g. I think the expected behavior would be this:
At the moment, Renovate just returns if it fails with any of the branch updating logic:
renovate/lib/workers/branch/index.ts
Lines 581 to 653 in 5f84737
I think the way to approach this would be to refactor this processing a bit. First of all, probably move out the check for whether a PR already exists or not. Then you'd at least need to identify which errors to simply return on (things like invalid credentials and repo 404's). Finally, on all other errors, attempt to post the error to the PR (if it exists). Something like that.
Relevant debug logs
Here's an example that involves an LFSd package-lock.json, however Renovate's docker image does not yet support LFS so GitLab returns an error when Renovate tries to push a commit for this file:
Click me to see logs
Have you created a minimal reproduction repository?
Additional context
I don't think it should be necessary to create a repro repo. I think the relevant logic is here:
renovate/lib/workers/branch/index.ts
Lines 581 to 653 in 5f84737
I guess you could argue that this is more of a feature request than a bug report, so feel free to change if needed.
I'm not sure when Renovate decides to add comments, but if it e.g. fails to update an Artifact it does (which is very helpful). I think it would make sense/be expected that Renovate adds a comment in any scenario where it didn't successfully manipulate/create/delete the MR. Otherwise, the MR could look good and might be merged, even though something is wrong with it. If you check the Dep Dashboard, you will see that this MR had an error (but you can't expect everyone to do that, and some people don't even have the Dashboard enabled).
The text was updated successfully, but these errors were encountered: