From 987f4c4795de82f96e7af21357203d10ccc8df0d Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 28 Jan 2022 18:52:20 +0000 Subject: [PATCH] worker: fix job error check for koji-osbuild job This check got inverted during the work on "Worker errors backwards compatibility". As a consequence, osbuild was never run and the result structure `buildResult.OSBuildOutput` was `nil` Since the overall status reporting is not complete, and does not take this, i.e. `buildResult.OSBuildOutput`, being `nil` as an error case, the overall status was reported as "success". See the function `composeStatusFromJobStatus` in `internal/kojiapi/server.go`. --- cmd/osbuild-worker/jobimpl-osbuild-koji.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/osbuild-worker/jobimpl-osbuild-koji.go b/cmd/osbuild-worker/jobimpl-osbuild-koji.go index 5a955867c..aa59cd1a3 100644 --- a/cmd/osbuild-worker/jobimpl-osbuild-koji.go +++ b/cmd/osbuild-worker/jobimpl-osbuild-koji.go @@ -87,7 +87,7 @@ func (impl *OSBuildKojiJobImpl) Run(job worker.Job) error { return err } - if initArgs.JobError != nil { + if initArgs.JobError == nil { exports := args.Exports if len(exports) == 0 { // job did not define exports, likely coming from an older version of composer