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

Avoid v1.Manifest in crane edit config #1583

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

jonjohnsonjr
Copy link
Collaborator

Because of how omitempty works, an empty Layers and a nil Layers will both be omitted. We don't want that, because different registries support different variants of that. Instead, we just pass through whatever was there before by treating the manifest as a map[string]any and manipulating that rather than using v1.Manifest-based helpers.

@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2023

Codecov Report

Merging #1583 (599b4aa) into main (1cfe1fc) will decrease coverage by 0.04%.
The diff coverage is 50.00%.

❗ Current head 599b4aa differs from pull request most recent head 1d0747c. Consider uploading reports for the commit 1d0747c to get more accurate results

@@            Coverage Diff             @@
##             main    #1583      +/-   ##
==========================================
- Coverage   72.88%   72.84%   -0.04%     
==========================================
  Files         118      118              
  Lines        9422     9435      +13     
==========================================
+ Hits         6867     6873       +6     
- Misses       1861     1865       +4     
- Partials      694      697       +3     
Impacted Files Coverage Δ
internal/cmd/edit.go 53.04% <50.00%> (-0.27%) ⬇️

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

Because of how omitempty works, an empty Layers and a nil Layers will
both be omitted. We don't want that, because different registries
support different variants of that. Instead, we just pass through
whatever was there before by treating the manifest as a map[string]any
and manipulating that rather than using v1.Manifest-based helpers.
@jonjohnsonjr jonjohnsonjr merged commit 4b081f8 into google:main Mar 15, 2023
@jonjohnsonjr jonjohnsonjr deleted the omit-empty-laeyrs branch March 15, 2023 20:00
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.

None yet

3 participants