-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Added BackupValidateOperation API #3395
Conversation
Automation for azure-sdk-for-pythonThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-goThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-nodeThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-rubyThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-javaNothing to generate for azure-sdk-for-java |
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.
Semantic validation is failing, can you please fix? https://travis-ci.org/Azure/azure-rest-api-specs/jobs/402622342
@jhendrixMSFT the validation failed with below error, but the file is added at the right location in the PR. Can you let me know what am I missing? Uncaught Error: /home/travis/build/Azure/azure-rest-api-specs/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2017-07-01/bms.json has references that cannot be resolved. They are as follows: 'Error opening file "/home/travis/build/Azure/azure-rest-api-specs/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2017-07-01/examples/AzureIaasVM/ValidateOperation_RestoreDisk.json" \nENOENT: no such file or directory, open '/home/travis/build/Azure/azure-rest-api-specs/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2017-07-01/examples/AzureIaasVM/ValidateOperation_RestoreDisk.json'' |
CI runs on Linux which has case-sensitive file paths. In part of the path you've specified |
@@ -4110,12 +4110,7 @@ | |||
"VMAppContainer", | |||
"SQLAGWorkLoadContainer", | |||
"StorageContainer", | |||
"GenericContainer", |
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.
Why are these being removed from a stable spec? This is a breaking change from an SDK perspective. Same comment applies to other places where enums are removed.
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.
GenericContainer should not have been there in first place. The API set is not exposed yet. I will check with the team on why this was there earlier.
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.
When a swagger is merged into the public repo it's considered a release event. As such we've already released this for the Go programming language and possibly others. While we won't prevent you from making this change it will be flagged as a breaking change and reported in S360.
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.
Do you want to leave these breaking changes as-is?
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.
Yes. We discussed this internally. These were not used anywhere. So we will leave them as is.
"Validate" | ||
], | ||
"description": "Validate operation for specified backed up item. This is a synchronous operation.", | ||
"operationId": "Validate_Operation", |
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 we need a better name for this, what this will generate now is a client named Validate
with a method named Operation
which isn't very intuitive. If this API is to validate an existing backup I would suggest something like Backup_Validate
.
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.
Ok. The idea here is to validate the feasibility of the operation. Validate Operation can work before triggering the actual operation.
In example, we try to validate whether the restore operation can happen. API is written generic for all operations.
How about Operation_Validate ?
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.
Ah I see, yeah let's go with Operation_Validate.
Latest model validation failures log https://travis-ci.org/Azure/azure-rest-api-specs/jobs/403424152 |
Not able to understand the Model failure logs? The additional paramaeters are actually part of IaasVMRestoreRequest. I thought if we add objectType (swagger discriminator to the sample, that would fix this. |
"region": "southeastasia", | ||
"createNewCloudService": true, | ||
"originalStorageAccountOption": false, | ||
"api-version": "2016-12-01", |
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.
OK regarding the model validation failures, I dug into this some more and the only problem is this extra "api-version" parameter in the request body. The reporting of the other properties appears to be a bug in the validation tool and we are investigating futher.
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
api-version
in the path should match theapi-version
in the spec).Quality of Swagger