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

[oci package] - streaming support + correctly handle empty blobs #1106

Open
4 tasks
ccwienk opened this issue Jan 2, 2025 · 0 comments
Open
4 tasks

[oci package] - streaming support + correctly handle empty blobs #1106

ccwienk opened this issue Jan 2, 2025 · 0 comments
Labels
area/delivery Delivery related component/cicd Continuous integration/delivery (tooling and processes) kind/bug Bug kind/enhancement Enhancement, improvement, extension

Comments

@ccwienk
Copy link
Member

ccwienk commented Jan 2, 2025

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 using requests package) into oci.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.

  • re-enable streaming for oci.client
  • re-enable streaming for 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 from requests (todo: check whether oci.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".

  • correctly upload empty blobs (oci.client) - OR: fail upon empty blobs
  • correctly upload empty blobs (oci.client_async) - OR: fail upon empty blobs
@ccwienk ccwienk added kind/enhancement Enhancement, improvement, extension area/delivery Delivery related component/cicd Continuous integration/delivery (tooling and processes) kind/bug Bug labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/delivery Delivery related component/cicd Continuous integration/delivery (tooling and processes) kind/bug Bug kind/enhancement Enhancement, improvement, extension
Projects
None yet
Development

No branches or pull requests

1 participant