Skip to content

Conversation

sebastienros
Copy link
Member

@sebastienros sebastienros commented Jul 3, 2025

Description

  • Rename service‐level methods (AddBlobs, AddQueues, AddTables) to AddBlobService, AddQueueService, AddTableService (and their client‐builder equivalents).
  • Introduce AddAzureQueueServiceClient, AddAzureQueue, and support for QueueClient registration alongside existing BlobServiceClient flows.
  • Creates queues automatically (deployment and emulator).

I added the API diff to make it easier to see the new/obsolete methods. I don't think it will be necessary to remove these before merging (right?).

TBD:

  • Generate playground app manifests
  • Test all updated playground apps

Fixes #6875

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@Copilot Copilot AI review requested due to automatic review settings July 3, 2025 10:43
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Jul 3, 2025
Copy link
Contributor

@Copilot 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 the Azure Storage API surface to unify naming, add first‐class support for queues and tables, and update all downstream usages (tests, samples, snapshots, docs) to the new methods.

  • Rename service‐level methods (AddBlobs, AddQueues, AddTables) to AddBlobService, AddQueueService, AddTableService (and their client‐builder equivalents).
  • Introduce AddAzureQueueServiceClient, AddAzureQueue, and support for QueueClient registration alongside existing BlobServiceClient flows.
  • Update all test projects, snapshots, playground apps, and README docs to use the new APIs and adjust provisioning/infrastructure logic for queues and tables.
Comments suppressed due to low confidence (2)

tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureStorageExtensionsTests.AddAzureStorageViaRunModeAllowSharedKeyAccessOverridesDefaultFalse.verified.bicep:26

  • The snapshot removes the blobServices resource—ensure that the blob service resource is still generated when overriding shared key access defaults.
output blobEndpoint string = storage.properties.primaryEndpoints.blob

tests/Aspire.Hosting.Azure.Tests/AzureResourcePreparerTests.cs:55

  • [nitpick] The variable blobs refers to a single BlobService resource—consider renaming to blobService to match the singular API method.
        var blobs = storage.AddBlobService("blobs");

/// <param name="name">The name of the resource.</param>
/// <param name="queueName">The name of the queue.</param>
/// <param name="parent">The <see cref="AzureQueueStorageResource"/> that the resource is stored in.</param>
public class AzureQueueStorageQueueResource(string name, string queueName, AzureQueueStorageResource parent) : Resource(name),
Copy link
Member

Choose a reason for hiding this comment

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

Should this (and blob container) implement IResourceWithAzureFunctionsConfig?

sebastienros and others added 2 commits July 8, 2025 09:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@davidfowl
Copy link
Member

davidfowl commented Jul 9, 2025

I’d like this to go into 9.4

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

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

I think there are 2 things left that need to be addressed:

  1. Functions support
  2. What happens when AddBlobService is called more than once.

@davidfowl davidfowl added this to the 9.4 milestone Jul 9, 2025
@eerhardt eerhardt enabled auto-merge (squash) July 9, 2025 20:30
@eerhardt
Copy link
Member

eerhardt commented Jul 9, 2025

/backport to release/9.4

Copy link
Contributor

github-actions bot commented Jul 9, 2025

Started backporting to release/9.4: https://github.com/dotnet/aspire/actions/runs/16179639157

@eerhardt eerhardt merged commit 2593475 into main Jul 9, 2025
252 checks passed
@eerhardt eerhardt deleted the sebros/storateapi branch July 9, 2025 20:36
@github-actions github-actions bot locked and limited conversation to collaborators Aug 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Azure Storage APIs are a bit confusing and misleading
3 participants