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

Allow config files to be mounted #1387

Merged
merged 1 commit into from
Jun 16, 2022
Merged

Conversation

jonjohnsonjr
Copy link
Collaborator

Because we wanted to reuse the layer uploading code, we wrap the config
bytes up as a Layer. Unfortunately, the partial.ConfigLayer
implementation doesn't preserve the fact that for mountable images, we
can perform a cross-repo mount.

This change updates partial.ConfigLayer to look for a ConfigLayer
implementation on the given image to see if it can simply dispatch to
that, falling back to calculating it from the config bytes otherwise.

Because we wanted to reuse the layer uploading code, we wrap the config
bytes up as a Layer. Unfortunately, the partial.ConfigLayer
implementation doesn't preserve the fact that for mountable images, we
can perform a cross-repo mount.

This change updates partial.ConfigLayer to look for a ConfigLayer
implementation on the given image to see if it can simply dispatch to
that, falling back to calculating it from the config bytes otherwise.
@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2022

Codecov Report

Merging #1387 (3e469c1) into main (12aeccc) will increase coverage by 0.00%.
The diff coverage is 75.00%.

@@           Coverage Diff           @@
##             main    #1387   +/-   ##
=======================================
  Coverage   74.19%   74.19%           
=======================================
  Files         113      113           
  Lines        8458     8470   +12     
=======================================
+ Hits         6275     6284    +9     
- Misses       1575     1577    +2     
- Partials      608      609    +1     
Impacted Files Coverage Δ
pkg/v1/remote/mount.go 73.91% <66.66%> (-1.77%) ⬇️
pkg/v1/partial/with.go 64.53% <100.00%> (+0.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12aeccc...3e469c1. Read the comment docs.

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.

Nice.

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