-
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
Fix Automation swagger spec errors in the AutomationAccount and Webhook areas #2360
Fix Automation swagger spec errors in the AutomationAccount and Webhook areas #2360
Conversation
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: AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
Did a commit to Azure/azure-sdk-for-go: |
Did a commit to Azure/azure-sdk-for-python: |
@AnatoliB are you aware that this may introduce SDK breaking changes for such languages like C#, Java, Go? |
@sergey-shandar Currently we (Automation team) are in the process of releasing the Autorest generated client to the public and do not have any external users. Also, our Autorest-SDKs are in preview mode currently to help us fix such issues. Thus, this change should not be a problem. |
If there are no external customers, moving it into edit: formatting |
We are in the process of generating a new SDK using Swagger spec (Azure/azure-sdk-for-net#3992), which would be in the preview, where it (SDK) will be promoted out of preview when our PowerShell cmdlets and internal testing tools would be migrated. But our API for 2015-10-31 is stable (https://github.com/Azure/azure-resource-manager-schemas/tree/master/schemas/2015-10-31) and are public. The changes that @AnatoliB is doing is to fix the linting issues with the spec such that it complies with the service. If there are any service changes, which require a major API change, we would be adding that change in the preview/2017-05-15-preview version itself. Please let me know if you have any questions or suggestions for fixing the linter issues in the existing spec. |
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.
@vrdmr thank you for the context. In this case, I would suggest not to introduce the changes in the old API version if they can bring SDK breaking changes.
- Making a property optional (removing from
required
) is a breaking change for some programming languages, for example C#. - I'm not sure about
"x-ms-azure-resource": true
. It may introduce breaking changes for some programming languages.
Definetly this changes should be in the new API version but it doesn't make much sense to introduce SDK breaking changes for your customers.
Let me know, if there are other reasons (except fixing linter errors/warning) to introduce the changes in the stable API.
My understanding from conversations with @vrdmr is that:
So, any existing web service client will continue working against (1) as it is still communicating with exactly the same service, and it is not even aware of (2). @sergey-shandar, are you talking about someone who could take the published swagger spec and generate his own SDK from the spec? Does this mean that changing the swagger spec at this location effectively means publishing an SDK, and this is how we should treat it for all changes? |
Hey @sergey-shandar,
Our swagger-based SDK is still in preview stage and contains many breaking changes. We released the preview SDK last month and are cleaning up the Specs before we can promote the SDK to a stable version. Please let me know if you have any other questions. cc: @marstr, @AnatoliB, @D1v38om83r |
Hi @sergey-shandar, We need to close on this soon, as we are trying to fix all the swagger validation errors within the next few days, so I will appreciate your help very much. Please note that there are multiple other PRs with similar changes coming from our team, and some of them have already been committed. My previous point was that this may not be a breaking change in our context. But here is another question: what if we do want to make a breaking change? Is this not allowed under any circumstances, or there is an authority that could actually make this call? What I observed previously was that a reviewer would just point out a potential breaking change, and then approve the PR after the author acknowledges the issue. So, is this decision up to the Automation team? |
Hi @AnatoliB. We assume that if RestAPI is published before as stable then people have freedom to generate stable API for any programming language. Including Microsoft official SDKs, for example for Python, Ruby, JavaScript, Go etc. For example, there's an official Microsoft stable NuGet package https://www.nuget.org/packages/Microsoft.Azure.Management.Automation/2.0.4 which is using the same API version 2015-10-03. So making changes in this swagger file will introduce SDK breaking changes for stable SDK for the same API version. We are trying hard to eliminate such breaking changes. |
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.
Since this API version is used in stable SDKs (NuGet 2.0.4), I would suggest not to make the SDK breaking changes. In particular, making properties optional are SDK breaking changes.
It's always better to make SDK and server side breaking changes in a new API version if the current one is already publicly available.
There could be some exception, for example, bugs in API etc.
At the end, it's your service customers who may suffer. We can still approve this but we have to be sure that you understand all consequences. Is there a strong reason why you would like to introduce SDK breaking changes in the same API version? |
The changes done in this PR reflect the Service and we are updating the specification to keep it updated. Also,
The 2.0.4 API was generated from Hyak from the last PR done in SDK/Master. |
Ping. Can you please take a look at this PR? Thanks. |
@vrdmr we need ARM approval for this. @ravbhatnagar could you have a look, it's really simple change. |
Looks good. |
@sergey-shandar Could you please approve and merge this change. Thanks. |
Automation for azure-sdk-for-pythonA 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: |
Automation for azure-sdk-for-goEncountered a Subprocess error: (azure-sdk-for-go)
Command: profileBuilder -s list -l ./profiles/2017-03-09/defintion.txt -name 2017-03-09 /bin/sh: 1: profileBuilder: not found |
@AutorestCI rebuild azure-sdk-for-python |
Fixing the following errors in the Automation swagger spec:
The intent of this PR is to address these errors only. The entire Automation swagger spec contains other errors, and they will be addressed by separate PRs.
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