From bce76d486e08b77eb54cc9e60783bfb4d7f16d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Thu, 27 Jun 2024 17:31:44 +0200 Subject: [PATCH] builder-next: Don't return error from exported callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is only a callback that notifies about event so there is no way to react to the error. Signed-off-by: Paweł Gronowski --- builder/builder-next/exporter/wrapper.go | 2 +- daemon/build.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/builder/builder-next/exporter/wrapper.go b/builder/builder-next/exporter/wrapper.go index 1676466ab9..d954b3a698 100644 --- a/builder/builder-next/exporter/wrapper.go +++ b/builder/builder-next/exporter/wrapper.go @@ -11,7 +11,7 @@ import ( ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) -type ImageExportedByBuildkit = func(ctx context.Context, id string, desc ocispec.Descriptor) error +type ImageExportedByBuildkit = func(ctx context.Context, id string, desc ocispec.Descriptor) // Wraps the containerimage exporter's Resolve method to apply moby-specific // overrides to the exporter attributes. diff --git a/daemon/build.go b/daemon/build.go index e4b5737ca0..613342efbb 100644 --- a/daemon/build.go +++ b/daemon/build.go @@ -10,7 +10,6 @@ import ( // This is used to log the image creation event for untagged images. // When no tag is given, buildkit doesn't call the image service so it has no // way of knowing the image was created. -func (daemon *Daemon) ImageExportedByBuildkit(ctx context.Context, id string, desc ocispec.Descriptor) error { +func (daemon *Daemon) ImageExportedByBuildkit(ctx context.Context, id string, desc ocispec.Descriptor) { daemon.imageService.LogImageEvent(id, id, "create") - return nil }