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

silence output from git-cat-file #17

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

Conversation

ktdreyer
Copy link
Member

If git cat-file fails, it prints a "fatal:" error message to stderr.

We expect this to fail occasionally because we're using it as a test to discover if we need to fetch the PR locally.

Add a "log_output" kwarg to git() to allow us to disable the output from the subcommand call, and specifically disable this during the git cat-file operation.

A safer fix would be to look for that specific "fatal:" error message string after the git() call and filtering that specifically, but that would require another kwarg to git() to optionally disable raising subprocess.CalledProcessError and return the output instead. I'm not sure I want to go there yet.

If git cat-file fails, it prints a "fatal:" error message to stderr.

We expect this to fail occasionally because we're using it as a test to
discover if we need to fetch the PR locally.

Add a "log_output" kwarg to git() to allow us to disable the output from
the subcommand call, and specifically disable this during the git
cat-file operation.

A safer fix would be to look for that specific "fatal:" error message
string after the git() call and filtering *that* specifically, but that
would require another kwarg to git() to optionally disable raising
subprocess.CalledProcessError and return the output instead. I'm not
sure I want to go there yet.
@ktdreyer
Copy link
Member Author

Fixes #16

@openshift-merge-robot
Copy link

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants