Closed jonjohnsonjr closed 3 months ago
Attention: Patch coverage is 0%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 40.63%. Comparing base (
2ef6022
) to head (9432efd
). Report is 132 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
pkg/oci/remote/image.go | 0.00% | 2 Missing :warning: |
pkg/oci/remote/signatures.go | 0.00% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The wrapping that oci.Signatures does hides the ConfigLayer() implementation in remote.Image that remote.Write relies on for determining if it can mount the config blob (vs having to re-upload it), so remote.Write is sending additional blob uploads, which incurs an additional roundtrip that we don't really need to do.
Explicitly implement ConfigLayer() in the wrappers by dispatching to the wrapped implementation fixes this.
Before this change, this check fails due to the wrapping:
https://github.com/google/go-containerregistry/blob/1b4e4078a545f2b6f96766a064b45ee77cdbefdd/pkg/v1/partial/with.go#L102-L104
Which means we get back this fallback implementation: https://github.com/google/go-containerregistry/blob/1b4e4078a545f2b6f96766a064b45ee77cdbefdd/pkg/v1/partial/with.go#L52-L88
Which means this check fails: https://github.com/google/go-containerregistry/blob/1b4e4078a545f2b6f96766a064b45ee77cdbefdd/pkg/v1/remote/write.go#L364
So we didn't attempt to mount.
https://go.dev/play/p/2kW3-XbdjmM