azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

Use package info json files to figure out what to generate namesapces for

Open JimSuplizio opened this issue 1 year ago • 0 comments

Some of this work I'm doing in preparation of a pull request pipeline similar to what was implemented for Python. Instead of kicking off multiple area pipelines, it only kicks off a single one and uses the diff to figure out what needs to be run.

Unlike existing pipelines, the PR pipeline won't have an Artifacts list from a ci.yml, meaning that some things that currently expect a list Artifacts needs to process differently. Updates were recently made to the script that gathers the package properties to add the artifact details into the package info files which is contain the metadata for that artifact's entry pulled from the ci.yml file. For example, everything under the ArtifactDetails in the PackageInfo json for azure-aot-graalvm-support is directly from the Artifacts entry. Note: The script is generic, made to run in all of the azure-sdk-repositories and releaseInBatch is java specific and won't be set in the packageInfo, it's never used from there, it's only ever used when devops is creating the yml for the pipeline run from the template. { "Name": "azure-aot-graalvm-support", "Version": "1.0.0-beta.4", "DevVersion": null, "DirectoryPath": "sdk/aot/azure-aot-graalvm-support", "ServiceDirectory": "aot", "ReadMePath": "sdk/aot/azure-aot-graalvm-support/README.md", "ChangeLogPath": "sdk/aot/azure-aot-graalvm-support/CHANGELOG.md", "Group": "com.azure", "SdkType": "client", "IsNewSdk": true, "ArtifactName": "azure-aot-graalvm-support", "ReleaseStatus": "Unreleased", "IncludedForValidation": false, "AdditionalValidationPackages": null, "ArtifactDetails": { "name": "azure-aot-graalvm-support", "groupId": "com.azure", "safeName": "azureaotgraalvmsupport", "releaseInBatch": "${{ parameters.release_azureaotgraalvmsupport }}", "skipPublishDocMs": true } }

  • The Save-Package-Namespaces-Property script would normally take the artifacts list as an argument and update the PackageInfo file with namespaces for those libraries that have MSDocs published. This is being changed to scan the packageInfo files and uses the ArtifactDetails in that file to determine if it needs to figure out, or skip, adding namespaces.

The following files are being updated because they have samples which have artifact entries in version_client.txt and they're picked up by the script that's building the PackageInfo files but without an Artifacts, or AdditionalModules, entry in their service directory's ci.yml file these never get built and should be.

  • sdk/aot/ci.yml - com.azure:azure-aot-graalvm-samples;1.0.0-beta.1;1.0.0-beta.1
  • sdk/core/ci.yml - com.azure:azure-core-tracing-opentelemetry-samples;1.0.0-beta.1;1.0.0-beta.1
  • sdk/identity/ci.yml - com.azure:azure-identity-broker-samples;1.0.0-beta.1;1.0.0-beta.1

JimSuplizio avatar Oct 15 '24 16:10 JimSuplizio