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

Eric-Arellano
Copy link
Contributor

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'),
)

Copy link
Sponsor Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

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

Thanks.

Copy link
Contributor

@blorente blorente left a comment

Choose a reason for hiding this comment

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

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
@Eric-Arellano Eric-Arellano deleted the v2-process-failure-multiline-output branch May 22, 2019 19:41
@Eric-Arellano
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants