From c56eb724e83fed42cfa3b3a93d4d74fdaee1055e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Tue, 16 Nov 2021 08:32:24 +0100 Subject: [PATCH] job/osbuild: skip the job if manifest generation failed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Running the job in this case is basically undefined, so let's just skip it in order to not break anything. Signed-off-by: Ondřej Budai --- cmd/osbuild-worker/jobimpl-osbuild.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/osbuild-worker/jobimpl-osbuild.go b/cmd/osbuild-worker/jobimpl-osbuild.go index 98b84aaf9..926f7912e 100644 --- a/cmd/osbuild-worker/jobimpl-osbuild.go +++ b/cmd/osbuild-worker/jobimpl-osbuild.go @@ -92,6 +92,11 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error { if err != nil { return err } + + // skip the job if the manifest generation failed + if manifestJR.Error != "" { + return nil + } args.Manifest = manifestJR.Manifest } // copy pipeline info to the result