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 service level readme #3267

Merged
15 commits merged into from
Jun 14, 2022
Merged

Update service level readme #3267

15 commits merged into from
Jun 14, 2022

Conversation

sima-zhu
Copy link
Contributor

@sima-zhu sima-zhu commented May 2, 2022

Docs.Ms does not have service level readme automation.

This is a miss on the docs automation.

Have the daily docindex to generate the service level readme.
Generate the {*-index.d} for client packages and mgmt packages table.

Testing in JS: https://github.com/Azure/azure-sdk-for-js/pull/21707/files
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=1605400&view=results

Service level Readmes:
https://github.com/MicrosoftDocs/azure-docs-sdk-node/blob/daily/2022-05-02-ci-succeeded/docs-ref-services/latest/storage.md

Docs.Ms:
https://review.docs.microsoft.com/en-us/javascript/api/overview/azure/key-vault?view=azure-node-latest&branch=daily%2F2022-05-02-ci-succeeded

In docs.ms:
image
In service level readme:
image

Resolve #3278

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@sima-zhu sima-zhu self-assigned this May 3, 2022
@sima-zhu sima-zhu added the Central-EngSys This issue is owned by the Engineering System team. label May 3, 2022
@weshaggard
Copy link
Member

@sima-zhu is there an associated issue that this PR should be linked to? Also what is the overall plan here? Do we want to only generate it but manually use it if teams want to?

@sima-zhu
Copy link
Contributor Author

sima-zhu commented May 5, 2022

@weshaggard I just created an issue with the proposal inside. It is linked through the connect issue.

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@sima-zhu sima-zhu requested a review from weshaggard May 12, 2022 16:55
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@sima-zhu sima-zhu mentioned this pull request Jun 10, 2022
4 tasks
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

$servicePackages = $packagesForService.Values.Where({ $_.ServiceName -eq $service })


$serviceReadmeBaseName = $service.ToLower().Replace(' ', '-').Replace('/', '-')
Copy link
Member

Choose a reason for hiding this comment

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

In this case we replace space with - but in other metadata-helpers we replace space with empty. Should those be consistent? If so this transform seems like a good helper function to share the implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should align this with toc.
Totally agree to have helper function.

Will have helper function and align with toc for now.
Will sync with @danieljurek for the most accurate fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The place in metadata is to read the service from github codeowner files. The naming strategy are not the same.

@@ -0,0 +1,37 @@
function GetPackageKey($pkg) {
Copy link
Member

Choose a reason for hiding this comment

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

Do you expect to consume these helpers in the other script at a later 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.

Yes, minimize the scope of the script for now.

$packageLevelReadme = ""
if (Test-Path "Function:$GetPackageLevelReadmeFn") {
$packageLevelReadme = &$GetPackageLevelReadmeFn -packageMetadata $pkg
}
Copy link
Member

Choose a reason for hiding this comment

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

If this function doesn't exist in a language will this produce an invalid result?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We used the function to find the package level readme.
If not exist, then the return is invalid package level readme, then we do not add the link under reference table

Copy link
Contributor Author

@sima-zhu sima-zhu Jun 14, 2022

Choose a reason for hiding this comment

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

This is the path check:

(Test-Path (Join-Path $readmeFolder -ChildPath "$packageLevelReadme-readme.md"))

Copy link
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

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

A couple comments but otherwise looks good. Please finish your testing and reach out to @scbedd for one more pass.

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow


Set-StrictMode -Version 3

function create-metadata-table($readmeFolder, $readmeName, $moniker, $msService, $clientTableLink, $mgmtTableLink, $serviceName)
Copy link
Member

@scbedd scbedd Jun 13, 2022

Choose a reason for hiding this comment

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

Is there a guiding principle in the naming convention? snake-like-case vs PascalCase like the next function below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will fix.

$null = New-Item -Path $readmePath -Force
$lang = $LanguageDisplayName
$langTitle = "Azure $serviceName SDK for $lang"
$header = GenerateDocsMsMetadata -language $lang -langTitle $langTitle -serviceName $serviceName `
Copy link
Member

Choose a reason for hiding this comment

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

Just FYI. this "header" thing is called the yml front-matter by the docs team. No reason to rename at this point, but I'll remind on your next pass over this code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rename is not a big deal. Will align with the docs and add comments for reference.

Add-Content -Path $readmePath -Value $content
}

function CompareAndMergeMetadata ($original, $updated) {
Copy link
Member

Choose a reason for hiding this comment

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

Intentional to only handle adds right? Removes will be rare enough that we will handle them manually?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly. So people is able to add specific metadata for their service needs without override

Copy link
Member

@scbedd scbedd left a comment

Choose a reason for hiding this comment

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

Have some clarifying questions, but nothing jumps out at me anymore!

Integration PR will be per language correct?

Adding the call to Service-Level-Readme-Automation.ps1 as well as populating LanguageSettings:

  • Get-${Language}-OnboardedDocsMsPackagesForMoniker
  • Get-${Language}-PackageLevelReadme

@sima-zhu
Copy link
Contributor Author

Have some clarifying questions, but nothing jumps out at me anymore!

Integration PR will be per language correct?

Adding the call to Service-Level-Readme-Automation.ps1 as well as populating LanguageSettings:

  • Get-${Language}-OnboardedDocsMsPackagesForMoniker
  • Get-${Language}-PackageLevelReadme

You are exactly right for the step moving forward. This is very initial implementation. Will have several followups to launch this.

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@ghost
Copy link

ghost commented Jun 14, 2022

Hello @azure-sdk!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit f0295a5 into Azure:main Jun 14, 2022
@sima-zhu sima-zhu deleted the service_readme branch June 14, 2022 15:57
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Central-EngSys This issue is owned by the Engineering System team. Docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automation on service level readme
7 participants