Skip to content

Conversation

@jeremymeng
Copy link
Member

No description provided.

@jeremymeng jeremymeng requested a review from bterlson as a code owner October 24, 2025 00:08
Copilot AI review requested due to automatic review settings October 24, 2025 00:08
@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Oct 24, 2025
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-blob to deduplicate code by moving common functionality to storage-common. The changes primarily involve removing duplicate implementations of credentials, policies, and utilities from storage-blob and importing them from storage-common instead. This improves maintainability and reduces code duplication across storage packages.

  • Removed duplicate policy implementations (StorageSharedKeyCredentialPolicy, StorageRetryPolicy, StorageBrowserPolicy, etc.)
  • Removed duplicate credential implementations (StorageSharedKeyCredential, AnonymousCredential)
  • Updated imports across the codebase to use @azure/storage-common
  • Updated documentation URLs to remove locale prefix (en-us)

Reviewed Changes

Copilot reviewed 45 out of 45 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/storage/storage-common/src/utils/utils.common.ts Updated documentation URLs to remove locale prefix
sdk/storage/storage-common/src/policies/StorageSharedKeyCredentialPolicyV2.ts Updated documentation URLs to remove locale prefix
sdk/storage/storage-common/src/policies/StorageSharedKeyCredentialPolicy.ts Updated documentation URLs to remove locale prefix
sdk/storage/storage-common/src/StorageRetryPolicyFactory.ts Updated documentation URLs to remove locale prefix
sdk/storage/storage-blob/test/utils/index.ts Updated import to use StorageSharedKeyCredential from @azure/storage-common
sdk/storage/storage-blob/test/node/sas.spec.ts Reorganized imports to separate storage-common types from local types
sdk/storage/storage-blob/test/node/pageblobclient.spec.ts Updated imports to use StorageSharedKeyCredential from @azure/storage-common
sdk/storage/storage-blob/test/node/containerclient.spec.ts Updated imports to use StorageSharedKeyCredential from @azure/storage-common
sdk/storage/storage-blob/test/node/blockblobclient.spec.ts Updated imports to use StorageSharedKeyCredential and AnonymousCredential from @azure/storage-common
sdk/storage/storage-blob/test/node/blobserviceclient.spec.ts Updated imports to use StorageSharedKeyCredential from @azure/storage-common
sdk/storage/storage-blob/test/node/blobclient.spec.ts Updated imports to use StorageSharedKeyCredential from @azure/storage-common
sdk/storage/storage-blob/test/node/appendblobclient.spec.ts Updated imports to use StorageSharedKeyCredential from @azure/storage-common
sdk/storage/storage-blob/test/blobbatch.spec.ts Updated imports to use StorageSharedKeyCredential from @azure/storage-common
sdk/storage/storage-blob/src/sas/BlobSASSignatureValues.ts Updated import to use StorageSharedKeyCredential from @azure/storage-common
sdk/storage/storage-blob/src/sas/AccountSASSignatureValues.ts Updated import to use StorageSharedKeyCredential from @azure/storage-common
sdk/storage/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2-browser.mts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/policies/StorageRetryPolicyV2.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/policies/StorageRetryPolicyType.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/policies/StorageRetryPolicy.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/policies/StorageCorrectContentLengthPolicy.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/policies/StorageCorrectContentLengthPolicy-browser.mts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/policies/StorageBrowserPolicyV2.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/policies/StorageBrowserPolicy.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/policies/RequestPolicy.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/policies/CredentialPolicy.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/policies/AnonymousCredentialPolicy.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/index.ts Re-exported types from @azure/storage-common for backward compatibility
sdk/storage/storage-blob/src/index-browser.mts Re-exported types from @azure/storage-common for backward compatibility
sdk/storage/storage-blob/src/credentials/StorageSharedKeyCredential.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/credentials/StorageSharedKeyCredential-browser.mts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/credentials/Credential.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/credentials/AnonymousCredential.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/StorageRetryPolicyFactory.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/StorageClient.ts Updated imports to use credentials from @azure/storage-common
sdk/storage/storage-blob/src/StorageBrowserPolicyFactory.ts Removed entire file - implementation moved to @azure/storage-common
sdk/storage/storage-blob/src/Pipeline.ts Updated imports to use policies and credentials from @azure/storage-common
sdk/storage/storage-blob/src/ContainerClient.ts Updated imports and minor comment formatting adjustment
sdk/storage/storage-blob/src/Clients.ts Updated imports to use credentials from @azure/storage-common
sdk/storage/storage-blob/src/BlobServiceClient.ts Updated imports to use credentials from @azure/storage-common
sdk/storage/storage-blob/src/BlobBatchClient.ts Updated imports to use credentials from @azure/storage-common
sdk/storage/storage-blob/src/BlobBatch.ts Updated imports to use credentials and policies from @azure/storage-common
sdk/storage/storage-blob/review/storage-blob-node.api.md Updated API surface to show re-exports from @azure/storage-common
sdk/storage/storage-blob/review/storage-blob-browser.api.diff.md Updated browser-specific API diff to reflect changes
Comments suppressed due to low confidence (1)

sdk/storage/storage-blob/src/ContainerClient.ts:1

  • The comment 'Example using for await syntax' should be placed before the for await loop initialization to better reflect what it documents. Currently, it appears after the variable initialization, which may be confusing.
// Copyright (c) Microsoft Corporation.

@github-actions
Copy link

github-actions bot commented Oct 24, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

@azure/storage-blob

@EmmaZhu
Copy link
Member

EmmaZhu commented Nov 6, 2025

@jeremymeng , the change LGTM. I'll approve it. It may introduce API View change which will need your approval later.

@jeremymeng jeremymeng merged commit 47e5f27 into Azure:main Nov 6, 2025
13 checks passed
@jeremymeng jeremymeng deleted the storage/dedupe-blob branch November 6, 2025 18:00
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.

2 participants