Skip to content

[Storage] Flattened Client Refactor#3176

Merged
vincenttran-msft merged 29 commits intoAzure:mainfrom
vincenttran-msft:vincenttran/flattened_clients
Oct 29, 2025
Merged

[Storage] Flattened Client Refactor#3176
vincenttran-msft merged 29 commits intoAzure:mainfrom
vincenttran-msft:vincenttran/flattened_clients

Conversation

@vincenttran-msft
Copy link
Member

@vincenttran-msft vincenttran-msft commented Oct 10, 2025

.tsp: Azure/azure-rest-api-specs#37830

  • Uses our new TypeSpec definition for the underlying generated code, which now uses a flattened client structure rather than a hierarchical client structure
  • Refactors all convenience layer clients to be compatible with the new generated code
  • As a result of the refactor, we now support SAS URL support
  • Added from_url methods to support client construction directly from URLs, as well as specifically URLs already containing SAS parameters

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Oct 10, 2025
@heaths
Copy link
Member

heaths commented Oct 10, 2025

@vincenttran-msft is there a reason PRs with similar titles keep getting created and closed? Everything the PRs do you can do locally e.g., cargo test -p azure_storage_blob or cargo clippy -p azure_storage_blob. This is faster for the inner dev loop and less disruptive.

@vincenttran-msft
Copy link
Member Author

@vincenttran-msft is there a reason PRs with similar titles keep getting created and closed? Everything the PRs do you can do locally e.g., cargo test -p azure_storage_blob or cargo clippy -p azure_storage_blob. This is faster for the inner dev loop and less disruptive.

Sorry for that. I am not concerned about using these for CI pipelines or Analyze checks, these are because there have been some design decisions that we have been discussing internally on the DevEx side, and so I had both proof-of-concepts in two separate branches and we were reviewing them side by side. Having them up in draft PRs was what I thought was easiest to allow reviewers to pre-read at their leisure and also take a look separately if they weren't as concerned with what was being projected during our screenshare. I prematurely closed one of them thinking we were going with another design, but after our meeting yesterday we ended up going back in the other direction.

@heaths
Copy link
Member

heaths commented Oct 10, 2025

You can reopen PRs.

@github-actions
Copy link

github-actions bot commented Oct 17, 2025

API Change Check

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

azure_storage_blob

@vincenttran-msft
Copy link
Member Author

@LarryOsterman Hi Larry, any ideas on the test failures in azure_messaging_eventhubs_checkpointstore_blob? Here is the beginning of the relevant portion of the logs:
https://dev.azure.com/azure-sdk/public/_build/results?buildId=5472054&view=logs&j=b3705cf4-1bfd-5944-2427-bf6d701924fc&t=aeef5f29-1c5f-5421-3007-7ccba6bbfcec&l=796

The main change that would affect your codepath is that BlobContainerClient's new() constructor changed signatures from:

 pub fn new(
        endpoint: &str,
        container_name: String,
        credential: Arc<dyn TokenCredential>,
        options: Option<BlobContainerClientOptions>,
    ) -> Result<Self> {

to

pub fn new(
        endpoint: &str,
        container_name: &str,
        credential: Option<Arc<dyn TokenCredential>>,
        options: Option<BlobContainerClientOptions>,
    ) -> Result<Self> {

Namely:

  1. container_name went from owned String to &str
  2. credential is now optional to support public access

I did go ahead and update the relevant call-sites to get everything compiling nicely, but I seem to have broke the unit tests in the process 😞

Thanks!

@vincenttran-msft vincenttran-msft marked this pull request as ready for review October 21, 2025 02:34
Copilot AI review requested due to automatic review settings October 21, 2025 02:34
@vincenttran-msft vincenttran-msft marked this pull request as ready for review October 22, 2025 03:07
Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

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

Apart from my one overarching comment about idiomacy, the rest of the changes look great!

@vincenttran-msft vincenttran-msft marked this pull request as draft October 24, 2025 00:50
@vincenttran-msft vincenttran-msft marked this pull request as ready for review October 24, 2025 01:10
@vincenttran-msft vincenttran-msft marked this pull request as draft October 25, 2025 00:00
@vincenttran-msft vincenttran-msft marked this pull request as ready for review October 27, 2025 19:03
Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

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

Code is fine, but not sure why you downgraded package specs. We've been specific to date.

@vincenttran-msft vincenttran-msft merged commit 3842bdc into Azure:main Oct 29, 2025
17 checks passed
@vincenttran-msft vincenttran-msft deleted the vincenttran/flattened_clients branch October 29, 2025 18:14
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.

6 participants