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

Release ServiceFabric 2017-07-01-preview swagger specification #1717

Merged
merged 7 commits into from
Sep 26, 2017

Conversation

juhacket
Copy link
Member

@juhacket juhacket commented Sep 21, 2017

This change introduces applicationType, version, application, and service ARM resources for the ServiceFabric resource provider.

This change introduces applicationType, version, application, and service ARM resources for the ServiceFabric resource provider.
@msftclas
Copy link

@juhacket,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

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.

@juhacket please, make changes in readme.md

This change introduces applicationType, version, application, and service ARM resources for the ServiceFabric resource provider.
```


### Tag: package-2016-09
### Tag: package-2017-07
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for adding a readme file. Please, add a new tag and keep package-2016-09 untouched. This way, we can generate SDK for different versions on demand and keep track of how we did it before.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

@juhacket thank you, I will keep posting mini-review to fix CI until ARM approval. After that, I will send full review.

@sergey-shandar sergey-shandar added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Sep 22, 2017
@sergey-shandar
Copy link
Contributor

@ravbhatnagar it's a new API version for Service Fabric.

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

💡 Please review potentially introduced Error(s)/Warning(s): Analysis Report 💡

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

},
"ServicePlacementPolicyType": {
"type": "string",
"description": "The type of placement policy for a service fabric service. Following are the possible values.\n\n - Invalid - Indicates the type of the placement policy is invalid. All Service Fabric enumerations have the invalid type. The value is zero.\n - InvalidDomain - Indicates that th
Copy link
Contributor

@sergey-shandar sergey-shandar Sep 22, 2017

Choose a reason for hiding this comment

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

use true instead of "true" for Booleans. Search for "true" and "false" in the document and replace them.

Copy link
Member Author

Choose a reason for hiding this comment

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

We had this document validated by the ARM team already. Does it need to be reviewed again?

Copy link
Member Author

Choose a reason for hiding this comment

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

We are trying to publish it for Ignite.

Copy link
Contributor

@sergey-shandar sergey-shandar Sep 22, 2017

Choose a reason for hiding this comment

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

@juhacket do you have an email/link to the validation? Another option (to make it faster) is to contact @ravbhatnagar directly so he would label the PR as ARM signed off.

Copy link
Contributor

@ravbhatnagar ravbhatnagar left a comment

Choose a reason for hiding this comment

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

@juhacket - Some comments for you. Some of it minor and some that may need to be revisited (specially the one where you are referencing type and version from Application resource). I know this would already have been implemented in service. Can we get an ACK from you that you can take a look at addressing the feedback in the next APi-version if it seems like the right design?

"description": "If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).",
"default": false
},
"HealthCheckRetryTimeout": {
Copy link
Contributor

Choose a reason for hiding this comment

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

ISO 8601 standard. Format should be marked as date-time.

},
"HealthCheckStableDuration": {
"type": "string",
"description": "The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.",
Copy link
Contributor

Choose a reason for hiding this comment

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

ISO 8601 standard. Format should be marked as date-time.

"description": "The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds.",
"default": "PT0H2M0S"
},
"HealthCheckWaitDuration": {
Copy link
Contributor

Choose a reason for hiding this comment

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

ISO 8601 standard.

}
},
"x-ms-long-running-operation": "true",
"responses": {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is existing API i think, but 201 + provisioningState + AzureAsyncOperation header is recommended for PUT LRO instead of 202.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cluster doesn't support async operations yet. This will be in another API version.

Copy link
Contributor

Choose a reason for hiding this comment

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

Lets mark "x-ms-long-running-operation": "true" as false then. It is currently set to true. And we can also remove the 202 from the response.

},
"ServicePlacementPolicyType": {
"type": "string",
"description": "The type of placement policy for a service fabric service. Following are the possible values.\n\n - Invalid - Indicates the type of the placement policy is invalid. All Service Fabric enumerations have the invalid type. The value is zero.\n - InvalidDomain - Indicates that th
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like all these state transitions happen during cluster provisioning. These values could be/should be merged with provisioningState. Existing API

}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions/{clusterVersion}": {
Copy link
Contributor

Choose a reason for hiding this comment

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

How does customer discover the list of environments?

Copy link
Contributor

Choose a reason for hiding this comment

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

environments is a property on the response of clusterVersions. This could be supported using a query parameter instead of modeling it as a resource. So to get cluster versions for a specific environment, customer will use this API -
/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/clusterVersions and then do a $filter.

}
}
},
"patch": {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is updatable through this patch? There is nothing in the properties bag.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing since we changed this to a proxy resource.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this API then?

}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Isnt applicationTypes a proxy resource? Proxy resources dont have a location, but in the response of this API, i see you have a location. Is it a tracked resource?

Copy link
Member Author

Choose a reason for hiding this comment

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

We were planning to make it a tracked resource, but decided against it. We left this as is in case we changed our mind.

},
"ServicePlacementPolicyType": {
"type": "string",
"description": "The type of placement policy for a service fabric service. Following are the possible values.\n\n - Invalid - Indicates the type of the placement policy is invalid. All Service Fabric enumerations have the invalid type. The value is zero.\n - InvalidDomain - Indicates that th
Copy link
Contributor

Choose a reason for hiding this comment

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

In application resource, you are refering the applicationTyperesource. It should be done using the arm resource id of the applicationTypeResource.

},
"ServicePlacementPolicyType": {
"type": "string",
"description": "The type of placement policy for a service fabric service. Following are the possible values.\n\n - Invalid - Indicates the type of the placement policy is invalid. All Service Fabric enumerations have the invalid type. The value is zero.\n - InvalidDomain - Indicates that th
Copy link
Contributor

Choose a reason for hiding this comment

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

versions resource is being referenced here. It should be done using the arm resource id.

@ravbhatnagar ravbhatnagar added ReadyForSDKReview and removed WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Sep 22, 2017
@ravbhatnagar
Copy link
Contributor

@sergey-shandar - lets merge this. As you might have seen on the email, we are conditionally merging this as this is an Ignite deliverable but the team will address the feedback post Ignite. And also this is preview Api-version.
@salameer -another conditionally merged PR.

@ravbhatnagar ravbhatnagar added ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review Conditionally-Merged labels Sep 22, 2017
@juhacket
Copy link
Member Author

@sergey-shandar Can you commit this change? It looks like all requirements have been met.

@sergey-shandar
Copy link
Contributor

sergey-shandar commented Sep 26, 2017

@juhacket @ravbhatnagar we need to fix at least errors which prevents us to generate Node.js SDK. In particular, convert string to bool which I mentioned before.

@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/servicefabric/resource-manager/readme.md
Before the PR: Warning(s): 20 Error(s): 0
After the PR: Warning(s): 119 Error(s): 40

💡 Please review potentially introduced Error(s)/Warning(s): Analysis Report 💡

AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback

Thanks for your co-operation.

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 are still some issues but we decided to merged this with the condition that the issues will be fixed ASAP.

@sergey-shandar sergey-shandar merged commit bc175db into Azure:current Sep 26, 2017
@AutorestCI
Copy link

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

@AutorestCI
Copy link

@AutorestCI
Copy link

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

@AutorestCI
Copy link

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

@AutorestCI
Copy link

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

Copy link
Member

@lmazuel lmazuel left a comment

Choose a reason for hiding this comment

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

Breaking change

@@ -25,8 +25,10 @@ To see additional help and options, run:
These are the global settings for the ServiceFabricClient API.

``` yaml
title: ServiceFabricClient
Copy link
Member

Choose a reason for hiding this comment

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

@juhacket @sergey-shandar
This is a breaking change and redefine the Swagger that correctly says ServiceFabricManagementClient

Copy link
Contributor

Choose a reason for hiding this comment

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

@juhacket could you send a PR to fix this problem ASAP. @lmazuel I missed this line which effects all versions of API.

Copy link
Member Author

Choose a reason for hiding this comment

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

@amarzavery
Copy link
Contributor

@sergey-shandar @juhacket - This PR has issues.
The global parameters should have the "x-ms-parameter-location": "method" extension if they do not intend to be properties on the client.

The constructor signature of the client changed from
constructor(credentials, subscriptionId, baseUri, options)

to

constructor(credentials, applicationName, applicationTypeName, serviceName, subscriptionId, version, cluster, clusterUpdateParameters, baseUri, options)
which is a breaking and unnecessary change.
/cc @salameer
Azure/azure-openapi-validator#84

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 Conditionally-Merged ReadyForSDKReview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants