Skip to content

feat: add oci image layout mutation #1442

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

Closed
wants to merge 1 commit into from

Conversation

developer-guy
Copy link
Contributor

@developer-guy developer-guy commented Aug 23, 2022

Signed-off-by: Batuhan Apaydın [email protected]
Co-authored-by: Furkan Türkal [email protected]

Fixes #1433

kindly ping @imjasonh for review

@developer-guy developer-guy changed the title add mutating annotations section to the recipes of the crane WIP: add mutating annotations section to the recipes of the crane Aug 23, 2022
@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2022

Codecov Report

Merging #1442 (827fd95) into main (1b8dc2b) will increase coverage by 0.39%.
The diff coverage is n/a.

❗ Current head 827fd95 differs from pull request most recent head cdcb43f. Consider uploading reports for the commit cdcb43f to get more accurate results

@@            Coverage Diff             @@
##             main    #1442      +/-   ##
==========================================
+ Coverage   72.92%   73.31%   +0.39%     
==========================================
  Files         118      117       -1     
  Lines        9417     9017     -400     
==========================================
- Hits         6867     6611     -256     
+ Misses       1857     1746     -111     
+ Partials      693      660      -33     
Impacted Files Coverage Δ
pkg/crane/options.go 79.16% <0.00%> (-7.28%) ⬇️
pkg/registry/manifest.go 92.27% <0.00%> (-1.77%) ⬇️
pkg/v1/remote/options.go 76.36% <0.00%> (-1.42%) ⬇️
internal/cmd/edit.go 52.84% <0.00%> (-1.29%) ⬇️
pkg/v1/mutate/index.go 78.99% <0.00%> (-0.35%) ⬇️
pkg/v1/mutate/image.go 69.23% <0.00%> (-0.34%) ⬇️
pkg/name/digest.go 100.00% <0.00%> (ø)
pkg/v1/manifest.go 100.00% <0.00%> (ø)
pkg/v1/platform.go 100.00% <0.00%> (ø)
pkg/v1/empty/index.go 100.00% <0.00%> (ø)
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@developer-guy developer-guy force-pushed the main branch 3 times, most recently from 722bb5e to 7596331 Compare August 24, 2022 06:02
@developer-guy developer-guy changed the title WIP: add mutating annotations section to the recipes of the crane feat: add oci image layout mutation Aug 24, 2022
@developer-guy developer-guy force-pushed the main branch 3 times, most recently from e347031 to c8c1f0f Compare August 24, 2022 09:23
@developer-guy developer-guy requested a review from imjasonh August 24, 2022 09:25
@developer-guy
Copy link
Contributor Author

Okay, now it's working fine, thanks to @Dentrax.

You can test this with the following commands:

$ crane pull --format oci devopps/hello-world:buildinfo hello-world-oci-layout
$ tar czf layer.tar.gz README.md
$ LAYER_DIGEST=$(sha256sum layer.tar.gz | cut -d' ' -f1) 
$ ./crane mutate --append layer.tar.gz --oci-image-layout hello-world-oci-layout
$ tar tvf hello-world-oci-layout/blobs/sha256/$LAYER_DIGEST
-rw-r--r--  0 batuhan.apaydin staff    2968 Aug 23 22:59 README.md

@developer-guy
Copy link
Contributor Author

kindly ping @imjasonh @jonjohnsonjr

@developer-guy
Copy link
Contributor Author

kindly ping @jonjohnsonjr

@developer-guy
Copy link
Contributor Author

kindly ping folx @imjasonh @jonjohnsonjr ☝️

@developer-guy developer-guy force-pushed the main branch 5 times, most recently from de84c3c to 4a79fe4 Compare November 25, 2022 08:50
@developer-guy
Copy link
Contributor Author

kindly ping folx @imjasonh @jonjohnsonjr 🫣

Copy link
Collaborator

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

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

Hey, sorry as always for the delayed review. 🥵

This is quite a lot of new code, which worries me since it doesn't have any corresponding tests, even e2e tests. I'm also not very familiar with the use case, so I'd like to understand that a bit more before committing to supporting this.

Signed-off-by: Batuhan Apaydın <[email protected]>
Co-authored-by: Furkan Türkal <[email protected]>
Signed-off-by: Batuhan Apaydın <[email protected]>
@github-actions
Copy link

This Pull Request is stale because it has been open for 90 days with
no activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crane: mutate OCI image layout with annotations, layers etc.
3 participants