-
Notifications
You must be signed in to change notification settings - Fork 315
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
Change Request: Clients should add/update API version for paging, LROs #3817
Comments
Since I was @-mentioned I want to make a slight correction to the record. What was agreed was that the Azure SDKs should replace or add the api-version – because our SDKs provide externals for serializing and handing off the Operation-Location URL (as a continuation token?) to another process which might be using a different api-version. There was not agreement on whether api-version should our should not be included in the |
scheduled for 2/7 3-4pm pst |
Recording[MS INTERNAL ONLY] We settled on:
|
The Basics
We're proposing a change to the Service API Versions general guidelines, as available already in PR #3809.
All languages.
Clients should add or update the
api-version
string on any LRO or paging request with the API version passed (or defaulted) to the client upon instantiation. It's also been suggested that any API version in the URI path should be updated, though more hints to code generation may be required.Reasoning
We recently discovered that some services weren't sending back the
api-version
inOperation-Location
headers, which then caused a service error since we weren't sending it back. After a discussion over email with @mikekistler, @JeffreyRichter, and @markweitzel, it was proposed that there's good reason for a service not to back theapi-version
but instead have the client library always add/update it - at least for theapi-version
query string parameter if not in the URI path for those services doing that e.g.,api/v2/resource/:action
.The reason given was that one version of an SDK may start an LRO (especially a VLRO), but another version using another
api-version
may want to complete it, i.e. that the status update and final resource fetch for an LRO may be divorced from the original request to start the LRO. The same argument didn't make as much sense for paging, but it was agreed that we should be consistent.This was blocking Cognitive Services - Question Answering, but the service team decided to send the
api-version
back in theOperation-Location
header for the LRO. But we would like to discuss merging #3809 and making changes to code generation (and helper APIs, where needed) such that all clients do this for LROs and paging. This way we have a consistent pattern across Azure services and client libraries.The text was updated successfully, but these errors were encountered: