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

Replace the docker lib with oras #302

Closed
Skarlso opened this issue Oct 22, 2024 · 2 comments · Fixed by open-component-model/ocm#1184
Closed

Replace the docker lib with oras #302

Skarlso opened this issue Oct 22, 2024 · 2 comments · Fixed by open-component-model/ocm#1184
Assignees
Labels
area/ipcei Important Project of Common European Interest kind/feature new feature, enhancement, improvement, extension

Comments

@Skarlso
Copy link
Contributor

Skarlso commented Oct 22, 2024

What would you like to be added:

A continuation of #106.

Turns out ORAS had some hickups when we tried to introduce it. It handled some parts of the image layering choices based on MediaType incorrectly.

We need to revisit the implementation and try a smaller scale repository approach in which we just replace the interface usage of the tech/docker package to minimize breaks.

Why is this needed:

@Skarlso Skarlso added the kind/feature new feature, enhancement, improvement, extension label Oct 22, 2024
@github-actions github-actions bot added the area/ipcei Important Project of Common European Interest label Oct 22, 2024
@Skarlso Skarlso moved this from 🆕 ToDo to 📋 Next-UP in OCM Backlog Board Nov 28, 2024
@jakobmoellerdev
Copy link
Contributor

Needs at least 2 assignees due to complexity of issue

@Skarlso
Copy link
Contributor Author

Skarlso commented Nov 28, 2024

Tests

Most important test is making sure that all blobs behind a manifest are actually available and downloadable.

Reproducing steps:

ocm transfer component --copy-resources ./transport-archive ghcr.io/skarlso/ocm-transfer-test-dev-2 -f
... # also try commontransportarchive
ocm transfer commontransportarchive --copy-resources ./transport-archive ghcr.io/skarlso/ocm-transfer-test-dev-2 -f

Check manifest and manifest blobs

 crane manifests ghcr.io/skarlso/ocm-transfer-test-dev-2/stefanprodan/podinfo
 crane manifest ghcr.io/skarlso/ocm-transfer-test-dev-2/stefanprodan/podinfo:6.2.0@sha256:f60e14b08375a64528113dd8808b16030c771f626e66961dfaf511b74d6f68dc
 crane manifest ghcr.io/skarlso/ocm-transfer-test-dev-2/stefanprodan/podinfo:6.2.0@sha256:1196bd99425758aab0c530b00aeb27c39d09a77435d244025d3161a77460674e
 crane manifest ghcr.io/skarlso/ocm-transfer-test-dev-2/stefanprodan/podinfo:6.2.0@sha256:87e43935515a74fcb742d66ee23f5229bd8ac5782f2810787b23c47325cb963e

Initial Approach

This file api/oci/extensions/repositories/ocireg/namespace.go contains the usage of this interface api/tech/docker/resolve/interface.go. If we can manage to implement this interface with Regclient, it should be possible to more easily replace the docker part without the need to touch how Namespaces are constructed.

Also need to replace getResolver here api/oci/extensions/repositories/ocireg/repository.go which creates the OCI client ( aka. docker client ) to construct the regclient ( or the wrapper to the regclient which implements the interface mentioned before ).

Together with this, hopefully, that's the most thing that needs to be changed with the minimum amount of code change.

@Skarlso Skarlso moved this from 📋 Next-UP to 🏗 In Progress in OCM Backlog Board Dec 4, 2024
@Skarlso Skarlso moved this from 🏗 In Progress to 🔍 Review in OCM Backlog Board Dec 16, 2024
@jakobmoellerdev jakobmoellerdev changed the title Replace the docker lib with regclient Replace the docker lib with oras Dec 18, 2024
jakobmoellerdev added a commit to open-component-model/ocm that referenced this issue Dec 18, 2024
<!-- markdownlint-disable MD041 -->
#### What this PR does / why we need it

Closes open-component-model/ocm-project#302

#### Which issue(s) this PR fixes
<!--
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->

---------

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
Co-authored-by: Jakob Möller <jakob.moeller@sap.com>
@github-project-automation github-project-automation bot moved this from 🔍 Review to 🍺 Done in OCM Backlog Board Dec 18, 2024
@ocmbot ocmbot bot moved this from 🍺 Done to 🔒Closed in OCM Backlog Board Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipcei Important Project of Common European Interest kind/feature new feature, enhancement, improvement, extension
Projects
Status: 🔒Closed
Development

Successfully merging a pull request may close this issue.

2 participants