Skip to content

adding purge protection vault property#2478

Merged
schaabs merged 3 commits intoAzure:masterfrom
dragav:master
Feb 21, 2018
Merged

adding purge protection vault property#2478
schaabs merged 3 commits intoAzure:masterfrom
dragav:master

Conversation

@dragav
Copy link
Copy Markdown
Contributor

@dragav dragav commented Feb 12, 2018

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.

PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes.
  • Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

@AutorestCI
Copy link
Copy Markdown

AutorestCI commented Feb 12, 2018

Automation for azure-sdk-for-go

A PR has been created for you based on this PR content.

Once this PR will be merged, content will be added to your service PR:
Azure/azure-sdk-for-go#1105

Copy link
Copy Markdown

@schaabs schaabs left a comment

Choose a reason for hiding this comment

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

The changes you have here look good, but you also need to update the examples createVault.json, getVault.json, and updateVault.json

@dragav
Copy link
Copy Markdown
Contributor Author

dragav commented Feb 12, 2018

I would prefer not to include this in the examples. Activating this property is irreversible and creates undeletable objects. The value of including it in the examples is marginal, whereas the effect can be quite confusing. Please consider this argument and let me know if you still think I should make that change. Thanks.

(I could add separate files to exemplify soft delete/purge protection..)

…perties, respectively.

Updating examples with and without soft delete and purge protection flags.
@AutorestCI
Copy link
Copy Markdown

AutorestCI commented Feb 13, 2018

Automation for azure-sdk-for-python

A PR has been created for you:
Azure/azure-sdk-for-python#2017

@azuresdkciprbot
Copy link
Copy Markdown

Hi There,

I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:

File: specification/keyvault/resource-manager/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@schaabs
Copy link
Copy Markdown

schaabs commented Feb 13, 2018

After an offline discussion I agree this should not be added to the create and update examples. Changes look good to me.

@schaabs
Copy link
Copy Markdown

schaabs commented Feb 13, 2018

@sergey-shandar can we go ahead and merge these changes?

@sergey-shandar sergey-shandar added potential-sdk-breaking-change WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Feb 13, 2018
@sergey-shandar
Copy link
Copy Markdown
Contributor

sergey-shandar commented Feb 13, 2018

@schaabs LGTM except it may introduce breaking changes for some SDKs. We also need ARM approval for this. @ravbhatnagar

Copy link
Copy Markdown

@schaabs schaabs left a comment

Choose a reason for hiding this comment

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

@sergey-shandar you're right this is breaking. @dragav please see comments about property ordering

"description": "Property to specify whether the 'soft delete' functionality is enabled for this key vault. It does not accept false value."
"description": "Property specifying whether recoverable deletion is enabled for this key vault. Setting this property to true activates the soft delete feature, whereby vaults or vault entities can be recovered after deletion. Enabling this functionality is irreversible - that is, the property does not accept false as its value."
},
"enablePurgeProtection": {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This needs to be moved after create mode to avoid breaking changes in the sdk

"description": "Property to specify whether the 'soft delete' functionality is enabled for this key vault. It does not accept false value."
"description": "Property specifying whether recoverable deletion ('soft' delete) is enabled for this key vault. The property may not be set to false."
},
"enablePurgeProtection": {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This needs to be moved after create mode to avoid breaking changes in the sdk

@azuresdkciprbot
Copy link
Copy Markdown

Hi There,

I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:

File: specification/keyvault/resource-manager/readme.md
Before the PR: Warning(s): 0 Error(s): 0
After the PR: Warning(s): 0 Error(s): 0

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

Copy link
Copy Markdown

@schaabs schaabs left a comment

Choose a reason for hiding this comment

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

LGTM

@schaabs
Copy link
Copy Markdown

schaabs commented Feb 15, 2018

@ravbhatnagar are these changes ready to merge?

@ravbhatnagar
Copy link
Copy Markdown
Contributor

@schaabs - Apologies but I dont follow. How does moving it after createMode make it non-breaking?

@schaabs
Copy link
Copy Markdown

schaabs commented Feb 16, 2018

@ravbhatnagar The breaking change I was referring to is not in the API itself but the clients generated by autorest. Adding the property before preexisting properties changes the order of parameters in the model constructors. So even though these are optional parameters, it breaks callers who don't specify the parameters by name, but only by order. Adding it after all the preexisting properties causes the generated code to have one more optional parameter at the end, so callers who don't specify this parameter will not break.

@ravbhatnagar
Copy link
Copy Markdown
Contributor

ravbhatnagar commented Feb 16, 2018

@schaabs - Interesting, I wasnt aware of this. Anyhow, how will it impact the scenario where someone sets this property using the portal and then GETs this resource using an older SDK which ignores this property since it didnt understand it. Then does a PUT on the same resource, without this property in the payload. How does the value of this property on the server change? Does it get overwritten which could be unintentional from the user perspective in this case?

@schaabs
Copy link
Copy Markdown

schaabs commented Feb 16, 2018

@ravbhatnagar This is handled by the server behavior. This property can only be set on a vault once, and when set cannot be unset. This is documented in the description of the property "Enabling this functionality is irreversible". Once this property has been set, subsequent PUT operations which do not have the property specified will have no effect on the properties value.

@ravbhatnagar
Copy link
Copy Markdown
Contributor

Signing off based on comments from @schaabs . it wont be an unintentional change as the service will handle it.

@ravbhatnagar ravbhatnagar added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Feb 21, 2018
@schaabs schaabs merged commit 2ce6d93 into Azure:master Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants