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

Update json files which combine config jsons and csv #2272

Closed
wants to merge 0 commits into from

Conversation

sima-zhu
Copy link
Contributor

@sima-zhu sima-zhu commented Jan 18, 2023

What we are doing in this PR

This is one-time batch work. This is a pre-requisite step before we update the docindex pipeline onboarding logic.

We will use docs metadata jsons as our source to update the config jsons.

Things will do after check-in this PR

In release/nightly pipeline, they will update the metadata jsons as needed.
In docindex, we will update metadata with version info and sdkCSV block.

  • For version, main branch will take whatever the latest. daily branch will take version in DevVersion from metadata json.
  • For sdkCSV, we only update docs related fields, DisplayName, ServiceName, Type, New, RepoPath, Support, EOLDate, Hide, MSDocService.

In docindex, after update from csv, we will add a step to write whatever we need back to config json files. (e.g. azure-dotnet.csv)

@@ -1,6 +1,17 @@
{
"Name": "Azure.AI.FormRecognizer",
"Version": "4.0.0",
"sdkCSV": {
Copy link
Member

Choose a reason for hiding this comment

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

Why have this nested instead of having the properties directly on the object?

Copy link
Contributor Author

@sima-zhu sima-zhu Jan 18, 2023

Choose a reason for hiding this comment

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

I am thinking to loop into sdkCSV everytime we update from csv files in docindex. So we don't need to worry about which field takes precedence, like the field isNewSDK, type, these are duplicated fields in metadata and csvFile.

The only field I combined is version. I will compare metadata json and csv version and fill with whichever the latest.
Daily docs will use the DevVersion field in metadata jsons.

Copy link
Member

Choose a reason for hiding this comment

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

Doesn't that just move the work that needs to figure out what takes precedence? We would need to interpret that at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Two situations here:

  1. Release pipeline will update docs metadata most up-to-date. So in this case, I'd take the value from docs metadata.
  2. For the package out of release pipeline, I'd take the value from csv files.

If we leave one for each field only, then in docindex pipeline we need to figure out whether we override or not. I don't think it is easy to decide.
For example, Microsoft.Azure.Storage.Blobs are outside of release pipeline, so it will look like

{
 Name: Microsoft.Azure.Storage.Blobs,
 Version: 1.1.1,
 Type: client,
 New: true;
}

In docindex, we are lack of ability to determine whether to update type and new from csv file. (docindex can't tell if it is from release pipeline or not)

If we use sdkCSV, then we can blindly update the block as the json will look like:

{
 Name: Microsoft.Azure.Storage.Blobs,
 Version: 1.1.1,
 sdkCSV: {
  Type: client;
  New: true;
 }
}

When we need to use type and new info for filter or toc updates, we can take the out layer block value first, if no such fields, then take inner block value.

@learn-build-service-prod
Copy link

Learn Build status updates of commit 6b3e2b6:

⚠️ Validation status: warnings

File Status Preview URL Details
api/overview/azure/latest/machine-learning.md ⚠️Warning View (azure-dotnet) Details
api/overview/azure/latest/machine-learning-index.md ⚠️Warning View (azure-dotnet) Details
metadata/latest/Azure.AI.FormRecognizer.json ✅Succeeded
metadata/latest/Azure.AI.Language.Conversations.json ✅Succeeded
metadata/latest/Azure.AI.Language.QuestionAnswering.json ✅Succeeded
metadata/latest/Azure.AI.MetricsAdvisor.json ✅Succeeded
metadata/latest/Azure.AI.TextAnalytics.json ✅Succeeded
metadata/latest/Azure.AI.Translation.Document.json ✅Succeeded
metadata/latest/Azure.Batch.FileStaging.json ✅Succeeded
metadata/latest/Azure.Communication.Chat.json ✅Succeeded
metadata/latest/Azure.Communication.Common.json ✅Succeeded
metadata/latest/Azure.Communication.Identity.json ✅Succeeded
metadata/latest/Azure.Communication.NetworkTraversal.json ✅Succeeded
metadata/latest/Azure.Communication.PhoneNumbers.json ✅Succeeded
metadata/latest/Azure.Communication.Sms.json ✅Succeeded
metadata/latest/Azure.Containers.ContainerRegistry.json ✅Succeeded
metadata/latest/Azure.Core.Amqp.json ✅Succeeded
metadata/latest/Azure.Core.json ✅Succeeded
metadata/latest/Azure.Data.AppConfiguration.json ✅Succeeded
metadata/latest/Azure.Data.SchemaRegistry.json ✅Succeeded
metadata/latest/Azure.Data.Tables.json ✅Succeeded
metadata/latest/Azure.DCAP.Windows.json ✅Succeeded
metadata/latest/Azure.DigitalTwins.Core.json ✅Succeeded
metadata/latest/Azure.Extensions.AspNetCore.Configuration.Secrets.json ✅Succeeded
metadata/latest/Azure.Extensions.AspNetCore.DataProtection.Blobs.json ✅Succeeded

This comment lists only the first 25 files in the pull request.

api/overview/azure/latest/machine-learning.md

  • Line 9, Column 13: [Warning: ms-service-subservice-invalid - See documentation] Invalid value for 'ms.service': 'machinelearning'.

api/overview/azure/latest/machine-learning-index.md

  • Line 0, Column 0: [Warning: h1-missing - See documentation] H1 is required. Use a single hash (#) followed by a space to create your top-level heading.
  • Line 1, Column 1: [Warning: title-missing - See documentation] Missing required attribute: 'title'. Add a title string to show in search engine results.
  • Line 1, Column 1: [Warning: ms-prod-or-service-missing - See documentation] One of the following attributes is required: 'ms.prod', 'ms.service'. Use ms.prod for on-premise products, or ms.service for cloud services.
  • Line 1, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@learn-build-service-prod
Copy link

Learn Build status updates of commit 6fb5012:

⚠️ Validation status: warnings

File Status Preview URL Details
api/overview/azure/latest/resourcemanager.containerregistry-readme.md ⚠️Warning View (azure-dotnet) Details
metadata/latest/Azure.AI.FormRecognizer.json ✅Succeeded
metadata/latest/Azure.AI.Language.Conversations.json ✅Succeeded
metadata/latest/Azure.AI.Language.QuestionAnswering.json ✅Succeeded
metadata/latest/Azure.AI.MetricsAdvisor.json ✅Succeeded
metadata/latest/Azure.AI.TextAnalytics.json ✅Succeeded
metadata/latest/Azure.AI.Translation.Document.json ✅Succeeded
metadata/latest/Azure.Batch.FileStaging.json ✅Succeeded
metadata/latest/Azure.Communication.Chat.json ✅Succeeded
metadata/latest/Azure.Communication.Common.json ✅Succeeded
metadata/latest/Azure.Communication.Identity.json ✅Succeeded
metadata/latest/Azure.Communication.NetworkTraversal.json ✅Succeeded
metadata/latest/Azure.Communication.PhoneNumbers.json ✅Succeeded
metadata/latest/Azure.Communication.Sms.json ✅Succeeded
metadata/latest/Azure.Containers.ContainerRegistry.json ✅Succeeded
metadata/latest/Azure.Core.Amqp.json ✅Succeeded
metadata/latest/Azure.Core.json ✅Succeeded
metadata/latest/Azure.Data.AppConfiguration.json ✅Succeeded
metadata/latest/Azure.Data.SchemaRegistry.json ✅Succeeded
metadata/latest/Azure.Data.Tables.json ✅Succeeded
metadata/latest/Azure.DCAP.Windows.json ✅Succeeded
metadata/latest/Azure.DigitalTwins.Core.json ✅Succeeded
metadata/latest/Azure.Extensions.AspNetCore.Configuration.Secrets.json ✅Succeeded
metadata/latest/Azure.Extensions.AspNetCore.DataProtection.Blobs.json ✅Succeeded
metadata/latest/Azure.Extensions.AspNetCore.DataProtection.Keys.json ✅Succeeded

This comment lists only the first 25 files in the pull request.

api/overview/azure/latest/resourcemanager.containerregistry-readme.md

  • Line 9, Column 13: [Warning: ms-service-subservice-invalid - See documentation] Invalid value for 'ms.service': 'containerregistry'.
  • Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.
  • Line 43, Column 3: [Suggestion: preserve-view-not-set - See documentation] You've pinned this link to a specific version of content with the view parameter. It's recommended not to pin a version unless that version is A) not the default view and B) the context is about that version specifically. To proceed with pinning a version add the &preserve-view=true to the URL. Otherwise, remove the view parameter. URL: /dotnet/api/?view=azure-dotnet

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@learn-build-service-prod
Copy link

Learn Build status updates of commit f2c2fe7:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • [Error: CannotMergeCommit] Cannot merge commit f2c2fe7da08f5ff8cc5607e80194ff3d041c7a30 in branch metadata_update of repository https://github.com/sima-zhu/azure-docs-sdk-dotnet into branch main (commit 661fe082cd054ee3ef9beb630a4302200953c2a3). Please follow this documentation: https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/ to use git.exe to resolve you content conflicts locally and then push to remote.

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@learn-build-service-prod
Copy link

Learn Build status updates of commit 2ee1463:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • [Error: CannotMergeCommit] Cannot merge commit 2ee14638e4520717af34a937420a4a4f2392808f in branch metadata_update of repository https://github.com/sima-zhu/azure-docs-sdk-dotnet into branch main (commit 661fe082cd054ee3ef9beb630a4302200953c2a3). Please follow this documentation: https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/ to use git.exe to resolve you content conflicts locally and then push to remote.

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@learn-build-service-prod
Copy link

Learn Build status updates of commit 211fba4:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • [Error: CannotMergeCommit] Cannot merge commit 211fba44d0dc523a9eb53a46cf83b695e960431a in branch metadata_update of repository https://github.com/sima-zhu/azure-docs-sdk-dotnet into branch main (commit 661fe082cd054ee3ef9beb630a4302200953c2a3). Please follow this documentation: https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/ to use git.exe to resolve you content conflicts locally and then push to remote.

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

@learn-build-service-prod
Copy link

Learn Build status updates of commit 9a6b76d:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • [Error: GitBranchDeletedOrForcePushed]
Cannot sync git repo to specified commit because ref +refs/pull/2272/merge has been deleted or has been force pushed.
 If this is pull request, please ensure it is mergeable (no merge conflict) and open (not closed).

For more details, please refer to the build report.

If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants