worker/osbuild: check errors of all job dependencies

Ensure that none of the job dependencies failed. This covers the case
when there are more than one job dependencies, which will be the case
for Koji composes.
This commit is contained in:
Tomas Hozza 2022-05-12 17:52:44 +02:00 committed by Tom Gundersen
parent 4032dea6d2
commit 66f7eaf440
2 changed files with 28 additions and 7 deletions

View file

@ -20,13 +20,13 @@ const (
ErrorInvalidConfig ClientErrorCode = 17
ErrorOldResultCompatible ClientErrorCode = 18
ErrorEmptyManifest ClientErrorCode = 19
ErrorDNFDepsolveError ClientErrorCode = 20
ErrorDNFMarkingErrors ClientErrorCode = 21
ErrorDNFOtherError ClientErrorCode = 22
ErrorRPMMDError ClientErrorCode = 23
ErrorEmptyPackageSpecs ClientErrorCode = 24
ErrorDNFRepoError ClientErrorCode = 25
ErrorDNFDepsolveError ClientErrorCode = 20
ErrorDNFMarkingErrors ClientErrorCode = 21
ErrorDNFOtherError ClientErrorCode = 22
ErrorRPMMDError ClientErrorCode = 23
ErrorEmptyPackageSpecs ClientErrorCode = 24
ErrorDNFRepoError ClientErrorCode = 25
ErrorJobDependency ClientErrorCode = 26
)
type ClientErrorCode int
@ -72,6 +72,8 @@ func GetStatusCode(err *Error) StatusCode {
return JobStatusUserInputError
case ErrorManifestDependency:
return JobStatusUserInputError
case ErrorJobDependency:
return JobStatusUserInputError
case ErrorEmptyPackageSpecs:
return JobStatusUserInputError
case ErrorEmptyManifest:
@ -87,6 +89,8 @@ func (e *Error) HasDependencyError() bool {
return true
case ErrorManifestDependency:
return true
case ErrorJobDependency:
return true
default:
return false
}