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`.
This commit is contained in:
Christian Kellner 2022-01-28 18:52:20 +00:00 committed by Tom Gundersen
parent edfdcf0be6
commit 987f4c4795

View file

@ -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