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

Add support for configuring decompression on streaming download APIs #2618

Closed
jalauzon-msft opened this issue Jun 6, 2024 · 4 comments · Fixed by #2680
Closed

Add support for configuring decompression on streaming download APIs #2618

jalauzon-msft opened this issue Jun 6, 2024 · 4 comments · Fixed by #2680
Assignees
Labels
mgmt This issue is related to a management-plane library.

Comments

@jalauzon-msft
Copy link
Member

Currently Storage generated code response.stream_download in all download APIs (Example). Azure Core's StreamDownloadGenerator (which stream_download returns) takes a decompress keyword arg to configure whether the response is automatically decompressed during download for relevant content encodings.

We would like to be able to expose this option to our users but the generated code does not have a way to pass anything to the stream_download method. It would be great if there was a way to pass at least decompress into this call from our hand-written code.

@msyyc msyyc self-assigned this Jun 11, 2024
@msyyc msyyc added the mgmt This issue is related to a management-plane library. label Jun 11, 2024
@msyyc
Copy link
Member

msyyc commented Jun 11, 2024

After #2605, we switch to rest responses. For backward compatiblility, rest responses still has stream_download.

@lmazuel
Copy link
Member

lmazuel commented Jul 1, 2024

@msyyc I think you misunderstood the ask. Stream_download is called from inside the codegen, so customer don't control the kwarg that can be injected when it's called. Jacob would like a way to do it.

@msyyc
Copy link
Member

msyyc commented Jul 2, 2024

@msyyc I think you misunderstood the ask. Stream_download is called from inside the codegen, so customer don't control the kwarg that can be injected when it's called. Jacob would like a way to do it.

I quite get what you mean and #2618 (comment) is just hint for me that it is doable even if we covert to rest responses after #2605.
Now I am still waiting for @johanste opinion in teams channel and appreciate if you could help ping him. @lmazuel

@msyyc
Copy link
Member

msyyc commented Jul 3, 2024

image
After discussion, SDK team is OK to expose new kwargs decompress and I will begin the coding soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mgmt This issue is related to a management-plane library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants