8000 Stream stdout and stderr by cmillar-trunk · Pull Request #699 · trunk-io/analytics-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Stream stdout and stderr #699

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 2 commits into from
Jun 25, 2025
Merged

Stream stdout and stderr #699

merged 2 commits into from
Jun 25, 2025

Conversation

cmillar-trunk
Copy link
Collaborator
@cmillar-trunk cmillar-trunk commented Jun 25, 2025

Bazel outputs its final summary to stdout, but progress logs to stderr. With stdout>stderr, we end up logging the summary above the progress. Even worse, since we pipe it to a variable before printing, we end up sitting there doing nothing while waiting for the subcommand to print, and then dump the whole thing to the screen. This is fine if you're letting it run and not watching, but is a spooky experience if you are watching. Thus, we switch to passing both streams out directly, which also nicely interleaves them the way bazel expects.

Bazel outputs its final summary to stdout, but progress logs to stderr.
With stdout>stderr, we end up logging the summary above the progress.
Since bazel shows up in so many places, we'll swap the order so it's
more consistent with expectations.
@cmillar-trunk cmillar-trunk requested a review from gnalh as a code owner June 25, 2025 17:34
Copy link
trunk-io bot commented Jun 25, 2025

😎 Merged successfully - details.

@cmillar-trunk
Copy link
Collaborator Author

/trunk cancel

@codecov-commenter
Copy link
codecov-commenter commented Jun 25, 2025

Codecov Report

Attention: Patch coverage is 14.28571% with 24 lines in your changes missing coverage. Please review.

Project coverage is 73.40%. Comparing base (14e493e) to head (988cba1).

Files with missing lines Patch % Lines
cli/src/test_command.rs 0.00% 24 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #699      +/-   ##
==========================================
+ Coverage   73.21%   73.40%   +0.19%     
==========================================
  Files          69       69              
  Lines       15590    15601      +11     
==========================================
+ Hits        11414    11452      +38     
+ Misses       4176     4149      -27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
trunk-staging-io bot commented Jun 25, 2025

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Copy link

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Copy link
trunk-io bot commented Jun 25, 2025

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Copy link
Collaborator
@gnalh gnalh left a comment

Choose a reason for hiding this comment

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

LGTM, make sure to update the summary + title to match the new intent.

@cmillar-trunk cmillar-trunk changed the title Swap stdout and stderr Stream stdout and stderr Jun 25, 2025
@trunk-io trunk-io bot merged commit e5e93e4 into main Jun 25, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0