-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Core] Add spinner progress bar for long running operation #17262
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
|
Core |
| class IndeterminateProgressBar: | ||
| """ Define progress bar update view """ | ||
| def __init__(self, cli_ctx, message="Running"): | ||
| self.cli_ctx = cli_ctx |
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.
Consider dropping cli_ctx reference if it is unused.
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.
It is used in L181 to get progress controller
|
I compared the implement before and found that the original way support spinner already. There's just a bug winthin azure-cli/src/azure-cli-core/azure/cli/core/__init__.py Lines 118 to 124 in 7d0dd03
LRO calls To support spinning for LRO, we only need to log |
Yes, there is an issue in previous design. Here I don't use add() because I want to expand progress bar capability with update_progress(), which could have more progress bar UI. |
Co-authored-by: kai ru <[email protected]>
Description
This PR is one part for progress bar project.

As we already in beta version for several months, I plan to move indeterminate progress bar with spinner to all long running operation in azure cli as shown below:
But I have to mention for commands like
network vnet create, which is long running operation, but not hornor CLILongRunningOperationclass, will not have progress bar.Testing Guide
az storage account createaz vm createHistory Notes
[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.