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

[bugfix][hail] Capture error rather than printing it #8150

Merged
merged 1 commit into from Feb 25, 2020

Conversation

chrisvittal
Copy link
Collaborator

This is untested, but probably can't make things worse.

fixes #8146

@johnc1231
Copy link
Contributor

I think we need to at least manually test it.

fatal(s"VEP command '${ cmd.mkString(" ") }' failed with non-zero exit status $rc\n" +
" VEP Error output:\n" + errorLines)
" VEP Error output:\n" + err.toString)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you help me understand why this works when proc.getErrorStream doesn't? I expected we would have an err stream and an out stream and we would include both (separately) in the exception message.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output stream is VEP's output, which we parse. The issue here is with the pipe method, changed later in this PR. We set up a thread to read from VEP's stderr pipe. We can only read from that stream once. Previously we were printing it to the JVM's System.err stream, now, we're capturing it in a StringBuilder.

@chrisvittal
Copy link
Collaborator Author

How do I test this? I don't know how to make vep fail.

@johnc1231
Copy link
Contributor

I just meant we should test that VEP still works on this branch. Like, do we have automated tests for VEP?

@chrisvittal
Copy link
Collaborator Author

Oh, that's easy, make test-dataproc, doing that now.

@chrisvittal
Copy link
Collaborator Author

@johnc1231 make test-dataproc succeeded

@danking danking merged commit ff744c5 into hail-is:master Feb 25, 2020
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.

VEP output going to stderr
3 participants