Skip to content

Commit ac450a6

Browse files
committed
fix: avoid BLOB_UNKNOWN by not enabling ForceBuildMetadata
Ref: #385 Ref: coder/kaniko#34
1 parent 24ef801 commit ac450a6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

envbuilder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ func run(ctx context.Context, opts options.Options, execArgs *execArgsInfo) erro
541541
NoPush: !opts.PushImage || len(destinations) == 0,
542542
CacheRunLayers: true,
543543
CacheCopyLayers: true,
544-
ForceBuildMetadata: opts.PushImage, // Force layers with no changes to be cached, required for cache probing.
544+
ForceBuildMetadata: false, // Force layers with no changes to be cached, required for cache probing.
545545
CompressedCaching: true,
546546
Compression: config.ZStd,
547547
// Maps to "default" level, ~100-300 MB/sec according to
@@ -1269,7 +1269,7 @@ func RunCacheProbe(ctx context.Context, opts options.Options) (v1.Image, error)
12691269
NoPush: true,
12701270
CacheRunLayers: true,
12711271
CacheCopyLayers: true,
1272-
ForceBuildMetadata: true, // Force layers with no changes to be cached, required for cache probing.
1272+
ForceBuildMetadata: false, // Force layers with no changes to be cached, required for cache probing.
12731273
CompressedCaching: true,
12741274
Compression: config.ZStd,
12751275
// Maps to "default" level, ~100-300 MB/sec according to

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.22.4
44

55
// There are a few options we need added to Kaniko!
66
// See: https://github.com/GoogleContainerTools/kaniko/compare/main...coder:kaniko:main
7-
replace github.com/GoogleContainerTools/kaniko => github.com/coder/kaniko v0.0.0-20241028054616-350cbb820e05
7+
replace github.com/GoogleContainerTools/kaniko => github.com/coder/kaniko v0.0.0-20241107190527-8aeb946dfc4d
88

99
// Required to import codersdk due to gvisor dependency.
1010
replace tailscale.com => github.com/coder/tailscale v1.1.1-0.20240702054557-aa558fbe5374

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoC
171171
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
172172
github.com/coder/coder/v2 v2.10.1-0.20240704130443-c2d44d16a352 h1:L/EjCuZxs5tOcqqCaASj/nu65TRYEFcTt8qRQfHZXX0=
173173
github.com/coder/coder/v2 v2.10.1-0.20240704130443-c2d44d16a352/go.mod h1:P1KoQSgnKEAG6Mnd3YlGzAophty+yKA9VV48LpfNRvo=
174-
github.com/coder/kaniko v0.0.0-20241028054616-350cbb820e05 h1:KZc6vG/WnSWG8RtUevGrCdZbF7XJaaZ32ocig6sZLQk=
175-
github.com/coder/kaniko v0.0.0-20241028054616-350cbb820e05/go.mod h1:3rM/KOQ4LgF8mE+O1P6pLDa/E57mzxIxNdUOMKi1qpg=
174+
github.com/coder/kaniko v0.0.0-20241107190527-8aeb946dfc4d h1:qqoyQMtIHWYRw8RbDPT+pdOQER9UKm36tsJtiy9MVc8=
175+
github.com/coder/kaniko v0.0.0-20241107190527-8aeb946dfc4d/go.mod h1:3rM/KOQ4LgF8mE+O1P6pLDa/E57mzxIxNdUOMKi1qpg=
176176
github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0 h1:3A0ES21Ke+FxEM8CXx9n47SZOKOpgSE1bbJzlE4qPVs=
177177
github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0/go.mod h1:5UuS2Ts+nTToAMeOjNlnHFkPahrtDkmpydBen/3wgZc=
178178
github.com/coder/quartz v0.1.0 h1:cLL+0g5l7xTf6ordRnUMMiZtRE8Sq5LxpghS63vEXrQ=

0 commit comments

Comments
 (0)