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

Redis.CheckNameAvailability pattern is not implemented correctly #2981

Open
hovsepm opened this issue Apr 30, 2018 · 9 comments
Open

Redis.CheckNameAvailability pattern is not implemented correctly #2981

hovsepm opened this issue Apr 30, 2018 · 9 comments
Labels
Redis Cache Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@hovsepm
Copy link
Contributor

hovsepm commented Apr 30, 2018

Current latest spec describes return type of an operation checkNameAvailability as void.
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/redis/resource-manager/Microsoft.Cache/stable/2018-03-01/redis.json#L91

In the generated code the method will be as void checkNameAvailability(parameters) and if it will not throw an exception (C#/Java) then the name is available.

@TimLovellSmith
Copy link
Member

@hovsepm That actually sounds like what I expected the generated code to be. Is there a specific guideline about this? just spent about 10 minutes looking and I couldn't find it.

@TimLovellSmith
Copy link
Member

TimLovellSmith commented May 1, 2018

@hovsepm We can change the response payload to match the one you expect without incrementing api version, and without breaking anyone as long as a) they are just checking the 200 response code, and b) we never return available=false, but instead continue return a 409 error status code.

But, if in next REST api version we change the response payload to the recommended available = false , I believe that would actually result a breaking behavioral change in the generated SDK for applications which were expecting an exception to be thrown, but now see a 'false' returned from the function, which their app will not be testing for. Is it acceptable to have these breaking changes, in what people are probably expecting to be a mature management library by now? Is it e.g. acceptable IF we get it documented? What is the story for documenting such breaking changes?

@salameer
Copy link
Member

@hovsepm this seems to be complete, please verify and resolve this issue if so

@hovsepm hovsepm closed this as completed Sep 24, 2018
@TimLovellSmith
Copy link
Member

@salameer How is it completed? We didn't yet change anything for check name availability on redis swagger side AFAICR, due to the above concern about breaking behavioral change.

@hovsepm hovsepm reopened this Sep 24, 2018
@hovsepm
Copy link
Contributor Author

hovsepm commented Sep 24, 2018

Sorry @TimLovellSmith :) I though I saw some changes related to the issue in your PR. Please ping me directly when you will address this issue.

@TimLovellSmith
Copy link
Member

@hovsepm But I might not ping you. Currently we don't have a plan to address the issue [i.e. update swagger], because our perception is that even though it could make the API more consistent, it would become a soft-breaking return type change in the client library that we think wouldn't actually be appreciated by people upgrading their client library.

@TimLovellSmith
Copy link
Member

Recap; we still aren't planning to fix this. The reason was we feel it doesn't meet the bar to deliberately make what would be a SDK 'breaking' change (for existing apps upgrading the library) in exception vs error behavior, just to be more consistent with other name validation apis (for other resources). Shall we close this?

@zhenglaizhang zhenglaizhang added Redis Cache Service Attention Workflow: This issue is responsible by Azure service team. labels Dec 29, 2020
@ghost
Copy link

ghost commented Dec 29, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @yegu-ms.

Issue Details

Current latest spec describes return type of an operation checkNameAvailability as void.
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/redis/resource-manager/Microsoft.Cache/stable/2018-03-01/redis.json#L91

In the generated code the method will be as void checkNameAvailability(parameters) and if it will not throw an exception (C#/Java) then the name is available.

Author: hovsepm
Assignees: TimLovellSmith
Labels:

Redis Cache, Service Attention

Milestone: -

@TimLovellSmith
Copy link
Member

@msftbot I still think thats hard for us to change without it being an unexpected breaking change to SDK behavior.

mccleanp pushed a commit that referenced this issue Mar 23, 2022
…s.. (#2981)

* adding hybridmetadata proxy resource

* udpates

* updates

* modeling identity same as the default

* updates

* updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Redis Cache Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants