full diff: https://github.com/moby/buildkit/compare/a1e4f48e712360e6292819e55285e1bbacce99d4...da1f4bf179dcc972d023f30c0d5b4a6576ff385f
- [v0.6 backport] cache: avoid nil dereference
- fixes panic: interface conversion: interface {} is nil, not int64
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -26,7 +26,7 @@ github.com/imdario/mergo 7c29201646fa3de8506f70121347 |
| 26 | 26 |
golang.org/x/sync e225da77a7e68af35c70ccbf71af2b83e6acac3c |
| 27 | 27 |
|
| 28 | 28 |
# buildkit |
| 29 |
-github.com/moby/buildkit a1e4f48e712360e6292819e55285e1bbacce99d4 # v0.6.4-26-ga1e4f48e |
|
| 29 |
+github.com/moby/buildkit da1f4bf179dcc972d023f30c0d5b4a6576ff385f # v0.6.4-28-gda1f4bf1 |
|
| 30 | 30 |
github.com/tonistiigi/fsutil 6c909ab392c173a4264ae1bfcbc0450b9aac0c7d |
| 31 | 31 |
github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746 |
| 32 | 32 |
github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7 |
| ... | ... |
@@ -123,7 +123,10 @@ func (cr *cacheRecord) Size(ctx context.Context) (int64, error) {
|
| 123 | 123 |
cr.mu.Unlock() |
| 124 | 124 |
return usage.Size, nil |
| 125 | 125 |
}) |
| 126 |
- return s.(int64), err |
|
| 126 |
+ if err != nil {
|
|
| 127 |
+ return 0, err |
|
| 128 |
+ } |
|
| 129 |
+ return s.(int64), nil |
|
| 127 | 130 |
} |
| 128 | 131 |
|
| 129 | 132 |
func (cr *cacheRecord) Parent() ImmutableRef {
|