-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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] Flattening Client Hierarchy - storage-queue #5579
[Storage] Flattening Client Hierarchy - storage-queue #5579
Conversation
this.pipeline.toServiceClientOptions() | ||
); | ||
// Override protocol layer's default content-type | ||
(storageClientContext as any).requestContentType = undefined; |
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.
extract common code to a helper that takes url and pipeline then returns a storage client context
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.
Done.
Considering a followup PR for updating test titles/test refactoring. Any opinions? |
*/ | ||
public async enqueueMessage( | ||
messageText: string, | ||
options: MessagesEnqueueOptions = {} |
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.
The name MessagesEnqueueOptions
was for the enqueue
method on MessagesClient
.
Now that it is moved to QueueClient
and the method is enqueueMessage
, should this be renamed to EnqueueMessageOptions
?
MessagesEnqueueOptions
-> EnqueueMessageOptions
or QueueEnqueueMessageOptions
.
Same is applicable for many other options/responses interfaces in this file.
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.
We will have to rename these for consistency. Let's leave them as is for now.
|
||
// Override protocol layer's default content-type | ||
const storageClientContext = this.storageClientContext as any; | ||
storageClientContext.requestContentType = undefined; |
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.
Refactoring - Defined getStorageClientContext
in utils.common.ts file so that it can be reused for messagesContext and messageIdContext
public async createQueue( | ||
queueName: string, | ||
options: QueueCreateOptions = {} | ||
): Promise<Models.QueueCreateResponse> { |
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.
Newly added.
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.
Shouldn't this have a tracing span for it?
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.
Logged an issue #5595
* @returns {Promise<Models.QueueDeleteResponse>} Response data for the Queue delete operation. | ||
* @memberof QueueServiceClient | ||
*/ | ||
public async deleteQueue( |
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.
Newly added.
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.
Tracing span?
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.
I thought about it but since this is only a pass-through call it looks okay to not have the span?
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.
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.
@jeremymeng, @xirzec says that it would be good to have the consistency, If we have spans at both the places, we'll know the actual path it took.
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.
This PR proposes the new shape of QueueClient and QueueServiceClient.
Changes in this PR.
The final version is consistent with the .NET.