You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that a descriptor can point to arbitrary content, we need a way to access that content if it doesn't conform to expected media-types. layout.layoutIndex already implements this.
We may want to have an option v1.ImageIndex.Layer(Hash) as well (and use it for known layer media types), because of how MountableLayer works.
We also need to update a lot of places where we handle v1.ImageIndex. A few that spring to mind...
In mutate, you can't append non-manifests to an index:
We might want to add a Manifests() method that mirrors v1.Image's Layers().
Unfortunately, there's not a great return type for that. We need something that can be any of v1.Image, v1.ImageIndex, v1.Layer, or just an io.ReadCloser (perhaps this can just be a v1.Layer?). Related to #835
I need to go through all the callsites to see what we actually end up doing with this stuff to see if there's an obvious common set of functionality.
In the short term, we could do some typechecking for Blob(Hash) and Layer(hash) for unexpected mediatypes.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.
Given that a descriptor can point to arbitrary content, we need a way to access that content if it doesn't conform to expected media-types.
layout.layoutIndex
already implements this.We may want to have an option
v1.ImageIndex.Layer(Hash)
as well (and use it for known layer media types), because of howMountableLayer
works.We also need to update a lot of places where we handle
v1.ImageIndex
. A few that spring to mind...In
mutate
, you can't append non-manifests to an index:go-containerregistry/pkg/v1/mutate/index.go
Lines 104 to 106 in 6a63025
In
remote.Write
, we just ignore non-manifests:go-containerregistry/pkg/v1/remote/write.go
Lines 517 to 535 in 6a63025
In
remote.MultiWrite
, we return an error:go-containerregistry/pkg/v1/remote/multi_write.go
Line 199 in 6a63025
In
layout.Write
, we ignore non-manifests:go-containerregistry/pkg/v1/layout/write.go
Lines 261 to 263 in 6a63025
In
validate.Index
, we log a warning:go-containerregistry/pkg/v1/validate/index.go
Lines 78 to 79 in 6a63025
In
compare.Indexes
, we don't bother:go-containerregistry/pkg/internal/compare/index.go
Line 76 in 6a63025
The text was updated successfully, but these errors were encountered: