Skip to content
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

[Hint] Post-output hint #16242

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

[Hint] Post-output hint #16242

wants to merge 1 commit into from

Conversation

jiasli
Copy link
Member

@jiasli jiasli commented Dec 11, 2020

Description

This PR requires

Add experimental post-output hint which is shown after a command succeeds (except for az --version which follows a different code path).

Testing Guide

Currently, only az login and az demo hint is registered with hinters:

> az demo hint
This command is implicitly deprecated because command group 'demo' is deprecated and will be removed in a future release.
{
  "cloudName": "AzureCloud",
  "homeTenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a",
  "id": "0b1f6471-1bf0-4dda-aec3-cb9272f09590",
  "isDefault": true,
  "managedByTenants": [
    {
      "tenantId": "2f4a9838-26b7-47ee-be60-ccc1fdec5953"
    }
  ],
  "name": "AzureSDKTest",
  "state": "Enabled",
  "tenantId": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a",
  "user": {
    "name": "[email protected]",
    "type": "user"
  }
}
The hinter can parse the output to show a "projection" of the output, like

       Subscription name: AzureSDKTest
         Subscription ID: 0b1f6471-1bf0-4dda-aec3-cb9272f09590
                    User: [email protected]

You may then instruct the user to run additional commands:

az account set <X>            Set your default subscription account
az config set output=table    Set your default output to be in table format
az feedback                   File us your latest issue encountered
az next                       Get some ideas on next steps
az upgrade                    Set your default subscription account

You may also show a hyperlink for more detail: https://docs.microsoft.com/cli/azure/

History Notes

[Hint] az login: Add experimental post-output hint

yonzhan
yonzhan previously approved these changes Dec 11, 2020
Copy link
Collaborator

@yonzhan yonzhan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@chenlomis chenlomis left a comment

Choose a reason for hiding this comment

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

Very cool!
To confirm, some of the text and output under def login_hinters are still in discussion right?
This is just to review that post output hint is now supported under login and also the demo command ..(?)

@jiasli jiasli added the hint label Dec 15, 2020
@yonzhan yonzhan modified the milestones: S180, S181 Dec 26, 2020
@jiasli
Copy link
Member Author

jiasli commented Jan 8, 2021

/azp run

@azure-pipelines
Copy link

Pull request contains merge conflicts.

@yonzhan yonzhan modified the milestones: S181, S182 Jan 16, 2021
@yonzhan yonzhan modified the milestones: S182, S183 Feb 6, 2021
@yonzhan yonzhan modified the milestones: S183 - For Ignite, S184 Feb 26, 2021
@yonzhan yonzhan modified the milestones: S184, S185 Mar 20, 2021
@yonzhan yonzhan modified the milestones: S185, S186 Apr 10, 2021
@yonzhan yonzhan modified the milestones: S186, S187 May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants