Skip to content
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

github/workflows: print clippy output in case of errors #627

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stefano-garzarella
Copy link
Member

In the unsafe-check job, if cargo clippy fails, we don't have any log since we are redirecting the stderr to a file to count the number of undocumented unsafe blocks.

We don't expect it to fail, since other steps in check job should check this case, but it has happened in some cases.

Print the file content in case of cargo clippy returns with error, so we can debug better CI failures.

@osteffenrh
Copy link
Contributor

Could also do cargo clippy ... > file || ( cat file; exit 1) to keep the CI pipeline behavior the same and stop if the command fails and not have it execute the remaining commands. But it is also fine as it is, I guess.

@stefano-garzarella
Copy link
Member Author

Could also do cargo clippy ... > file || ( cat file; exit 1) to keep the CI pipeline behavior the same and stop if the command fails and not have it execute the remaining commands. But it is also fine as it is, I guess.

I'm not expecting cargo clippy failing (at least if it fails, it should fail also on the Check jobs), but I see your point I'll do that, thanks!

In the `unsafe-check` job, if `cargo clippy` fails, we don't have any
log since we are redirecting the stderr to a file to count the number
of undocumented unsafe blocks.

We don't expect it to fail, since other steps in `check` job should
check this case, but it has happened in some cases.

Print the file content in case of `cargo clippy` returns with error,
so we can debug better CI failures.

Reported-by: Oliver Steffen <osteffen@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants