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

[ACR] Resettable streams don't work for uploadBlob and uploadManifest #24048

Closed
timovv opened this issue Nov 29, 2022 · 0 comments · Fixed by #24049
Closed

[ACR] Resettable streams don't work for uploadBlob and uploadManifest #24048

timovv opened this issue Nov 29, 2022 · 0 comments · Fixed by #24049
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Container Registry
Milestone

Comments

@timovv
Copy link
Member

timovv commented Nov 29, 2022

Passing in a resettable stream (type () => NodeJS.ReadableStream) to uploadBlob results in the following error:

Error: Error "value must be a string, Blob, ArrayBuffer, ArrayBufferView, or NodeJS.ReadableStream." occurred in serializing the payload - "value".
 at serializeRequestBody (/home/timov/src/azure-sdk-for-js/sdk/core/core-client/src/serializationPolicy.ts:200:13)
 at Object.sendRequest (/home/timov/src/azure-sdk-for-js/sdk/core/core-client/src/serializationPolicy.ts:58:9)
 at /home/timov/src/azure-sdk-for-js/sdk/core/core-rest-pipeline/src/pipeline.ts:170:25
 at HttpPipeline.sendRequest (/home/timov/src/azure-sdk-for-js/sdk/core/core-rest-pipeline/src/pipeline.ts:176:12)
 at GeneratedClient.sendRequest (/home/timov/src/azure-sdk-for-js/sdk/core/core-client/src/serviceClient.ts:125:26)
 at GeneratedClient.sendOperationRequest (/home/timov/src/azure-sdk-for-js/sdk/core/core-client/src/serviceClient.ts:207:38)
 at ContainerRegistryBlobImpl.uploadChunk (/home/timov/src/azure-sdk-for-js/sdk/containerregistry/container-registry/src/generated/operations/containerRegistryBlob.ts:75:28)
 at /home/timov/src/azure-sdk-for-js/sdk/containerregistry/container-registry/src/blob/containerRegistryBlobClient.ts:175:79
 at processTicksAndRejections (node:internal/process/task_queues:96:5)
 at async Object.withSpan (/home/timov/src/azure-sdk-for-js/sdk/core/core-tracing/src/tracingClient.ts:70:22)
 at async Context.<anonymous> (/home/timov/src/azure-sdk-for-js/sdk/containerregistry/container-registry/test/public/containerRegistryBlobClient.spec.ts:105:32)

While core-rest-pipeline has support for resettable streams, a change needs to be made to the validation logic in core-client to accept them.

@timovv timovv added Client This issue points to a problem in the data-plane of the library. Container Registry labels Nov 29, 2022
@timovv timovv added this to the 2022-12 milestone Nov 29, 2022
@timovv timovv self-assigned this Nov 29, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
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. Container Registry
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant