-
Notifications
You must be signed in to change notification settings - Fork 183
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
Only make one call to GetPackageInfoJson #8152
Conversation
The following pipelines have been queued for testing: |
The following pipelines have been queued for testing: |
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#8152 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) --------- Co-authored-by: James Suplizio <[email protected]>
Update-DocsMsMetadata.ps1 is the entry point for MS Docs updates in our pipelines.
Hoist the
$packageInfo = GetPackageInfoJson $packageInfoLocation
out of theif ($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.