Skip to content

Conversation

@qwordy
Copy link
Member

@qwordy qwordy commented Mar 2, 2021

Description

Add a file service_name.json. It maintains service information of commands.

We propose to add a "reference summaries" section. It groups command by service or topic. It offers a more organized way for users to view commands. This file is the source data of this doc page.
https://docs.microsoft.com/en-us/cli/azure/azure-cli-reference-for-data-share?view=azure-cli-latest

Twin PR, Azure/azure-cli-extensions#3083

Example

  {
    "Command": "az acr",
    "Description": "Manage private registries with Azure Container Registries.",
    "AzureServiceName": "Azure Container Registries",
    "ConversationalServiceName": "Container Registries",
    "URL": "https://docs.microsoft.com/azure/container-registry/"
  },

Testing Guide

History 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.

"URL": "https://docs.microsoft.com/azure/cost-management-billing/manage/create-subscription"
},
{
"Command": "az acr",
Copy link
Member

Choose a reason for hiding this comment

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

this file will be manually maintained in future right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes

{
"Command": "az cloud",
"Description": "Manage registered Azure clouds.",
"AzureServiceName": "Azure cloud services",
Copy link
Member

Choose a reason for hiding this comment

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

this is Not auzre cloud service, but should belongs to CLI core part. Pls work with Delora to fix excel.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

Copy link
Member

Choose a reason for hiding this comment

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

As mentioned, I would like to eliminate core and put all core stuff under the Azure CLI "service" heading

Copy link
Member Author

Choose a reason for hiding this comment

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

All Azure CLI core stuff are named "Azure CLI" in AzureServiceName now

{
"Command": "az account",
"Description": "Manage Azure subscription information.",
"AzureServiceName": "Azure core",
Copy link
Member

Choose a reason for hiding this comment

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

This is not Azure core, but Azure CLI core, pls help to work with delora to fix the excel

{
"Command": "az rest",
"Description": "Invoke a custom request.",
"AzureServiceName": "Azure core",
Copy link
Member

Choose a reason for hiding this comment

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

This is Azure CLI core, not Azure core. same as above

@yungezz
Copy link
Member

yungezz commented Mar 2, 2021

hi @fengzhou-msft could you pls review this one? thanks

"Command": "az acs",
"Description": "Manage Azure Container Services.",
"AzureServiceName": "Azure Container Services",
"ConversationalServiceName": "Container Services",
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the difference between AzureServiceName and ConversationalServiceName? If I want to aggregate all the commands from the same service in the reference documents, which one should be the key?

Copy link
Member Author

Choose a reason for hiding this comment

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

AzureServiceName has "Azure" while ConversationalServiceName does not based on observation.
@dbradish-microsoft Can you help answer it?

@qwordy qwordy requested a review from fengzhou-msft March 9, 2021 06:56
@fengzhou-msft
Copy link
Member

A question about the json format, should we add a key for each item so the item can be retrieved quickly with the key like:

{
  "az acr": {
    "Command": "az acr",
    "Description": "Manage private registries with Azure Container Registries.",
    "AzureServiceName": "Azure Container Registries",
    "ConversationalServiceName": "Container Registries",
    "URL": "https://docs.microsoft.com/azure/container-registry/"
  }
},

@qwordy
Copy link
Member Author

qwordy commented Mar 10, 2021

A question about the json format, should we add a key for each item so the item can be retrieved quickly with the key like:

{
  "az acr": {
    "Command": "az acr",
    "Description": "Manage private registries with Azure Container Registries.",
    "AzureServiceName": "Azure Container Registries",
    "ConversationalServiceName": "Container Registries",
    "URL": "https://docs.microsoft.com/azure/container-registry/"
  }
},

It is also a viable structure.

"ExtensionName": "",
"URL": "https://docs.microsoft.com/azure/container-registry/"
},
{
Copy link
Contributor

Choose a reason for hiding this comment

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

@yungezz , @qwordy , @jiasli , @fengzhou-msft

This is a duplicate comment also found in PR 3083

Important: Shuang is already keeping a new JSON file which replaces TitleMapping.json and where this information would fit perfectly. Ideally, we'd like to avoid having engineering enter autogenerated content in multiple places. Can we please check with Alice Wang and Shuang Jiang on a consolidated place for this information?

Other thoughts:

  1. I feel we should remove "Description" as it is a duplicate of the autogenerated content. There is no reason for making someone enter the same information in two different places, correct?
  2. Isn't "extensionName" also a duplicate from what is found in the _help.py or commands.py files? Shuang is currently showing this information at the top of every autogenerated extension page and he doesn't use this new file.
  3. URL is not necessary unless we want to a.) take responsibility for maintaining this link or b.) use it in our autogenerated content. I had it in SQL in order to find the Azure service home page for my reference (vs Googling it every time I needed it)
  4. I am glad to see "conversational service name" removed -- that was only for my Power BI internal reporting.

Copy link
Member Author

Choose a reason for hiding this comment

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

(1) The information of service_name.json is part of Azure CLI. We seldom put content in Azure CLI Doc repo. (2) TitleMapping.json is aggregated data. service_name.json is raw data. It is easier to read and maintain. Each entry is a command (group).

  1. Each command has a description. It is a duplicate info.
  2. The extension name is not an explicit value in _help.py or commands.py. It is also used to check which extension does not have an entry.
  3. Since we have already written them, I prefer keeping them. Autogenerated content can provide this link to allow readers to jump to the service page.
  4. Yes. This column causes confusion.

Copy link
Contributor

@dbradish-microsoft dbradish-microsoft Mar 11, 2021

Choose a reason for hiding this comment

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

@qwordy, You do realize that TitleMapping.json is going away, correct? I'm honestly not trying to put my nose into the "how" of the Azure DevOps work items for references, but I do feel that I made a tone of new work for engineering that I'd like to minimize so that you all still kind of like me for the next couple of years.

The above link is for the Azure DevOps epic. Here are the related features which all require new reference metadata content. Attached to the features is an example JSON file I created in an effort to communicate the request detail:

Missing extension information -- done
Combine core and extension references on the TOC -- the subject of this PR
Autogen of Azure service reference summaries
Add reference name, command and parameter types, status, version and deprecated message at the parameter level
Catch-all feature for any remaining data-driven metadata not already completed

Shuang's new JSON file for reference metadata is here

Copy link
Member Author

Choose a reason for hiding this comment

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

@dbradish-microsoft @daxianji007 Are these two files beneficial? My assumption is we maintain service_name.json and .docsreference.azurecli.json is generated. If it is more convenient to keep only one file, it is OK to abandon this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

@qwordy @dbradish-microsoft I am afraid the file ".docsreference.azurecli.json" cannot be automatically generated. It has some (and will have more) conceptual content, such as TitleMapping and Service Page Description. From my point of view, one file is certainly more convenient for both maintenance and Docs generation. I can also accept spliting the mapping into two service_name.json in 2 repos (actually the new pipeline is ready for both way). It is up to you.

Copy link
Contributor

Choose a reason for hiding this comment

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

@daxianji007, I agree with "the file .docsreference.azurecli.json cannot be autogenerated...", but I am not understanding the "two service_name.json in 2 repos" that we just added. The engineering team is going to have to maintain 3 different files with this design, correct? Is there a way to give @yungezz and her team a single data entry file to maintain?

Copy link
Member Author

Choose a reason for hiding this comment

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

@daxianji007 @dbradish-microsoft
I am OK with both solutions. If one file is more convenient, let's just abandon service_name.json and close these 2 PRs. One last question, who will maintain .docsreference.azurecli.json?

Copy link
Contributor

Choose a reason for hiding this comment

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

@qwordy, I defer to @yungezz or @rloutlaw to answer your question.

@qwordy
Copy link
Member Author

qwordy commented Mar 24, 2021

@dbradish-microsoft Can you revoke the "request change"? Thanks.

@qwordy
Copy link
Member Author

qwordy commented Mar 29, 2021

I moved content to these 2 PRs.
#17428
Azure/azure-cli-extensions#3186

@qwordy qwordy closed this Mar 29, 2021
@qwordy qwordy reopened this Apr 1, 2021
@qwordy
Copy link
Member Author

qwordy commented Apr 1, 2021

Reopen this PR. The following two new PRs that contain linter and service_name.json are still in review. Reviewing Azure CLI Core code is always hard. As a result, I decide to split linter and service_name.json into separate PRs. Let's merge the service_name.json PR first.
#17428
Azure/azure-cli-extensions#3186

@qwordy qwordy merged commit 7b68db9 into Azure:dev Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants