Merge pull request #3294 from dmcgowan/fix-metadata-panic

Ensure namespaced writer commit has correct namespace
This commit is contained in:
Phil Estes 2019-05-22 00:49:40 +02:00 committed by GitHub
commit 2088fc999c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -567,6 +567,8 @@ func (nw *namespacedWriter) createAndCopy(ctx context.Context, desc ocispec.Desc
}
func (nw *namespacedWriter) Commit(ctx context.Context, size int64, expected digest.Digest, opts ...content.Opt) error {
ctx = namespaces.WithNamespace(ctx, nw.namespace)
nw.l.RLock()
defer nw.l.RUnlock()