Skip to content

[BUG] Breaking Change in Azure.Storage.Blobs 12.27.0: GetBlobsAsync parameters without default values #55418

@nickduch

Description

@nickduch

Library name and version

Azure.Storage.Blobs 12.27.0

Describe the bug

After upgrading from Azure.Storage.Blobs 12.26.0 to 12.27.0, code that previously compiled now fails with error CS7036, indicating that the traits parameter is required despite the documentation showing it should have a default value.

Library Version

  • Package: Azure.Storage.Blobs
  • Previous working version: 12.26.0
  • Broken version: 12.27.0
  • Target Framework: net10.0

This change doesn't seems to be documented in the Changelog.md file.

Expected behavior

The method signature should have default values for all parameters like previous version:

public virtual AsyncPageable<BlobItem> GetBlobsAsync(
    BlobTraits traits = BlobTraits.None,
    BlobStates states = BlobStates.None,
    string prefix = default,
    CancellationToken cancellationToken = default)

Actual behavior

error CS7036: There is no argument given that corresponds to the required parameter 'traits' of 'BlobContainerClient.GetBlobsAsync(BlobTraits, BlobStates, string, CancellationToken)'

Reproduction Steps

Instantiate a BlobContainerClient and use GetBlobsAsync with these parameters.
_blobContainerClient.GetBlobsAsync(prefix: prefix, cancellationToken: cancellationToken);

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue is related to a non-management packageService AttentionWorkflow: This issue is responsible by Azure service team.StorageStorage Service (Queues, Blobs, Files)customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions