Skip to content

Storage - STG102 object level smart access#48392

Merged
browndav-msft merged 42 commits intoAzure:feature/storage/stg102basefrom
browndav-msft:stg102/ObjectLevelSmartAccess
Mar 18, 2026
Merged

Storage - STG102 object level smart access#48392
browndav-msft merged 42 commits intoAzure:feature/storage/stg102basefrom
browndav-msft:stg102/ObjectLevelSmartAccess

Conversation

@browndav-msft
Copy link
Member

No description provided.

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Mar 12, 2026
browndav-msft and others added 11 commits March 12, 2026 10:43
- We needed to add AccessTier smartAccessTier to all constructors in BlobProperties, which is different than what is recommended in BlobPropertiesInternal. Made a deliberate decision to go this route, but will go the other route, if necessessary
@test
@RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-04")
public void getInferredTierWhenAssignedSmart() {
    // Arrange
    // Create a file in a file system with the smart tiering feature enabled, and set the access tier to smart.
    // Did this manually to prove feature works
    fc = premiumDataLakeServiceClient.getFileSystemClient("5333bf800setblobaccesstiersmart26f99030889cd17d8581")
        .getFileClient("5333bf801setblobaccesstiersmart26f71508c0c760a5e356");

    Response<PathProperties> response = fc.getPropertiesWithResponse(null, null, null);
    HttpHeaders headers = response.getHeaders();
    PathProperties properties = response.getValue();

    validateBasicHeaders(headers);

    assertEquals(AccessTier.SMART, properties.getAccessTier());
    assertEquals(AccessTier.HOT, properties.getSmartAccessTier());
}
@ibrandes ibrandes changed the title Stg102/object level smart access Storage - STG102 object level smart access Mar 16, 2026
Copy link
Member

@ibrandes ibrandes left a comment

Choose a reason for hiding this comment

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

had a couple more suggestions for further polishing

@browndav-msft browndav-msft requested a review from Copilot March 17, 2026 17:30
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

Adds Smart tier (“STG102 object level smart access”) support across Blob and Data Lake models, wiring service headers through to public properties and expanding tests to validate Smart tier behaviors.

Changes:

  • Introduces AccessTier.SMART and ArchiveStatus.REHYDRATE_PENDING_TO_SMART, and exposes smartAccessTier on blob/path properties.
  • Threads x-ms-smart-access-tier / smart tier fields through internal models, transforms, and access helpers.
  • Adds live tests covering Smart tier set/copy/upload and rehydrate flows (sync/async + batch).

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/PathProperties.java Adds smart tier properties on Data Lake path properties and exposes getters.
sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/models/AccessTier.java Adds SMART tier constant for Data Lake.
sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/implementation/util/AccessorUtility.java Extends accessor contract to carry inferred + smart tier.
sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/Transforms.java Maps BlobProperties smart tier into Data Lake PathProperties.
sdk/storage/azure-storage-blob/swagger/README.md Updates swagger input spec reference used for codegen.
sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseAsyncApiTests.java Adds async specialized tests for Smart tier copy/set/list/rehydrate.
sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/specialized/BlobBaseApiTests.java Adds sync specialized tests for Smart tier copy/set/list/rehydrate and minor assertion/comment fixes.
sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobAsyncApiTests.java Adds async upload test for Smart tier.
sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobApiTests.java Adds sync upload test for Smart tier.
sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobProperties.java Exposes getSmartAccessTier() and updates internal constructor wiring.
sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/BlobItemProperties.java Adds smart tier getter/setter pass-through.
sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/ArchiveStatus.java Adds rehydrate pending-to-smart constant.
sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/models/AccessTier.java Adds SMART tier constant for Blob.
sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobsGetPropertiesHeaders.java Parses and exposes x-ms-smart-access-tier header.
sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPropertiesInternalGetProperties.java Surfaces smart tier from get-properties headers.
sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPropertiesInternalDownload.java Stubs smart tier for download-based internal properties.
sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPropertiesInternalConstructorProperties.java Adds internal field/plumbing for smart tier.
sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobPropertiesInternal.java Extends internal interface with getSmartAccessTier().
sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/BlobItemPropertiesInternal.java Adds smart tier to XML-serializable blob item properties.
sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/accesshelpers/BlobPropertiesConstructorProxy.java Simplifies accessor initialization logic.
sdk/storage/azure-storage-blob/assets.json Updates recorded assets tag.
sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BlobBatchTestBase.java Adds premium account client for Smart-tier batch coverage.
sdk/storage/azure-storage-blob-batch/src/test/java/com/azure/storage/blob/batch/BatchApiTests.java Adds batch test for setting Smart access tier.
sdk/storage/azure-storage-blob-batch/assets.json Updates recorded assets tag.

@ibrandes ibrandes self-requested a review March 18, 2026 15:25
Copy link
Member

@ibrandes ibrandes left a comment

Choose a reason for hiding this comment

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

after the analyze errors are fixed, this looks good to me!

@browndav-msft browndav-msft merged commit 7a14529 into Azure:feature/storage/stg102base Mar 18, 2026
17 of 20 checks passed
ibrandes added a commit that referenced this pull request Mar 24, 2026
* Stg102/versions (#48118)

* bump latest service version from 2026_04_06 to 2026_06_06 for stg102

* refactor transformutils to use switch

* made changes based on comments

* Stg102/datalake tags (#48057)

* get tags

* set tags

* sas permissions for tag

* adding tag to datalake sas model tests

* add only datalake files from 38db6fd

* fix linting errors:remove unused imports, add return annotation setTags method

* fix sasPermissionsParseSupplier test

* recorded tests for DirectoryApiTests.getSetTags()

* split getSetTagsAC into getTagsAC and setTagsAC

* record tests for getTagsAC and setTagsAC

* change generatePathName() to dc.getDirectoryPath

* create recordings for getSetTagsDirectorySas

* Record DirectoryApiTests#getSetTagsOAuth

* Record DirectoryApiTests#getSetTagsLease

* Record DirectoryApiTests#getTagsLeaseFailed

* Record DirectoryApiTests#setTagsLeaseFailed

* Record DirectoryApiTests#getSetTagsFileSystemSas

* Record DirectoryApiTests#getSetTagsAccountSas

* Record DirectoryApiTests#getSetTagsDirectoryIdentitySas

* Record DirectoryApiTests#getSetTagsFileSystemIdentitySas

* Record DirectoryApiTests#getTagsError

* Record DirectoryApiTests#setTagsError

* Record DirectoryApiTests#setTagsACFail

* Record DirectoryApiTests#getTagsACFail

* Add x-ms-blob-if-modified/unmodified-since to CustomMatcher headers in DataLakeTestBase

This matches the behavior in BlobBaseTest https://github.com/Azure/azure-sdk-for-java/blob/a86d1fbe0002f087552c78e32df5447665d53939/sdk/storage/azure-storage-blob/src/test/java/com/azure/storage/blob/BlobTestBase.java#L202
- This adds x-ms-blob-if-modified/unmodified. Four tests use NEW_DATE and OLD_DATE, which change the date in the header. We can't change this because the data comes from a supplier that is used by other tests and the other tests pass.
- The reason we have to do this is because getTagsWithResponse and setTagsWithResponse both delegate to blockBlobClient, which uses  instead of  like the rest of DFS.

* Re-record getTagsAC with full access conditions

* update comment in sasPermissionsToStringSupplier

* setTags returns Mono<Void> but maps Response::getValue, which will be null for Response<Void>. Reactor doesn't allow emitting null, so this will likely fail with an NPE when subscribed. Use the same pattern as other void-returning APIs in this client (e.g., setMetadata): convert the Mono<Response<Void>> to a completion-only Mono<Void> (such as flatMap(FluxUtil::toMono) or then()).

* make DLgettags and settags options classes final

* create aysnc tests based on sync tests

* Update recordings for DirectoryAsyncApiTests

---------

Co-authored-by: Isabelle <ibrandes@microsoft.com>

* Storage - Stg102 create file with data (#48164)

* revert pull changes from STG100 for all files

* add all tests, bump version from 2026-02-06 to 2026-06-06

* fix filePropertySemantics not getting passed, recorded tests

- filePropertySemantics was not getting passed as an arg for the function in ShareDirectoryClient or ShareDirectoryAsyncClient
- created recordings for the new tests

* pass filePropertySemantics to createWithResponse service method

* create new recordings for missing tests

* fix java docs, change ternary to fluxMD5wrapper

* remove local config file

* Storage - STG102 Put Block, Put Block from URL, and Put Block List with UDS create permission (#48390)

* finish upload for put block

* add test for transfer with create permission

* add recording for transferBlobWithCreatePermission

* create commitBlockLIst sync with recording

* create transfer async with recording

* finish commitblocklist with permission and recording

* wrap user-delegation SAS tests  in liveTestScenarioWithRetry(...)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add sanitizer for skoid

* accept sanitization recommendation from copilot

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* remove unncessary arg from lambda

* made sanitization recommendations from copilot, rerecorded tests

* add key.setSignedObjectId(testResourceNamer.recordValueFromConfig(key.getSignedObjectId())), rerecord tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Storage - STG102 object level smart access (#48392)

* generate new api based on swaggerfile

* create base test for new api

* switch to premiumstorageaccount for smart-tier

* recording for setblobaccesstiersmart

* rerecording for setblobaccesstiersmart

* updating assets

* add SMART access tier in enum, accessTierInferred and smartAcessTier to PathProps

* create basic test for smart tier in datalake

* fix linting in PathProperties

* fixed broken deps for FileApiTest#getInferredTierWhenAssignedSmart

- We needed to add AccessTier smartAccessTier to all constructors in BlobProperties, which is different than what is recommended in BlobPropertiesInternal. Made a deliberate decision to go this route, but will go the other route, if necessessary

* changed boolean to Boolean to allow for null

* add premiumDataLakeServiceClient for smart tier

* remove code to test access tier smart on get props for datalake

@test
@RequiredServiceVersion(clazz = DataLakeServiceVersion.class, min = "2026-02-04")
public void getInferredTierWhenAssignedSmart() {
    // Arrange
    // Create a file in a file system with the smart tiering feature enabled, and set the access tier to smart.
    // Did this manually to prove feature works
    fc = premiumDataLakeServiceClient.getFileSystemClient("5333bf800setblobaccesstiersmart26f99030889cd17d8581")
        .getFileClient("5333bf801setblobaccesstiersmart26f71508c0c760a5e356");

    Response<PathProperties> response = fc.getPropertiesWithResponse(null, null, null);
    HttpHeaders headers = response.getHeaders();
    PathProperties properties = response.getValue();

    validateBasicHeaders(headers);

    assertEquals(AccessTier.SMART, properties.getAccessTier());
    assertEquals(AccessTier.HOT, properties.getSmartAccessTier());
}

* add params for smartAccessTier to javadocs

* removing breaking changes

* removing datalake breaking changes

* add recordings for BlobBaseApiTests

* add recordings for BlobApiTests#uploadStreamAccessTierSmart

* add recordings for BlobAsyncApiTests#uploadStreamAccessTierSmart

* add recordings for BlobAsyncApiTests#uploadStreamAccessTierSmart

* uncomment a reqeust in setTierAllSucceed

* remove javadoc params for smartAccessTier

* change getSmartAccessTier to return actual value instead of null

* finmish startCopyFromURLSmartAccessTier, no recording

* finish creating async versions of sync tests

* add recordings

* make uploadStreamAccessTierSmart more concise

* rerecord for uploadStreamAccessTierSmart

* remove unused variables from Transforms and DataLakeTestBase

* restore the previous way of setting teh accessor

* wrap tests in StepVerifier.create()

* update javadocs description for getSmartAccessTier, fix casing on variable

* wrap tests in StepVerifier.create()

* rerecord for BatchApiTest#setTierAllSucceed

* rerecord for missing tests

* remove unused imports

* remove unused imports

---------

Co-authored-by: Isabelle <ibrandes@microsoft.com>

* Storage - STG102 Directory-Level SAS on Blob FNS (#48477)

* wip

* more tests

* addressing copilot comments and adding async tests

* addressing more copilot comments

* adding extra verification to sas tests

* adding recordings

* resolving analyze error

* Storage - STG102 IPv6 (#48468)

* refactor so BuiderHelpers and BobUrlParts use StorageImplUtils

* fix linting issues

* fix linting issues

* fix spacing issue in Constant file

* add connection string parse test

* finish builderhelper tests

* finish refactor of BuilderHelperTests

* remove unused imports

* remove throw for illegal exception

* remove subclasses for uri constants

* pointing swagger input file to azure instead of fork

* re-generating from swagger

* adding features to changelogs

* changing param name tagsPermission to hasTagsPermission

* adjusting share file client create impl calls after new swagger

* bumping swagger version and re-generating

* autorest generation for file share

* Update sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobUrlParts.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: browndav-msft <browndav@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

3 participants