-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[Data] Improve Progress Bar Display in Non-Interactive Terminals #58913
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
base: master
Are you sure you want to change the base?
Conversation
…erminals - Disable progress bar display in non-interactive terminals - Implement progress output in the form of logs in non-interactive terminals - Add configuration for the interval time of progress log output - Optimize the update logic of the progress bar to support cases with unknown total counts Change-Id: I96704bbeb04460bc1c10c6fb3a798eccf8a7169a Signed-off-by: daiping8 <[email protected]>
…ss bar in non-interactive terminals - Modified the initialization logic of the ProgressBar class to ensure that the progress bar is disabled in non-interactive terminals - Updated the test case to verify that the progress bar is correctly disabled in non-interactive terminals Change-Id: If5fabca38ed85170cac3d02671f86ea7bef5a5a6 Signed-off-by: daiping8 <[email protected]>
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.
Code Review
This pull request effectively improves the progress bar display for non-interactive terminals by switching to a logging-based approach. The changes are well-structured, covering the core logic, configuration, and corresponding tests. My review includes a few suggestions to enhance code clarity and maintainability by simplifying logical conditions and reducing code duplication in the tests.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Ping Dai <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Ping Dai <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Ping Dai <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Ping Dai <[email protected]>
Change-Id: Ifc860815e025ad126f03b24faffba7935d334c06 Signed-off-by: daiping8 <[email protected]>
Change-Id: I051ca775f921dadb4c734fd8368f77fd62328db8 Signed-off-by: daiping8 <[email protected]>
Description
I followed the guidance in #57734 to use logging instead of progress bars for non-interactive terminals.
Specifically:
Verification
This can be verified by the following test case.
In the interactive terminal:

In the non-interactive terminal:

Related issues
Closes #57734