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

Prove design for rehydration of Operation and Operation<T> #28562

Closed
annelo-msft opened this issue May 5, 2022 · 5 comments
Closed

Prove design for rehydration of Operation and Operation<T> #28562

annelo-msft opened this issue May 5, 2022 · 5 comments
Assignees

Comments

@annelo-msft
Copy link
Member

annelo-msft commented May 5, 2022

Operation types must provide a constructor that allows users to access an existing LRO.

Currently, protocol methods and their convenience APIs that start/complete long-running operations return either Operation or Operation<T>. Neither of these types provides a way to access an existing LRO as required by the guidelines.

This issues tracks the work to provide a proof of concept that we can implement this functionality. An implementation is not required for DPG GA, but will be a DPG v1.1 feature.

@annelo-msft annelo-msft self-assigned this May 5, 2022
@annelo-msft
Copy link
Member Author

Related to Azure/autorest.csharp#2158

@ArthurMa1978
Copy link
Member

Is this depend on Azure/autorest.csharp#2231 ?
And can we have this done in May?

@annelo-msft
Copy link
Member Author

Is this depend on Azure/autorest.csharp#2231 ?

Having #2231 would speed up the implementation of this, and help with design, but it is not strictly required.

And can we have this done in May?

We are working toward this. I have created a gist describing options here: https://gist.github.com/annelo-msft/f8d8ca10484081e395df23f518de91cc Depending on the outcome of the design, the implementation may take more or less time.

@ArthurMa1978, can you help me understand your need to have it done in May? Is it different from the DPG GA goals?

@annelo-msft
Copy link
Member Author

Per @KrzysztofCwalina, it is not required to produce a design prior to DPG v1.0 GA. Having considered multiple approaches to design, I believe that any of them can be made to work with design tradeoffs and that all the pieces are in place such that we can add operation rehydration without making breaking changes to the protocol methods on DPG libraries.

Right now, we return Operation or Operation<BinaryData> in the method signatures of methods that invoke long running operations. We don't expect to change this in the future. If we need to add subtypes of Operation specific to DPG to add functionality in the future, we will require rehydration of the operation or a downcast to the subtype to access that functionality.

@KrzysztofCwalina
Copy link
Member

or we add this missing functionality to the base type. i.e. we convinced ourselves that we will be able to support it post v1

@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants