From 79f87ea34753dbaab1093f2f5d2f2b5481ef00f2 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sun, 8 Nov 2020 22:10:25 +0000 Subject: [PATCH] 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. --- internal/worker/server.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/worker/server.go b/internal/worker/server.go index 9b91a7cab..64465fb0a 100644 --- a/internal/worker/server.go +++ b/internal/worker/server.go @@ -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