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

feat: Add native image handler backend #497

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

project0
Copy link
Contributor

This change adds a new native backend to remove eventually the need to depend on external skopeo binary.
Using the native library allows much better control and error handling. It also enables us to add more easily new features like signing for example.

  • Migrate image inspect and copy into a interface
  • Migrate skopeo based calls into new package
  • Remove code duplication in registries
  • Add cache layer backend
  • Add new optional alternative native image backend

implements #443

This change adds a new native backend to remove eventually the need to
depend on external skopeo binary.
Using the native library allows much better control and error handling.
It also enables us to add more easily new features like signing for
example.

* Migrate image inspect and copy into a interface
* Migrate skopeo based calls into new package
* Remove code duplication in registries
* Add cache layer backend
* Add new optional alternative native image backend
@github-actions github-actions bot added the enhancement New feature or request label Mar 24, 2023
@project0
Copy link
Contributor Author

project0 commented Mar 24, 2023

I had no time to test it yet :-)
edit: works like a charm ;-)

@project0
Copy link
Contributor Author

It might need extra build tags to fix the gpgme dependency: https://github.com/containers/image#supported-build-tags

@codecov
Copy link

codecov bot commented Mar 25, 2023

Codecov Report

Patch coverage: 2.29% and project coverage change: +2.81 🎉

Comparison is base (123ee5b) 34.08% compared to head (2490389) 36.89%.

❗ Current head 2490389 differs from pull request most recent head 94937fa. Consider uploading reports for the commit 94937fa to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #497      +/-   ##
==========================================
+ Coverage   34.08%   36.89%   +2.81%     
==========================================
  Files           9       10       +1     
  Lines         848      786      -62     
==========================================
+ Hits          289      290       +1     
+ Misses        534      471      -63     
  Partials       25       25              
Impacted Files Coverage Δ
pkg/config/config.go 0.00% <ø> (ø)
pkg/registry/cache.go 0.00% <0.00%> (ø)
pkg/registry/client.go 25.58% <0.00%> (-12.35%) ⬇️
pkg/registry/gar.go 13.59% <5.26%> (+4.67%) ⬆️
pkg/registry/ecr.go 8.79% <6.66%> (+2.54%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@project0 project0 marked this pull request as ready for review March 26, 2023 12:08
One central place to handle caching
@estahn estahn added this to the 1.6.0 milestone Apr 1, 2023
@mloiseleur
Copy link

Hello @estahn,

Wdyt of this PR ? Anything needed ?

@estahn
Copy link
Owner

estahn commented Feb 13, 2024

@project0 Apologies it took me so long to look at things. Could you resolve the conflicting files? I tried, but there are some changes in ecr.go I'm not entirely sure about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants