-
Notifications
You must be signed in to change notification settings - Fork 4k
[Storage] support StandardBlobtier and Rehydrate priority #9781
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blueww , the review is ongoing, I'll change label to needs-revision
after review is done.
{ | ||
if ((pageBlobTier != null) | ||
&& (type != BlobType.PageBlob)) | ||
{ | ||
throw new ArgumentOutOfRangeException("BlobType, PageBlobTier", String.Format("PremiumPageBlobTier can only be set to Page Blob. The Current BlobType is: {0}", type)); | ||
} | ||
if (((standardBlobTier != null || rehydratePriority != null)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, please remove duplicate ()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -170,6 +170,22 @@ public PremiumPageBlobTier PremiumPageBlobTier | |||
|
|||
private PremiumPageBlobTier? pageBlobTier = null; | |||
|
|||
[Parameter(HelpMessage = "Block Blob Tier, valid values are Hot/Cool/Archive. See detail in https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers", Mandatory = false)] | |||
[ValidateSet("Hot", "Cool", "Archive", IgnoreCase = true)] | |||
public StandardBlobTier StandardBlobTier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest to use PSArgumentCompleter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Type of this parameter should be StandardBlobTier.
As PSArgumentCompleter must work with String type parameter, I have changed it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The advice is to make this a string parameter, use a completer, and convert the value to the enum in your cmdlet code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have make it a string, and then parse the value to StandardBlobTier.
private PremiumPageBlobTier? pageBlobTier = null; | ||
|
||
[Parameter(HelpMessage = "Block Blob Tier, valid values are Hot/Cool/Archive. See detail in https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers", Mandatory = false)] | ||
[ValidateSet("Hot", "Cool", "Archive", IgnoreCase = true)] | ||
public StandardBlobTier StandardBlobTier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest to use PSArgumentCompleter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use the completer, the type would be string, in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Type of this parameter should be StandardBlobTier.
As PSArgumentCompleter must work with String type parameter, I have changed it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made it a string, and then parse the value to StandardBlobTier.
ReviewGeneralHow about add test cases to cover new parameters? |
@erich-wang |
<PackageReference Include="Microsoft.Azure.Storage.Blob" Version="10.0.3" /> | ||
<PackageReference Include="Microsoft.Azure.Storage.File" Version="10.0.3" /> | ||
<PackageReference Include="Microsoft.Azure.Storage.Queue" Version="10.0.3" /> | ||
<PackageReference Include="Microsoft.Azure.Storage.Blob" Version="11.0.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this require changes to the Storage.DataMovement library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed before, since Az.Accounts reference a old DMlib, we will use a private signed DMlib with different name in PSH. And I have already updated the private signed DMlib to new build with this PR. (The last file in "Files Changed")
private PremiumPageBlobTier? pageBlobTier = null; | ||
|
||
[Parameter(HelpMessage = "Block Blob Tier, valid values are Hot/Cool/Archive. See detail in https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers", Mandatory = false)] | ||
[ValidateSet("Hot", "Cool", "Archive", IgnoreCase = true)] | ||
public StandardBlobTier StandardBlobTier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use the completer, the type would be string, in this case.
@@ -170,6 +170,22 @@ public PremiumPageBlobTier PremiumPageBlobTier | |||
|
|||
private PremiumPageBlobTier? pageBlobTier = null; | |||
|
|||
[Parameter(HelpMessage = "Block Blob Tier, valid values are Hot/Cool/Archive. See detail in https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-storage-tiers", Mandatory = false)] | |||
[ValidateSet("Hot", "Cool", "Archive", IgnoreCase = true)] | |||
public StandardBlobTier StandardBlobTier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment
@markcowl BTW, a new sign job with latest code change is: https://azuresdkci.westus2.cloudapp.azure.com/view/PowerShell/job/psnetsign-esrp/485/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blueww , I added two additional comments, please take a look.
@erich-wang |
/azp run azure-powershell - powershell-core |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
@blueww will do some sign testing tomorrow, otherwise lgtm. |
@markcowl @erich-wang |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@markcowl @erich-wang |
/azp run azure-powershell - powershell-core |
Azure Pipelines successfully started running 1 pipeline(s). |
Description
The design review passed on:
Rehydrate priority: https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/323 (Rehydrate priority is still in public preview, but feature team confirm it's already public available in all regions, and feature team would like to release it in stable PSH release.)
StandardBlobtier: https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/248
Checklist
CONTRIBUTING.md
platyPS
module