azure-sdk-for-java
azure-sdk-for-java copied to clipboard
PackageInfo creation and ServiceDirectories in ci.yml files
This needs to be fixed before the PR pipeline, for Java is implemented. Back in 2021 there were changes made to how the packageInfo json were computed for a given service area but this wasn't correct and has the following issues:
- It's too greedy - PackageInfo files should only be being created for Artifacts and not for AdditionalModules. A good example for this would be in sdk/core. azure-core-perf is an additional module but because it's in core service directory the, the common function Get-PkgPropsForEntireService because the function pointer implementation for GetPackageInfoFromRepoFn, Get-java-PackageInfoFromRepo, was written to only look at that POM file in the directory and never looks at the ci.yml file to see if one should be being created. Looking at the core pipeline's publishedArtifacts packages/packageInfo files, notice that every library in core has a packageInfo and shouldn't.
- Also back in 2021, due to various reasons, ci.yml files are no longer limited to the sdk/ServiceDirectory but can also be in the sdk/ServiceDirectory/LibraryDirectory. A good example of this would sdk/communication where each library has its own ci.yml. The serviceDirectory in the individual library ci.yml files should have been 'communication/<libraryName>' but since it was just listed as 'communication' each pipeline ends up having the packageInfo files for all of the libraries in the sdk/communication directory. For example, java - azure-communication-callautomation's publishedArtifacts has every communication library's packageInfo in the pacakges/PackageInfo.
There's also an issue with the Get-PkgPropsForEntireService function that needs to be fixed in eng/common first.