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: mutate on oci-layout #1869

Closed
wants to merge 1 commit into from
Closed

feat: mutate on oci-layout #1869

wants to merge 1 commit into from

Conversation

thesayyn
Copy link
Collaborator

@thesayyn thesayyn commented Jan 23, 2024

#1433 but NOT COMPLETE!

Make most of the crane cli able to mutate images on oci-layout.

The idea is to introduce a local version for some functions in v1/remote that does the identical operation on an oci-layout

cc @developer-guy as you were interested in this.

@codecov-commenter
Copy link

Codecov Report

Attention: 31 lines in your changes are missing coverage. Please review.

Comparison is base (a0658aa) 71.65% compared to head (d02e5d1) 71.46%.

Files Patch % Lines
pkg/crane/push.go 0.00% 10 Missing and 2 partials ⚠️
pkg/crane/config.go 14.28% 5 Missing and 1 partial ⚠️
pkg/crane/options.go 0.00% 5 Missing ⚠️
pkg/crane/get.go 0.00% 2 Missing and 1 partial ⚠️
pkg/crane/pull.go 0.00% 2 Missing and 1 partial ⚠️
internal/cmd/edit.go 0.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1869      +/-   ##
==========================================
- Coverage   71.65%   71.46%   -0.19%     
==========================================
  Files         123      123              
  Lines        9928     9954      +26     
==========================================
  Hits         7114     7114              
- Misses       2115     2137      +22     
- Partials      699      703       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -137,7 +142,8 @@ func New(use, short string, options []crane.Option) *cobra.Command {
root.PersistentFlags().BoolVar(&insecure, "insecure", false, "Allow image references to be fetched without TLS")
root.PersistentFlags().BoolVar(&ndlayers, "allow-nondistributable-artifacts", false, "Allow pushing non-distributable (foreign) layers")
root.PersistentFlags().Var(platform, "platform", "Specifies the platform in the form os/arch[/variant][:osversion] (e.g. linux/amd64).")

root.PersistentFlags().StringVar(&local, "local", "", "Use a local oci-layout as remote registry")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a big change, since it affects all commands. Would it be worth having some e2e tests that set up a local layout and crane pull --local=<that>, crane mutate, etc.?

@thesayyn thesayyn closed this Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants