[QUERY] Design discussion on returning activation response for long-running API #39952
Open
1 of 2 tasks
Labels
Client
This issue points to a problem in the data-plane of the library.
needs-team-attention
This issue needs attention from Azure service team or SDK team
Query/Question
Service is Face.
Some API in it would return a response upon PUT/POST, which is useful for user, even before the LRO complete.
Our guideline would use
SyncPoller
for the LRO, but the activation response is not accessible.Possible design
None of them is / will be supported by emitter. So all involves customization in client.
One possible API response would be a model wrapping the
ActivationResult
and theSyncPoller<PollResult, FinalResult>
. However this does not match the guideline.Another problem is that the wrapper model would be different in async client, as it be
Mono<ActivationResult>
+PollerFlux<PollResult, FinalResult>
Another possible API response would be a subclass of
SyncPoller
which one additional API as e.g.getActivationResult()
. However, we cannot do this to the async client, asPollerFlux
class is final.One could leave out the LRO. The PUT/POST would not be framed as LRO, and just return e.g.
Response<ActivationResult>
. But SDK provide some helper function to convert the response toSyncPoller<PollResult, FinalResult>
if user want to poll to completion.Setup (please complete the following information if applicable):
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: