Skip to content

Commit 41b7b0e

Browse files
committed
Ensure namespaced writer commit has correct namespace
The namespaced writer Commit method must always have a namespace in the context as checked by the removeIngestLease function, resulting in a panic when not provided. Signed-off-by: Derek McGowan <[email protected]>
1 parent bcb6c8d commit 41b7b0e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

metadata/content.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,8 @@ func (nw *namespacedWriter) createAndCopy(ctx context.Context, desc ocispec.Desc
567567
}
568568

569569
func (nw *namespacedWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error {
570+
ctx = namespaces.WithNamespace(ctx, nw.namespace)
571+
570572
nw.l.RLock()
571573
defer nw.l.RUnlock()
572574

0 commit comments

Comments
 (0)