kojiapi: successful osbuild jobs must have output

When we compute the overall status of a koji compose, the individual
build jobs are checked. Currently, a job is considered a failure, if
a build job has output (`OSBuildOutput`) and the output's `Success`
field is `false`. But `OSBuildOutput` will be `nil` when osbuild
crashed or refused the manifest input. Therefore the job status is
a failure if `OSBuildOutput` is `nil`, since if osbuild was run,
and the run was successful we must have a non-`OSBuildOutput` field.
This commit is contained in:
Christian Kellner 2022-01-26 19:45:42 +00:00 committed by Tom Gundersen
parent 987f4c4795
commit 5e2617ed49

View file

@ -260,7 +260,7 @@ func composeStatusFromJobStatus(js *worker.JobStatus, initResult *worker.KojiIni
}
for _, buildResult := range buildResults {
if buildResult.OSBuildOutput != nil && !buildResult.OSBuildOutput.Success {
if buildResult.OSBuildOutput == nil || !buildResult.OSBuildOutput.Success {
return api.ComposeStatusValueFailure
}
if buildResult.JobError != nil {