worker: delete TargetErrors from OSBuildJobResult
The `TargetErrors` is not used any more since PR#2192 [1] and there is no need to keep the backward compatibility any more, because there are no composer / worker instances in production, which are not running the modified code. In addition, delete unit tests covering this legacy error handling. [1] https://github.com/osbuild/osbuild-composer/pull/2192
This commit is contained in:
parent
c63bfe6d83
commit
59ded68457
5 changed files with 8 additions and 167 deletions
|
|
@ -258,8 +258,6 @@ func (s *Server) OSBuildJobStatus(id uuid.UUID, result *OSBuildJobResult) (*JobS
|
|||
result.JobError = clienterrors.WorkerClientError(clienterrors.ErrorBuildJob, "osbuild build failed")
|
||||
} else if len(result.OSBuildOutput.Error) > 0 {
|
||||
result.JobError = clienterrors.WorkerClientError(clienterrors.ErrorOldResultCompatible, string(result.OSBuildOutput.Error))
|
||||
} else if len(result.TargetErrors) > 0 {
|
||||
result.JobError = clienterrors.WorkerClientError(clienterrors.ErrorOldResultCompatible, result.TargetErrors[0])
|
||||
}
|
||||
}
|
||||
// For backwards compatibility: OSBuildJobResult didn't use to have a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue