Skip to content

Conversation

rylev
Copy link
Contributor

@rylev rylev commented Sep 5, 2022

This is the next step in the process of removing StorageClient following #1062 and #1057.

Creating the various clients in azure_storage_queues now mirrors how things work with blob storage, data lake, and cosmos.

@rylev rylev requested a review from bmc-msft September 5, 2022 09:48
Copy link
Contributor

@gorzell gorzell left a comment

Choose a reason for hiding this comment

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

Maybe not something to address in this PR, but I am not convinced that all of these url construction functions should actually be fallible. In many cases it seems like if they can't actually construct a valid URL they should actually panic. In most cases they aren't really using information provided by the caller anyway, so I am not really sure how you could even recover from the error.

Comment on lines +46 to 55
pub(crate) fn finalize_request(
&self,
url: url::Url,
method: azure_core::Method,
headers: azure_core::headers::Headers,
request_body: Option<azure_core::Body>,
) -> azure_core::Result<Request> {
self.client
.finalize_request(url, method, headers, request_body)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: Are there any cases where this isn't delegated? If not why not just have one shared function? It may also match similar usages in storage_blob, so maybe they can all shared one function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, this probably makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On second thought I'd like to do this in a separate PR.

@rylev
Copy link
Contributor Author

rylev commented Sep 6, 2022

@gorzell the urls use the account name which is user provided - we could check at construction that the username is url safe and then not have to return fallible url methods, but I would leave that for a follow-up.

@rylev rylev merged commit ed0ac84 into Azure:main Sep 6, 2022
@rylev rylev deleted the queue-no-storage-client branch September 6, 2022 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants