We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 59dad38 + 58185b2 commit 4527842Copy full SHA for 4527842
pkg/runtime/depot.go
@@ -485,10 +485,12 @@ func (d *depot) removeStaleArtifacts() error {
485
var totalSize int64
486
unusedArtifacts := make([]*artifactInfo, 0)
487
488
- for _, info := range d.config.Cache {
+ for id, info := range d.config.Cache {
489
if !info.InUse {
490
totalSize += info.Size
491
- unusedArtifacts = append(unusedArtifacts, info)
+ unusedInfo := *info
492
+ unusedInfo.id = id // id is not set in cache since info is keyed by id
493
+ unusedArtifacts = append(unusedArtifacts, &unusedInfo)
494
}
495
496
logging.Debug("There are %d unused artifacts totaling %.1f MB in size", len(unusedArtifacts), float64(totalSize)/float64(MB))
0 commit comments