-
-
Notifications
You must be signed in to change notification settings - Fork 235
fix: Don't use hidden progress bar #2830
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
Conversation
Without this PR we're indeed missing not only the messages emitted on the progress bar itself (with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing find, thanks so much for the PR!
I added some minor suggestions for the implementation; overall, this is an excellent improvement though!
Side note: it is interesting that we do two assemble endpoints for the sourcemap upload in the "after" logs, as the first assemble request already shows all the chunks are uploaded, the second call is redundant. But, I suppose this is an edge case, so it is fine, but it is interesting behavior that we would not have observed without your change
tests/integration/_cases/debug_files/upload/debug_files-upload-mixed-embedded-sources.trycmd
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, besides one comment on the changelog
tests/integration/_cases/debug_files/upload/debug_files-upload-mixed-embedded-sources.trycmd
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Description
indicatif
progress bar whenSENTRY_NO_PROGRESS_BAR
, use no progress bar instead, and just forward messages on it tolog::debug
/info
.std::io::stderr().is_terminal()
to determine whether or not to use a progress bar whenSENTRY_NO_PROGRESS_BAR
is not specified.log
, as ourlog
utility ultimately forwards to the progress bar when one is active.Issues
Close #2829
Close CLI-180
Close #2790
Close CLI-171
Testing
sentry-cli debug-files bundle-jvm --log-level=debug
stdout and stderr before and after the change:
stdout_before.txt
stdout_after.txt
stderr_before.txt
stderr_after.txt
The stdout remains the same.
The stderr changes, now we see more output, such as the file being currently processed (DEBUG level), and other messages at INFO level, such as
Skipping ./File.java because it is not valid UTF-8
which is what motivated this PR in the first place.sentry-cli sourcemaps upload --log-level=debug
stdout and stderr before and after the change:
stdout_before.txt
stdout_after.txt
stderr_before.txt
stderr_after.txt
The stdout remains the same as well.
The stderr now shows 2
POST
calls to/artifactbundle/assemble
, in contrast with the singlePOST
call to that endpoint that we would see without the change.