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

Properly render multiline output when a V2 task fails #7783

Conversation

Projects
None yet
3 participants
@Eric-Arellano
Copy link
Contributor

commented May 21, 2019

Currently we render stdout and stderr as byte strings when a V2 task fails, which means that the \n literal gets rendered, so multiline strings are hard to read.

We already have made the assumption that stdout and stderr are UTF-8 encoded, so this is safe to do here.

yield TestResult(
status=status,
stdout=result.stdout.decode('utf-8'),
stderr=result.stderr.decode('utf-8'),
)

@Eric-Arellano Eric-Arellano requested review from stuhood and blorente May 21, 2019

@stuhood
Copy link
Member

left a comment

Thanks.

@blorente
Copy link
Contributor

left a comment

Cool! These seemingly small changes make the difference in the eyes of users.

@Eric-Arellano Eric-Arellano merged commit 114a3e3 into pantsbuild:master May 22, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Eric-Arellano Eric-Arellano deleted the Eric-Arellano:v2-process-failure-multiline-output branch May 22, 2019

@Eric-Arellano

This comment has been minimized.

Copy link
Contributor Author

commented May 22, 2019

These seemingly small changes make the difference in the eyes of users.

Agreed! I suspect as we turn on V2 for unit tests (in order to land remoting), we will continue to find really easy wins like this to improve the UX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.