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
[storage][blob] Create BlobBatchClient based on API review feedback #5634
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments for deleteBlob and setBlobTierAccess APIs, please ensure the comments across languages, I think that would be important as well, as the document is exposed to users and it's their first guide. Refers to: sdk/storage/storage-blob/src/BlobBatch.ts:123 in 42fee72. [](commit_id = 42fee72, deletion_comment = False) |
* ``` | ||
* | ||
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch | ||
* Creates a BlobBatchClient object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: missed . at end, and please ensure the comment alignment with other languages, e.g.: should here be link of introduction to BlobBatchClient object?
@@ -12,7 +12,7 @@ export * from "./BlobClient"; | |||
export * from "./AppendBlobClient"; | |||
export * from "./BlockBlobClient"; | |||
export * from "./PageBlobClient"; | |||
export * from "./BatchRequest"; | |||
export * from "./BlobBatch"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BlobBatchClient.ts is missed here?
@@ -16,7 +16,7 @@ export * from "./AccountSASPermissions"; | |||
export * from "./AccountSASResourceTypes"; | |||
export * from "./AccountSASServices"; | |||
export * from "./AccountSASSignatureValues"; | |||
export * from "./BatchRequest"; | |||
export * from "./BlobBatch"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BlobBatchClient.ts is missed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
@@ -126,7 +113,7 @@ export class BatchDeleteRequest extends BatchRequest { | |||
* @returns {Promise<void>} | |||
* @memberof BatchDeleteRequest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BatchDeleteRequest [](start = 15, length = 18)
needs to update
* @param {BlobBatch} batchRequest A set of Delete or SetTier operations. | ||
* @param {BlobBatchSubmitBatchOptionalParams} [options] | ||
* @returns {Promise<BlobBatchSubmitBatchResponse>} | ||
* @memberof BlobServiceClient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BlobServiceClient [](start = 15, length = 17)
typo, please check all inline Jsdoc comments align with new added classes
* Fix a number of comment issues * Prevent consumer from mixing operation types inside a single batch * Actually export the new types
I aligned the comments with .NET, which seems to have copied them verbatim from the REST documentation. Let me know if this is what you expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -49,14 +49,16 @@ export interface BatchSubRequest { | |||
} | |||
|
|||
/** | |||
* A BatchRequest represents a based class for BatchDeleteRequest and BatchSetTierRequest. | |||
* A BlobBatch represents an aggregated set of operations on blobs. | |||
* Currently, only delete and setAccessTier are supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would better add comments like: only one kind of operation is supported per batch. This might be applicable to other langs.
Please remember to test it with CI and live account testing, and test samples with import the package to ensure everything works. |
* This operation does not update the blob's ETag. | ||
* For detailed information about block blob level tiering | ||
* see [hot, cool, and archive access tiers](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers). | ||
* The operation will be authenticated and authorized | ||
* with specified credential.See [blob batch authorization details](https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#authorization). | ||
* | ||
* @param {string} url The url of the blob resource to delete. | ||
* @param {Credential} credential The credential to be used for authentication and authorization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SharedKeyCredential | AnonymousCredential | TokenCredential
Please go through types for JSDoc parameters
/azp run js - storage-blob - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
This change:
BatchRequest
toBatchBlob
BatchDeleteRequest
andBatchSetTierRequest
intoBatchBlob
submitBatch
code fromBlobServiceClient
into newBlobBatchClient
deleteBlobs
andsetBlobsAccessTier
helpers onBlobBatchClient
deleteBlobs
andsetBlobsAccessTier
Fixes #5527