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

Expose Patch operations. Expose missing provider level operations #1816

Merged
merged 41 commits into from
Oct 23, 2017
Merged

Expose Patch operations. Expose missing provider level operations #1816

merged 41 commits into from
Oct 23, 2017

Conversation

naveedaz
Copy link
Contributor

@naveedaz naveedaz commented Oct 6, 2017

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

Naveed Aziz added 26 commits May 8, 2017 17:09
@ravbhatnagar
Copy link
Contributor

@sergey-shandar - Can you confirm the behavior on #1 above and if SDK team is fine with this?
for #2, I chatted with @naveedaz and the RP behavior is that it does not update properties which are null or not sent on the subsequent PUT. So unintentional update of goal state due to SDK not understanding and ignoring some properties will not happen.
For #3, yes please check.

@naveedaz
Copy link
Contributor Author

@sergey-shandar, @ravbhatnagar I generated the SDK and indeed x-ms-mutability does not affect whether property is required. So for now the location will not be required. This is not necessarily breaking but calls from client without location could make it to service, where they will fail with the appropriate message. The validation would move to service instead of client.
Resource models specifically for patch verb would be a fair bit of work. In the interest of time, I say it is fine to live with the validation moving to service temporarily (customers already specify location when creating so it should not matter much). In a follow up PR I will consolidate common definitions in a single file instead of having it duplicated in all per collection files. It will be much easier to tackle the patching specific resource models then. Discussed this with @ravbhatnagar offline. @sergey-shandar What do you think?

@ravbhatnagar
Copy link
Contributor

The proposal by @naveedaz sounds good to me. @sergey-shandar - please confirm fro SDK side.

@sergey-shandar
Copy link
Contributor

@shawns1 another PR where CI is not shown. Could you have a look?

@@ -1341,7 +1465,11 @@
},
"location": {
"description": "Resource Location.",
"type": "string"
"type": "string",
"x-ms-mutability": [
Copy link
Contributor

Choose a reason for hiding this comment

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

I know, we recommend to use x-ms-mutability. AutoRest SDK code generation doesn't use the extension for now but it may use it in the future. It's not an SDK breaking change. In the same time, removing required field may change an order of constructor parameters.

@@ -1130,9 +1191,6 @@
},
"Resource": {
"description": "Azure resource. This resource is tracked in Azure Resource Manager",
"required": [
"location"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, it's a potential SDK breaking change.

@@ -451,9 +452,6 @@
},
"Resource": {
"description": "Azure resource. This resource is tracked in Azure Resource Manager",
"required": [
"location"
Copy link
Contributor

Choose a reason for hiding this comment

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

A potential SDK breaking change.

@@ -32,7 +32,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Object"
"type": "object"
Copy link
Contributor

Choose a reason for hiding this comment

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

an SDK breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change from #/definitions/Object is SDK but recommended by Azure SDK/ARM

@@ -92,7 +92,7 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Object"
"type": "object"
Copy link
Contributor

Choose a reason for hiding this comment

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

an SDK breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change from #/definitions/Object is SDK but recommended by Azure SDK/ARM

@@ -18256,11 +18558,6 @@
"format": "double",
"description": "Value of counter at a certain time.",
"type": "number"
},
"coreCount": {
"format": "int32",
Copy link
Contributor

Choose a reason for hiding this comment

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

The property was removed.

@@ -18958,9 +19256,6 @@
},
"Resource": {
"description": "Azure resource. This resource is tracked in Azure Resource Manager",
"required": [
"location"
Copy link
Contributor

Choose a reason for hiding this comment

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

potential SDK breaking change.

"x-ms-pageable": {
"nextLinkName": "nextLink"
}
"swagger": "2.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Changing formatting of the document is unnecessary changes and it's really hard to review. Could you format the document as it was before?

@@ -3214,7 +3433,8 @@
"readOnly": true
},
"certBlob": {
"description": "A certificate file (.cer) blob containing the public key of the private key used to authenticate a \n Point-To-Site VPN connection.",
"format": "byte",
"description": "A certificate file (.cer) blob containing the public key of the private key used to authenticate a \nPoint-To-Site VPN connection.",
Copy link
Contributor

Choose a reason for hiding this comment

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

A potential SDK breaking changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Client validation for (uuid, byte ) will cause SDK breaks, but is acceptable and actually a good change.

@@ -2074,9 +2288,6 @@
},
"Resource": {
"description": "Azure resource. This resource is tracked in Azure Resource Manager",
"required": [
"location"
],
Copy link
Contributor

Choose a reason for hiding this comment

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

A potential SDK breaking changes.

@azuresdkciprbot
Copy link

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/web/resource-manager/readme.md
Before the PR: Warning(s): 0 Error(s): 105
After the PR: Warning(s): 0 Error(s): 88

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@azuresdkciprbot
Copy link

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/web/resource-manager/readme.md
Before the PR: Warning(s): 0 Error(s): 105
After the PR: Warning(s): 0 Error(s): 88

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

@naveedaz
Copy link
Contributor Author

naveedaz commented Oct 20, 2017

  1. consumes/produces is now declared only at the collection level unless it is different for a specific operation.
  2. WebJobId was a false query parameter, that should not have existed. The service does not use it.
  3. Client validation for (uuid, byte ) will cause SDK breaks, but is acceptable and actually a good change.
  4. ErrorEntity was incorrectly under properties property. ARM expects it in the envelope.
  5. Change from #/definitions/Object is SDK but recommended by Azure SDK/ARM
  6. CommonDefinitions.json is now added. The generator tool just spits the common models in this file. References to this file are not yet used, since it was complicating the PR too much. I will add that as a separate PR.
  7. Resource model does not have identity anymore. Instead it is on the only tracked resource 'Site' that actually uses it. SDK wise the optional property will be removed for all the tracked resources that do not use a managed service identity. (AppServiceCertificateResource, AppServiceCertificateOrder, Certificate
    Domai, AppServiceEnvironmentResource, AppServicePlan).
  8. DomainOwnershipIdentifier is not a tracked resource. Marked it as a proxyOnlyResource. SDK change wise, location is no longer a required property for this resource.

Copy link
Contributor

@sergey-shandar sergey-shandar left a comment

Choose a reason for hiding this comment

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

There a lot of SDK breaking changes but otherwise the changes are really good.

@sergey-shandar sergey-shandar merged commit 54ffab4 into Azure:current Oct 23, 2017
@AutorestCI
Copy link

No modification for AutorestCI/azure-sdk-for-node

@AutorestCI
Copy link

@AutorestCI
Copy link

@naveedaz
Copy link
Contributor Author

MSI is supported only for the site resource. It was intentional to remove it from all tracked resources except for Site.

Comments from above
7. Resource model does not have identity anymore. Instead it is on the only tracked resource 'Site' that actually uses it. SDK wise the optional property will be removed for all the tracked resources that do not use a managed service identity. (AppServiceCertificateResource, AppServiceCertificateOrder, Certificate
Domai, AppServiceEnvironmentResource, AppServicePlan).

@lmazuel
Copy link
Member

lmazuel commented Oct 23, 2017

@naveedaz Yes, I saw afterward and removed my comment (not fast enough :)). Thanks for the confirmation :)

I see ContinuousWebJob.settings has changed type, I guess it's on purpose as well.

mccleanp pushed a commit that referenced this pull request Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants