Skip to content

Conversation

@vincenttran-msft
Copy link
Member

@vincenttran-msft vincenttran-msft commented Nov 11, 2025

This test does the following:

  • Adds set_legal_hold API to BlobClient
  • Adds a way to specify "playback only" in Azure Core test macros

SetLegalHold:

/// * date() - Date REMOVED
/// * legal_hold() - x-ms-legal-hold REMOVED

  • Changelog Entry

…ount type, update azure_core to allow for playback-only mcaro
@github-actions github-actions bot added Azure.Core The azure_core crate Storage Storage Service (Queues, Blobs, Files) labels Nov 11, 2025
@github-actions
Copy link

github-actions bot commented Nov 11, 2025

API Change Check

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

azure_storage_blob

@vincenttran-msft vincenttran-msft marked this pull request as ready for review November 15, 2025 01:17
Copilot AI review requested due to automatic review settings November 15, 2025 01:17
Copilot finished reviewing on behalf of vincenttran-msft November 15, 2025 01:19
Copy link
Contributor

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 adds support for the set_legal_hold API to BlobClient and introduces a "playback only" option for test macros to support tests that can only run in playback mode.

Key Changes:

  • Adds set_legal_hold() method to BlobClient for setting or removing legal holds on blobs
  • Implements #[recorded::test(playback)] attribute for tests that should only run during playback
  • Updates TypeSpec commit reference to include the latest blob storage API specifications

Reviewed Changes

Copilot reviewed 7 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
sdk/storage/azure_storage_blob/tsp-location.yaml Updates TypeSpec commit reference to newer version
sdk/storage/azure_storage_blob/tests/blob_client.rs Adds comprehensive test for set_legal_hold API marked as playback-only
sdk/storage/azure_storage_blob/src/models/mod.rs Updates public exports to include BlobClientSetLegalHoldOptions
sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs Removes unused result types and changes AccessPolicy date fields from OffsetDateTime to String
sdk/storage/azure_storage_blob/src/generated/models/models_impl.rs Adds TryFrom implementation for SignedIdentifiers to support XML serialization
sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs Removes header traits for deleted result types and refactors SignedIdentifier handling
sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs Updates get_access_policy and set_access_policy to use SignedIdentifiers wrapper type
sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs Updates set_legal_hold to return Response<(), NoFormat> instead of custom result type
sdk/storage/azure_storage_blob/src/clients/blob_client.rs Adds public set_legal_hold method to non-generated BlobClient wrapper
sdk/storage/azure_storage_blob/assets.json Updates test asset tag reference
sdk/storage/azure_storage_blob/CHANGELOG.md Documents addition of set_legal_hold API
sdk/core/azure_core_test_macros/src/test.rs Implements playback-only test functionality with validation and tests

@vincenttran-msft vincenttran-msft merged commit e1896c7 into Azure:main Nov 24, 2025
18 checks passed
@vincenttran-msft vincenttran-msft deleted the vincenttran/set_legal_hold branch November 24, 2025 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Core The azure_core crate Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants