[oci package] - streaming support + correctly handle empty blobs #1106
Labels
area/delivery
Delivery related
component/cicd
Continuous integration/delivery (tooling and processes)
kind/bug
Bug
kind/enhancement
Enhancement, improvement, extension
Context / Motivation
ocm package is intended to be used w/ "streaming" support, especially for
oci.replicate_artefact
(ref). This is done in order to limit consumption of main memory, but also to avoid unnecessary I/O against local filesystem.For reasons yet to be found out, streaming from an
oci.client.blob
(which issues an http-get-request against a blob usingrequests
package) intooci.client.pub_blob
will lead to SSLErrors (unexpected EOF). As a workaround, we write data from source into temporary (ref) files. While this works, it is not ideal, as it will increase processing times + cause unnecessary I/O. Also, it will consume storage in local filesystem.Implementation Proposal
Find out why streaming fails, and enable it (again). Switching to another http-client-lib might help.
oci.client
oci.client_async
Bonus-Task
oci.client.put_blob
will currently fail to correctly process empty blobs (requests will block until eventually running into (configured) timeouts). This is probably also a limitation/bug fromrequests
(todo: check whetheroci.client_async
is also affected).For OCI-Images, empty blobs will likely never occur (as tar does not allow empty tarfiles). Possibly, OCI-Transport-Spec even forbids empty blobs (could not find an explicit stmt). Therefore, checking for empty blobs and failing with an explicit error-message might already be "good enough".
The text was updated successfully, but these errors were encountered: