Skip to content

Truncate output that we log from commands to 10 lines #9286

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

Merged
merged 1 commit into from
Jun 7, 2022
Merged

Conversation

ericholscher
Copy link
Member

@ericholscher ericholscher commented Jun 1, 2022

Refs #9105

@ericholscher ericholscher requested a review from a team as a code owner June 1, 2022 22:22
@ericholscher ericholscher requested a review from stsewd June 1, 2022 22:22
Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

Looks good! There are some feedback that could be applied as well.

@@ -457,7 +457,8 @@ def run_command_class(
if warn_only:
msg = 'Command {cmd} failed'.format(cmd=build_cmd.get_command())
if build_cmd.output:
msg += ':\n{out}'.format(out=build_cmd.output)
truncated_output = "\n".join(build_cmd.output.split("\n")[:10])
Copy link
Member

Choose a reason for hiding this comment

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

What about logging the 10 first and the 10 last lines?

8
9
10

....

98
99
100

Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

🤝

@ericholscher
Copy link
Member Author

Failing test is unrelated (jupyterbook docs change)

Make output nicer and add first/last 10 lines

Log correct string
@stsewd stsewd merged commit 68226d1 into main Jun 7, 2022
@stsewd stsewd deleted the truncate-latex branch June 7, 2022 00:01
humitos added a commit that referenced this pull request Jun 17, 2022
The logic wrote in #9286 was incorrect. The logs keeps showing a lot of the
command's output.

We want to take the first 10 lines and the last 10 lines.
stsewd pushed a commit that referenced this pull request Jun 20, 2022
The logic wrote in #9286 was incorrect. The logs keeps showing a lot of the
command's output.

We want to take the first 10 lines and the last 10 lines.
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