Skip to content

Storage - STG102 IPv6#48468

Open
browndav-msft wants to merge 10 commits intoAzure:feature/storage/stg102basefrom
browndav-msft:stg102/ipv6
Open

Storage - STG102 IPv6#48468
browndav-msft wants to merge 10 commits intoAzure:feature/storage/stg102basefrom
browndav-msft:stg102/ipv6

Conversation

@browndav-msft
Copy link
Member

  • Refactor duplicate code in BuilderHelpers and BlobUrlParts so that they use storageImplUtils.getAccountNameFromHost()
  • Left original getAccountName with single param, created overload with ServiceSubDomain
  • Created static values for URI_SUBDOMAINS in common Constants class

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Mar 19, 2026
@browndav-msft browndav-msft requested a review from Copilot March 19, 2026 02:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors storage endpoint parsing to centralize account-name extraction in StorageImplUtils, including support for suffix variants like -secondary, -dualstack, and -ipv6. It also introduces shared constants for service subdomains and adds/updates tests to validate the new parsing behavior.

Changes:

  • Replaced duplicated “account name from host” parsing in Queue and File Share builders and in BlobUrlParts with StorageImplUtils.getAccountNameFromHost(...).
  • Added StorageImplUtils.getAccountName(URL, serviceSubDomain) overload plus a new getAccountNameFromHost(host, serviceSubDomain) helper that strips known endpoint suffixes.
  • Added Constants.<Service>.URI_SUBDOMAIN constants and new/updated tests for the suffix parsing behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
sdk/storage/azure-storage-queue/.../BuilderHelper.java Uses StorageImplUtils.getAccountNameFromHost for queue endpoint parsing.
sdk/storage/azure-storage-file-share/.../BuilderHelper.java Uses StorageImplUtils.getAccountNameFromHost for file endpoint parsing and account-name extraction.
sdk/storage/azure-storage-common/.../StorageImplUtilsTests.java Adds parameterized tests to validate service-subdomain-based parsing and suffix stripping.
sdk/storage/azure-storage-common/.../StorageImplUtils.java Adds overload/helper to extract account name from host and strip known suffixes.
sdk/storage/azure-storage-common/.../Constants.java Adds shared service subdomain constants (Constants.Blob/File/Queue/Table/Dfs.URI_SUBDOMAIN).
sdk/storage/azure-storage-blob/src/test/java/BlobUrlPartsTests.java Adds a new test validating BlobUrlParts.parse() behavior for suffix variants.

@ibrandes ibrandes changed the title refactor so BuiderHelpers and BobUrlParts use StorageImplUtils Storage - STG102 IPv6 Mar 19, 2026
@ibrandes ibrandes marked this pull request as ready for review March 22, 2026 20:28
Copy link
Member

@ibrandes ibrandes left a comment

Choose a reason for hiding this comment

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

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants