-
Notifications
You must be signed in to change notification settings - Fork 9
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
Failures to run buf lint
due to non-lint errors don't fail the action
#120
Comments
Thank you for the clear reproducible example! What is happening here is that the incorrect import file is causing the module to not be buildable at all. As a result, the breaking and lint steps report the build errors and fail with a non-zero exit code. For better and for worse, the buf-lint-action and buf-breaking action ignore the build errors and only fail if there are actual breaking or lint errors (they don't count build errors as failing breaking or lint). The build error prevents breaking or lint checks from meaningfully running, so if there is a build error, the lint and breaking checks will always pass. The quickest solution to your problem is to add an explicit step to your workflow to run I also agree/concede that the current behavior of the GitHub actions here is not ideal. We have been working on a revamped unified GitHub action that we think will provide a better end to end experience and holistically address some of the feedback (like this issue) that we have received on our current GitHub actions. If you would be interested to give our new action a spin, we would love feedback: https://github.com/bufbuild/buf-action. Fair warning though, the new action is very new, like we open sourced it last week and we have not yet adopted it across all our own internal repos yet. Having said that, we have also already received positive internal feedback on the new action. It is also where we are investing our time (we don't really plan on making any more changes to the other separate GitHub actions like this one), so if you want to skate to where the puck is heading, and help us make the new action awesome, you are welcome to try it out and let us know what you think! |
(The new action correctly addresses this issue both by running the build command by default, and also by ensuring the separate lint/breaking steps fail if the module is not buildable) |
Awesome, thank you for the PR to add The new I'm going to close this issue as either running |
I have a reproducing repo at https://github.com/carols10cents/buf-repro, specifically in carols10cents/buf-repro#3.
This applies to the
buf-breaking-action
too, but I arbitrarily picked this repo to file the issue in. Let me know if you'd like one over there too.The
.github/workflows/buf-lint.yml
contains this (which also runsbuf breaking
):The PR reverts a commit that fixed a previous issue with file imports; that is, it breaks again and I expected the action run to fail-- but it passed.
However, toggling open the logs for
buf-breaking-action
shows:and toggling open the logs for
buf-lint-action
shows:I expected these
Failure
messages to cause the job to fail, because the actions aren't able to actually check these files.The text was updated successfully, but these errors were encountered: