api/koji: return pending status until all jobs are finished
Previously, the compose status returned failure as soon as possible. koji-osbuild considers the job as done when its status == failure and proceeds with uploading the logs to koji and marking the job as failed. However, not all osbuild-composer jobs might be done at this point so the logs might be incomplete making the debugging hard. This commit changes the behaviour: Now, the compose status is pending until ALL jobs belonging to it are finished. Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
e10a7f1ccc
commit
00cd4cb346
1 changed files with 4 additions and 4 deletions
|
|
@ -230,6 +230,10 @@ func composeStatusFromJobStatus(js *worker.JobStatus, initResult *worker.KojiIni
|
|||
return "failure"
|
||||
}
|
||||
|
||||
if js.Finished.IsZero() {
|
||||
return "pending"
|
||||
}
|
||||
|
||||
if initResult.KojiError != "" {
|
||||
return "failure"
|
||||
}
|
||||
|
|
@ -243,10 +247,6 @@ func composeStatusFromJobStatus(js *worker.JobStatus, initResult *worker.KojiIni
|
|||
}
|
||||
}
|
||||
|
||||
if js.Finished.IsZero() {
|
||||
return "pending"
|
||||
}
|
||||
|
||||
if result.KojiError == "" {
|
||||
return "success"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue