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

Swagger for canceling MI management operations #7924

Closed
wants to merge 15 commits into from
Closed

Swagger for canceling MI management operations #7924

wants to merge 15 commits into from

Conversation

toki95
Copy link
Contributor

@toki95 toki95 commented Dec 9, 2019

Adding swagger for cancel and list of management operations on managed server.

@toki95 toki95 requested a review from jaredmoo as a code owner December 9, 2019 16:01
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Dec 9, 2019

azure-sdk-for-java

🔄 inProgress [Logs] [Expand Details]
  • 🔄 Generate from 79f4e8d with merge commit 4de4341bfad81551c22bffbb670e6621d8c075ad. SDK Automation 13.0.17.20191226.1

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Dec 9, 2019

azure-sdk-for-go

🔄 inProgress [Logs] [Expand Details]
  • 🔄 Generate from 79f4e8d with merge commit 4de4341bfad81551c22bffbb670e6621d8c075ad. SDK Automation 13.0.17.20191226.1

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Dec 9, 2019

azure-sdk-for-net

🔄 inProgress [Logs] [Expand Details]
  • 🔄 Generate from 79f4e8d with merge commit 4de4341bfad81551c22bffbb670e6621d8c075ad. SDK Automation 13.0.17.20191226.1

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Dec 9, 2019

azure-sdk-for-python

🔄 inProgress [Logs] [Expand Details]
  • 🔄 Generate from 79f4e8d with merge commit 4de4341bfad81551c22bffbb670e6621d8c075ad. SDK Automation 13.0.17.20191226.1

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Dec 9, 2019

azure-sdk-for-js

🔄 inProgress [Logs] [Expand Details]
  • 🔄 Generate from 79f4e8d with merge commit 4de4341bfad81551c22bffbb670e6621d8c075ad. SDK Automation 13.0.17.20191226.1

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

"modelAsString": true
}
},
"errorCode": {
Copy link
Member

Choose a reason for hiding this comment

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

is there min and max?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure that I understand what you mean.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also can you add other people for ARM team, I don't have permission to do that. Jared is on vacation until the end of the year.

@yungezz yungezz added the WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required label Dec 10, 2019
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@toki95 toki95 requested a review from yungezz December 10, 2019 10:49
@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@toki95
Copy link
Contributor Author

toki95 commented Dec 13, 2019

@yungezz can you please merge this pull request?

@yungezz
Copy link
Member

yungezz commented Dec 13, 2019

hi @toki95 , this PR is adding new version, need ARM review and signoff.

@toki95
Copy link
Contributor Author

toki95 commented Dec 13, 2019

@yungezz what does that mean? Adam Krom has signed off and he is from ARM team since Jared if oof until end of the year.

@yungezz
Copy link
Member

yungezz commented Dec 16, 2019

hi @akromm could you pls label the PR with "ARMSignedOff"?

{
"swagger": "2.0",
"info": {
"version": "2019-06-01-preview",
Copy link
Contributor

Choose a reason for hiding this comment

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

For future PRs please copy the previous version's swagger spec in commit 1 before making changes in future commits. This makes it much easier to review.

"$ref": "#/parameters/ManagedInstanceNameParameter"
},
{
"name": "operationId",
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be "operationName". "ID" typically refers to the full resource ID and the list of operations gives the value you want the user to provider here in the "name" property

"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}/cancel": {
Copy link
Contributor

Choose a reason for hiding this comment

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

You need a GET API for individual operations to be compliant with the RPC especially if you are now allowing people to cancel individual operations. A comparison is operations on a template deployment: https://docs.microsoft.com/en-us/rest/api/resources/deploymentoperations/get

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This API for cancel was done in a manner to be compliant with SQL DB and they don't have an API fro getting one particular operation.
Also can you please explain if there is a requirement to create a new API or if we can add not-required parameter in existing API for listing all operations-operationId which will allow customer to get one particular operation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Existing APIs not following the RPC shouldn't be a reason to continue that trend. Services within Azure rely on RPs following the RPC so they can work with resources in a generic way without needing to know the quirks of any specific API.

I have not seen an example in existing swagger specs where someone modeled a LIST and GET operation in the same operation via an optional name parameter. The response model would be different so I don't imagine that is a good idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pilor pilor added ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review and removed ARMReviewInProgress labels Dec 18, 2019
@yungezz
Copy link
Member

yungezz commented Dec 23, 2019

pls address ARM reviewing comments.

@yungezz
Copy link
Member

yungezz commented Jan 2, 2020

hi @toki95 pls address reviewing comments .

@yungezz
Copy link
Member

yungezz commented Jan 8, 2020

hi @toki95 pls address reviewing comments .

@yungezz
Copy link
Member

yungezz commented Jan 14, 2020

hi @toki95 any update? thanks.

@yungezz
Copy link
Member

yungezz commented Jan 19, 2020

ping again. @toki95

Addressing comments
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Added example for getting MI operation.
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@toki95 toki95 closed this Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARMChangesRequested <valid label in PR review process>add this label when require changes after ARM review WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants