-
Notifications
You must be signed in to change notification settings - Fork 4k
Support soft-delete feature in storge dataplane cmdlet #5457
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
a3df663
to
0658761
Compare
/// </summary> | ||
[Cmdlet(VerbsLifecycle.Disable, StorageNouns.ServiceDeleteRetentionPolicy, SupportsShouldProcess = true), | ||
OutputType(typeof(PSDeleteRetentionPolicy))] | ||
public class DisableAzureStorageServiceDeleteRetentionPolicyCommand : StorageCloudBlobCmdletBase |
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 think the comm and name should be shorter: Disable-AzureStorageSoftDelete
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.
@markcowl
The name of the cmdlets Enable/Disable-AzureStorageServiceDeleteRetentionPolicy are reviewed and raised from your team, and feature team also agreed for that.
The current name is aligned with the rest and XSCL API, so customer who have looked into rest doc might can find it more easily.
Do you really want to change it?
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 discussed with Mark, the alias for the cmdlets is added: Disable-AzureStorageSoftDelete
/// </summary> | ||
[Cmdlet(VerbsLifecycle.Enable, StorageNouns.ServiceDeleteRetentionPolicy, SupportsShouldProcess = true), | ||
OutputType(typeof(PSDeleteRetentionPolicy))] | ||
public class EnableAzureStorageServiceDeleteRetentionPolicyCommand : StorageCloudBlobCmdletBase |
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.
Enable-AzureStorageSoftDelete
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 discussed with Mark, the alias for the cmdlets is added: Enable-AzureStorageSoftDelete
</Reference> | ||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath> | ||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
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.
This will have to wait until our runtime change is in. ETA is next week, which means this will likely not make it in for this release.
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.
See, waiting for your fix.
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.
it's fixed
<Reference Include="Microsoft.WindowsAzure.Storage.DataMovement, Version=0.7.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\Microsoft.Azure.Storage.DataMovement.0.7.1\lib\net45\Microsoft.WindowsAzure.Storage.DataMovement.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
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.
See, waiting for your fix.
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.
it's fixed
@@ -280,6 +280,7 @@ | |||
</ProjectReference> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<None Include="app.config" /> |
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.
Need remove this line, or build will fail.
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 will raise a commit to remove it.
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.
Add it back since the app.config already check in.
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 fix is merged, please help to review and merge this PR.
@markcowl , @cormacpayne
|
@blueww Hey Wei, is there a reason why you removed the |
@cormacpayne |
@markcowl , @cormacpayne If no other comments, please help to merge the PR when the test passed. |
@@ -27,4 +27,4 @@ | |||
if (Test-Path "$PSScriptRoot\..\NewAssemblies") | |||
{ |
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.
Please revert any change to this file
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
@@ -3,4 +3,4 @@ | |||
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" /> | |||
<package id="Microsoft.Azure.Management.Storage" version="7.1.0-preview" targetFramework="net452" /> | |||
<package id="WindowsAzure.Storage" version="8.1.1" targetFramework="net452" /> | |||
</packages> |
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.
revert
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
@@ -3,4 +3,4 @@ | |||
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" /> | |||
<package id="Microsoft.Azure.Management.Storage" version="7.1.0-preview" targetFramework="net452" /> | |||
<package id="WindowsAzure.Storage" version="8.1.1" targetFramework="net452" /> |
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.
You will need to update the version here as well
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
@@ -14,14 +15,14 @@ Lists blobs in a container. | |||
|
|||
### BlobName (Default) | |||
``` | |||
Get-AzureStorageBlob [[-Blob] <String>] [-Container] <String> [-MaxCount <Int32>] | |||
Get-AzureStorageBlob [[-Blob] <String>] [-Container] <String> [-IncludeDeleted] [-MaxCount <Int32>] |
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.
Please include output in the examples (the updated output)
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 output added to example. Please check.
5688c9b
to
ebdf43c
Compare
I have resolved all your comments. Since there are some revert fix, I merged the commits into 1 commit. |
8348515
to
fe8b7c9
Compare
Tested the signed bits and confirmed that
|
Description
To support Soft-delete feature. Design has been reviewed in https://github.com/Azure/azure-powershell-pr/wiki/Azure-Storage-Blob-Soft-Delete
The PR is used to add softdelete feature.
Since I will be OOF from 2/7-2/12 and 2/15-2/21. Please help to review and give comments before 2/12, so I can fix the issues and upgrade to official package in 2/13-14, to make the change in next release which has code complete in 2/16.
And @markcowl has agreed to fix the upgrade issue of "Newtonsoft.Json" 10.0 before 2/12, or the PR won't pass check.
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines