Skip to content

Commit 5d04586

Browse files
Merge pull request #27430 from l0rd/fix-wsl-image-cache-mismatch
Fix cache misses when pulling WSL machine image
2 parents 14dee39 + 7c51ad0 commit 5d04586

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

pkg/machine/define/image_format.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ func (imf ImageFormat) Kind() string {
2424
}
2525

2626
func (imf ImageFormat) KindWithCompression() string {
27-
// Tar uses xz; all others use zstd
28-
if imf == Tar {
29-
return "tar.xz"
30-
}
27+
// All image formats are compressed with zstd
3128
return fmt.Sprintf("%s.zst", imf.Kind())
3229
}

pkg/machine/define/image_format_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ func TestImageFormat_KindWithCompression(t *testing.T) {
5959
imf: Raw,
6060
want: "raw.zst",
6161
}, {
62-
name: "tar.xz",
62+
name: "tar.zst",
6363
imf: Tar,
64-
want: "tar.xz",
64+
want: "tar.zst",
6565
},
6666
}
6767
for _, tt := range tests {

0 commit comments

Comments
 (0)