From 4de01686d8b02cea8f192970c422abd5af1e2547 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Wed, 17 Jul 2024 11:12:55 +0000 Subject: [PATCH] fix: remove cached execute for run marker command --- pkg/commands/run_marker.go | 6 ------ pkg/executor/build.go | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pkg/commands/run_marker.go b/pkg/commands/run_marker.go index 53ff6e3aa7..352ed94544 100644 --- a/pkg/commands/run_marker.go +++ b/pkg/commands/run_marker.go @@ -47,12 +47,6 @@ func (r *RunMarkerCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfi return nil } -func (r *RunMarkerCommand) CachedExecuteCommand(config *v1.Config, buildArgs *dockerfile.BuildArgs) error { - // TODO(mafredri): Check if we need to do more here. - r.Files = []string{} - return nil -} - // String returns some information about the command for the image config func (r *RunMarkerCommand) String() string { return r.cmd.String() diff --git a/pkg/executor/build.go b/pkg/executor/build.go index 0ba12a7131..164c54fe76 100644 --- a/pkg/executor/build.go +++ b/pkg/executor/build.go @@ -509,6 +509,9 @@ func (s *stageBuilder) probeCache() error { case *commands.RunCommand: // If the cache is valid, we expect CachingRunCommand. return errors.Errorf("uncached RUN command is not supported in cache probe mode") + case *commands.RunMarkerCommand: + // If the cache is valid, we expect CachingRunCommand. + return errors.Errorf("uncached RUN command is not supported in cache probe mode") default: return errors.Errorf("unsupported command %T encountered in cache probe mode, missing CachedExecuteCommand", command) }