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

Move V2 libraries to separate folder #44434

Closed

Conversation

alzimmermsft
Copy link
Member

Description

Moves the *-v2 libraries under sdk/core to sdk/corev2 to allow for those libraries to re-use the same artifactId but under a different groupId (com.azure:azure-core -> com.azure.v2:azure-core). This updates some engineering scripts to support the new groupId and leaves a few comments on where additional support will be needed in the future.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@@ -36,13 +36,14 @@ function UpdateBomProjectElement($OldPomFilePath, $NewPomFilePath) {
Write-Output "InputDir:$($InputDir)"
Write-Output "OutputDir:$($OutputDir)"
Write-Output "Updating version_client.txt file by looking at the packages released to maven."
# TODO (alzimmer): Handle other group IDs for generating BOMs
Copy link
Member

Choose a reason for hiding this comment

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

please file a tracking Azure.Core.V2 issue for this and reference the issue number

@@ -462,8 +462,8 @@ function Get-java-GithubIoDocIndex()
# Fetch out all package metadata from csv file.
$metadata = Get-CSVMetadata -MetadataUri $MetadataUri
# Leave the track 2 packages if multiple packages fetched out.
$clientPackages = $metadata | Where-Object { $_.GroupId -eq 'com.azure' }
$nonClientPackages = $metadata | Where-Object { $_.GroupId -ne 'com.azure' -and !$clientPackages.Package.Contains($_.Package) }
$clientPackages = $metadata | Where-Object { $_.GroupId -eq 'com.azure' -or $_.GroupId -eq 'com.azure.v2' }
Copy link
Member

Choose a reason for hiding this comment

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

it would be a good habit to start defining these groupIDs as constants at the top of scripts

@@ -55,6 +55,7 @@
<module>sdk/containerservicefleet</module>
<module>sdk/contentsafety</module>
<module>sdk/core</module>
<module>sdk/corev2</module>
Copy link
Member

Choose a reason for hiding this comment

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

Please update .github/CODEOWNERS at the same time as adding this

be sure to use the new Azure.Core.V2 label at the same time

# PRLabel: %Azure.Core.V2
/sdk/corev2/   .....

@weshaggard
Copy link
Member

@alzimmermsft is there a reason you want with this path strategy? I know we haven't talked about but I was thinking a pattern like sdk/core/com.azure.v2+azure-core given we are going to need to take the groupid into account it maybe best to encode it in the package folder name.

@alzimmermsft
Copy link
Member Author

@weshaggard, the reason behind this change was to allow the V2 libraries to use their artifactId as the folder name under the sdk/<group>/. Since azure-core already exists in com.azure and will exist in com.azure.v2 both can't be under sdk/core as they'd both want to use /sdk/core/azure-core.

This should also help separate out V1 and V2 libraries from each other to make them easier to work on. They way main is right now if you want to work on Core V2 libraries you will also drag in Core V1 libraries as the module POM at the root of the SDK group includes both. And this should also simplify ci.yml files so we don't need ci.v2.yml which excludes all of V1 code and ci.yml (for V1) doesn't need to exclude all of V2 code.

@alzimmermsft
Copy link
Member Author

Closing this PR as it has moved to #44477

@alzimmermsft alzimmermsft deleted the AzCoreV2_RestructureRepo branch March 5, 2025 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core azure-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants