Skip to content

Commit 3d44ec2

Browse files
authored
Merge pull request moby#4202 from goller/docs/note-nil-return
docs(source): mention successful snapshots can be nil
2 parents e743530 + 4968e97 commit 3d44ec2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type SourceInstance interface {
3232
// CacheKey returns the cache key for the instance.
3333
CacheKey(ctx context.Context, g session.Group, index int) (key, pin string, opts solver.CacheOpts, done bool, err error)
3434

35-
// Snapshot creates a cache ref for the instance.
35+
// Snapshot creates a cache ref for the instance. May return a nil ref if source points to empty content, e.g. image without any layers.
3636
Snapshot(ctx context.Context, g session.Group) (cache.ImmutableRef, error)
3737
}
3838

0 commit comments

Comments
 (0)