-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[LLC] [Synapse] Enable cast from Response to a hand-written model #23372
Labels
Azure.Core
Client
This issue points to a problem in the data-plane of the library.
needs-design
Synapse
Comments
ghost
added
the
needs-triage
Workflow: This is a new issue that needs to be triaged to the appropriate team.
label
Aug 17, 2021
annelo-msft
added
Azure.Core
Client
This issue points to a problem in the data-plane of the library.
Synapse
labels
Aug 17, 2021
ghost
removed
the
needs-triage
Workflow: This is a new issue that needs to be triaged to the appropriate team.
label
Aug 17, 2021
This was referenced Aug 17, 2021
This was referenced Sep 9, 2021
annelo-msft
changed the title
[Synapse][LLC] Enable cast from hand-written model to Response
[LLC] [Synapse] Enable cast from hand-written model to Response
Sep 15, 2021
Per recent discussion, we'll do this as:
Relevant PR making API additions to ResponseClassifier: https://github.com/Azure/azure-sdk-for-net/pull/22923/files |
We will not resolve API questions as part of this change. |
Relevant Draft PR investigations: |
KrzysztofCwalina
changed the title
[LLC] [Synapse] Enable cast from hand-written model to Response
[LLC] [Synapse] Enable cast from Response to a hand-written model
Sep 15, 2021
3 tasks
Depends on: #24051 |
Design issues currently being discussed here: #24164 |
This was referenced Sep 23, 2021
Relevant PRs have merged. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Azure.Core
Client
This issue points to a problem in the data-plane of the library.
needs-design
Synapse
Problem
As we add high-level methods to the Synapse Access Control low-level client, we need to make it possible to pass a
CancellationToken
to any HLC method by calling the LLC version.LLC Considerations
Per @KrzysztofCwalina, we would like the models to be designed such that even if they are in the main package, they can be used with the protocol methods, i.e. given the following protocol method and helper method:
We should allow:
To make this work for the input is easy. We just need a cast from
InputModel
toRequestContent
.Similarly, we could add a cast from
Response
toOutputModel
to make the output work, but in addition it would be great if the error behavior was exactly the same whether the protocol method or the grow up method was called. This means the cast fromResponse
toOutputModel
would have to have access toClientDiagnostics
.Implementation
To accomplish this, we’ll add the following to Core, as specified by @pakrym:
The call to
response.Throw()
can replace any linethrow _clientDiagnostics.CreateRequestFailedException(message.Response);
in generated/HLC code.The text was updated successfully, but these errors were encountered: