Repository navigation
feat(oci-layout): support in oras push and oras attach - #750
Conversation
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #750 +/- ##
==========================================
+ Coverage 63.96% 64.14% +0.18%
==========================================
Files 19 19
Lines 702 700 -2
==========================================
Hits 449 449
+ Misses 222 220 -2
Partials 31 31
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
oras push and oras attachoras push and oras attach
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
FeynmanZhou
left a comment
There was a problem hiding this comment.
The examples in CLI help look good to me!
| // Reassemble a reference with subject digest | ||
| if repo, ok := dst.(*remote.Repository); ok { | ||
| ref := repo.Reference | ||
| ref.Reference = subject.Digest.String() | ||
| opts.RawReference = ref.String() | ||
| } else if opts.Type == option.TargetTypeOCILayout { | ||
| opts.RawReference = fmt.Sprintf("%s@%s", opts.Path, subject.Digest) | ||
| } |
There was a problem hiding this comment.
We can just do switch opts.Type.
There was a problem hiding this comment.
But repo.Reference (including Host name and repository name) need *remote.Repository type assertion anyway.
| option.Remote | ||
| option.Packer | ||
| option.ImageSpec | ||
| option.DistributionSpec |
There was a problem hiding this comment.
I just noticed that the DistributionSpec should be stick to the option.Remote. This should also be applied to oras cp and oras manifest push.
There was a problem hiding this comment.
No it should not. If we do that, DistributionSpec will be applied to all commands related to option.Remote, which is wrong considering the following cases:
- Since
oras pushis not related to referrers maintanance, the execution is always the same no matter what value is provided to--distribution-spec. So we should NEVER apply this flag tooras push. Same for other commands. - If user specify
--distribution-spec v1.1-referrers-tagtooras discover, should the command looking for referrers via tag scheme? We should design the expected behaviour and then add this flag to those commands. Before that,--distribution-specshould not be applied tooras discover.
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
Signed-off-by: Billy Zha <[email protected]>
…ect#750) Related to oras-project#378 Signed-off-by: Billy Zha <[email protected]>
Related to #378