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

[Storage] Support multiple service versions #8303

Closed
jeremymeng opened this issue Apr 9, 2020 · 14 comments
Closed

[Storage] Support multiple service versions #8303

jeremymeng opened this issue Apr 9, 2020 · 14 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. cross-language alignment mark issues need to be aligned across different languages feature-request This issue requires a new behavior in the product in order be resolved. Storage Storage Service (Queues, Blobs, Files) vTBD

Comments

@jeremymeng
Copy link
Member

Current storage libraries only support one version. .NET allows passing service version via client pipeline options. We should consider support similar?

/cc @bterlson

@jeremymeng jeremymeng added Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files) labels Apr 9, 2020
@bterlson
Copy link
Member

bterlson commented Apr 9, 2020

serviceVersion in pipeline options seems good to me. Thoughts?

@jeremymeng
Copy link
Member Author

Related disucssion Azure/azure-sdk#1043 and Azure/azure-sdk#1198

@jiacfan
Copy link
Member

jiacfan commented Apr 11, 2020

My consideration here is SDK functions are closely binding to specific Min service version. So customer could face case that bunch of APIs are not working, and they even have no idea what's the set should work. So exposing service version customization might be risky.

As another option, user can choose to use right version of storage SDK with specific service version, where all APIs are by design work.

At same time, for advanced user they can choose to customize service version with pipeline option.

@XiaoningLiu
Copy link
Member

XiaoningLiu commented Jun 12, 2020

Techinically it's easy to add serviceVersion to storage client pipeline options. But we cannot guarantee all functionalities will work as expected when customer set to a old or newer serviceVersion.

Option 1: Customer customize and override serviceVersion via customized pipeline policy. Under their own risk
Option 2: Provide new serviceVersion client pipeline option, no validation, customer use that option under their own risk
Option 3: Provide new serviceVersion client pipeline option, limit to a subset of supported API versions (can do backward compatibility check, difficult to do forward compatibility check)
Option 4: Provide new serviceVersion client pipeline option. We do API level check. Each API defines compatible API version ranges.
Option 5: Create a new @azure/storage-blob-multi-version package, which internally depends on history versions of @azure/storage-blob (some techinical blockers need to handle from npm). Create clients according to different serviceAPI version.

@tg-msft
Copy link
Member

tg-msft commented Jul 1, 2020

.NET currently supports V2019_02_02, V2019_07_07, and V2019_12_12.

@XiaoningLiu
Copy link
Member

@tg-msft will .NET guarantee each version from V2019_02_02, V2019_07_07, and V2019_12_12 will work properly for each API and parameters?

@tg-msft
Copy link
Member

tg-msft commented Jul 2, 2020

Yes, we run our tests across multiple versions of the API to ensure everything continues working. Newer APIs will obviously only work with later service versions, but an error is thrown if that happens. Our guidance to customers is "application developers should always float on the latest service version (which happens by default if you don't explicitly specify a version) and library developers should lock to a specific service version they tested against."

@jeremymeng
Copy link
Member Author

  1. Currently for the single version enum in swagger json, generated code from our TS codegen don't accept api versions (except in file-share swagger json where ApiVersionParameter parameter is not specified). It might just work if we add more versions (via transformation), or remove the parameter.
  2. Testing multiple versions. Probably add a [V2019_02_02, V2019_07_07, and V2019_12_12].forEach() loop for every test and pass the version to client constructor, after 1) is resolved.

@XiaoningLiu
Copy link
Member

Some APIs or some parameters of APIs are only avaiable on latest version. I'm thinking how to handle these cases when customers use these latest version only APIs or parameters.

Sometimes, existing APIs will have breaking change in latest version. In this case, we need to matain multi versions of same API implementation. But swagger is linked to latest swagger.

@jeremymeng
Copy link
Member Author

Right, unless we use multiple generated clients for multiple versions of swagger. However that would have great impact on the bundle size for browsers.

@jeremymeng
Copy link
Member Author

I'm thinking how to handle these cases when customers use these latest version only APIs or parameters.

Does the service return an error in this case?

Sometimes, existing APIs will have breaking change in latest version. In this case, we need to matain multi versions of same API implementation.

@tg-msft How did .NET solve this problem without multiple backends?

@bterlson
Copy link
Member

Just chiming in to say that I suppose an apiVersion PipelineOptions with methods which throw when they know they can't work with the selected API version. Agree with Jeremy that we can't do multiple back-ends because the package will be too fat.

@ramya-rao-a ramya-rao-a added this to the Backlog milestone Sep 21, 2020
@jeremymeng jeremymeng modified the milestones: Backlog, MQ-2020 Oct 13, 2020
@ljian3377 ljian3377 added feature-request This issue requires a new behavior in the product in order be resolved. cross-language alignment mark issues need to be aligned across different languages labels Oct 22, 2020
@ljian3377 ljian3377 added the vTBD label Nov 3, 2020
@ramya-rao-a ramya-rao-a modified the milestones: MQ-2020, Backlog Dec 2, 2020
@jeremymeng
Copy link
Member Author

For testing:

Copy link

Hi @jeremymeng, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2024
@xirzec xirzec removed this from the Backlog milestone May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. cross-language alignment mark issues need to be aligned across different languages feature-request This issue requires a new behavior in the product in order be resolved. Storage Storage Service (Queues, Blobs, Files) vTBD
Projects
None yet
Development

No branches or pull requests

9 participants