-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Profile] az login: Format output
#21520
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
| formatted_subs = [] | ||
| # format the output for readability | ||
| for sub in all_subs: | ||
| formatted = OrderedDict() |
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.
Nice :)
|
@jiasli for awareness |
|
To be honest, I personally don't agree with this change:
For these messages: We tried to implement them via a new feature called post-output hint (#16242), but that feature got suspended. There is also another new feature called |
jiasli
left a comment
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.
We need (a lot) more discussion about this BREAKING CHANGE.
@jiasli I definitely agree with this and apologize if this seems like an unsolicited or unneeded change. This work is all very preliminary and I opened a pull request as a means to share progress and not to try and get these changes merged without more discussion (hence the PR is a draft and marked as do-not-merge). @panchagnula directed the work here and can offer more info on the rationale for this change. My understanding is that internal users were confused about the output of |
|
@jiasli / @zhoxing-ms this is just a proof of concept PR & hence left as draft. There is a lot of feedback we are receiving on az login, that we decided to test some changes out. Do we have any telemetry for the az logout usage & how many customers would be impacted? Where can we learn more about the upcoming plans/ changes to core-cli infra? ex. Azdev init (unsure about the entire interactive approach btw). Thanks! |
Yes, this is |
@zhoxing-ms thanks for sharing this blog. This is a good start. I wanted to call out though from the feedback being received that is mostly control the response object by command. i.e config will change the response type across all CLI commands, & using Set_output_format is for the command to return a subset of the object response & in a better fashion & adding some debug text on what the next steps should be. Ex, in this POC , text showing how to set the default subscription post login was added. |

Description
Changes the output for
az loginto be more human-readable / user-friendly in response to internal feedback.isDefault,name,state, andsubscriptionIdThe user can still get a json response by running
az login --output jsonOutput before the proposed change:

Output after proposed change:

Testing Guide
az loginHistory Notes
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.