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

Only make one call to GetPackageInfoJson #8152

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

JimSuplizio
Copy link
Member

Update-DocsMsMetadata.ps1 is the entry point for MS Docs updates in our pipelines.

Hoist the $packageInfo = GetPackageInfoJson $packageInfoLocation out of the if ($ValidateDocsMsPackagesFn... if check and pass the packageInfo into the UpdateDocsMsMetadataForPackage call. The reason for this is that UpdateDocsMsMetadataForPackage also calls GetPackageInfo and if the $GetDocsMsDevLanguageSpecificPackageInfoFn function pointer is defined, like it is for Java, JavaScript and Python, it ends up making calls across the network to get pieces to add to the packageInfo Json. In the cases of Java and Python, it's pulling the javadoc or .whl to crack open to get the namespaces. For JavaScript, it's invoking a rest method. Hoisting the call out of the if statement and passing in the structure to UpdateDocsMsMetadataForPackage prevents a second set of network calls to get information that we literally just got.

@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

JimSuplizio added a commit to Azure/azure-sdk-for-js that referenced this pull request Apr 23, 2024
@JimSuplizio JimSuplizio enabled auto-merge (squash) April 23, 2024 23:37
@JimSuplizio JimSuplizio merged commit 9a5eb9f into Azure:main Apr 23, 2024
12 checks passed
@JimSuplizio JimSuplizio deleted the OneGetPackageInfoJsonCall branch April 23, 2024 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants