Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArchieveStatus - RehydratePendingToCold #21441

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sdk/storage/azblob/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Added [FilterBlobs by Tags](https://learn.microsoft.com/rest/api/storageservices/find-blobs-by-tags-container) API for container client.
* Added `System` option to `ListContainersInclude` to allow listing of system containers (i.e, $web).
* Updated the SAS Version to `2021-12-02` and added `Encryption Scope` to Account SAS, Service SAS, and User Delegation SAS
* Added `ArchiveStatusRehydratePendingToCold` value to `ArchiveStatus` enum.
* Content length limit for `AppendBlob.AppendBlock()` and `AppendBlob.AppendBlockFromURL()` raised from 4 MB to 100 MB.

### Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azblob/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "go",
"TagPrefix": "go/storage/azblob",
"Tag": "go/storage/azblob_7a25fb98e8"
"Tag": "go/storage/azblob_c363103941"
}
1 change: 1 addition & 0 deletions sdk/storage/azblob/blob/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ type ArchiveStatus = generated.ArchiveStatus
const (
ArchiveStatusRehydratePendingToCool ArchiveStatus = generated.ArchiveStatusRehydratePendingToCool
ArchiveStatusRehydratePendingToHot ArchiveStatus = generated.ArchiveStatusRehydratePendingToHot
ArchiveStatusRehydratePendingToCold ArchiveStatus = generated.ArchiveStatusRehydratePendingToCold
)

// PossibleArchiveStatusValues returns the possible values for the ArchiveStatus const type.
Expand Down
17 changes: 17 additions & 0 deletions sdk/storage/azblob/blockblob/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2736,6 +2736,7 @@ func (s *BlockBlobRecordedTestsSuite) TestRehydrateStatus() {

blobName1 := "rehydration_test_blob_1"
blobName2 := "rehydration_test_blob_2"
blobName3 := "rehydration_test_blob_3"

bbClient1 := testcommon.GetBlockBlobClient(blobName1, containerClient)
reader1, _ := testcommon.GenerateData(1024)
Expand Down Expand Up @@ -2780,6 +2781,22 @@ func (s *BlockBlobRecordedTestsSuite) TestRehydrateStatus() {
_require.Nil(err)
_require.Equal(*getResp2.AccessTier, string(blob.AccessTierArchive))
_require.Equal(*getResp2.ArchiveStatus, string(blob.ArchiveStatusRehydratePendingToHot))

// ------------------------------------------

bbClient3 := testcommon.GetBlockBlobClient(blobName3, containerClient)
reader3, _ := testcommon.GenerateData(1024)
_, err = bbClient3.Upload(context.Background(), reader3, nil)
_require.Nil(err)
_, err = bbClient3.SetTier(context.Background(), blob.AccessTierArchive, nil)
_require.Nil(err)
_, err = bbClient3.SetTier(context.Background(), blob.AccessTierCold, nil)
_require.Nil(err)

getResp3, err := bbClient3.GetProperties(context.Background(), nil)
_require.Nil(err)
_require.Equal(*getResp3.AccessTier, string(blob.AccessTierArchive))
_require.Equal(*getResp3.ArchiveStatus, string(blob.ArchiveStatusRehydratePendingToCold))
}

func (s *BlockBlobRecordedTestsSuite) TestCopyBlobWithRehydratePriority() {
Expand Down