worker/RequestJob: treat 'osbuild-koji' jobs like 'osbuild' ones

We must special-case the treatment of architecture, to select the
correct remote worker for any job that requires a specific
architecture. For now this means any jobs that run osbuild.
This commit is contained in:
Tom Gundersen 2020-11-08 22:10:25 +00:00 committed by Lars Karlitski
parent 0e382e9cf4
commit 79f87ea347

View file

@ -176,8 +176,8 @@ func (s *Server) RequestJob(ctx context.Context, arch string, jobTypes []string)
// restriction: arch for osbuild jobs.
jts := []string{}
for _, t := range jobTypes {
if t == "osbuild" {
t = "osbuild:" + arch
if t == "osbuild" || t == "osbuild-koji" {
t = t + ":" + arch
}
jts = append(jts, t)
}
@ -206,6 +206,8 @@ func (s *Server) RequestJob(ctx context.Context, arch string, jobTypes []string)
if jobType == "osbuild:"+arch {
jobType = "osbuild"
} else if jobType == "osbuild-koji:"+arch {
jobType = "osbuild-koji"
}
return token, jobId, jobType, args, dynamicArgs, nil