From b75cf30a05adbe2d4777546734a67dcbbbad3fad Mon Sep 17 00:00:00 2001 From: Gianluca Zuccarelli Date: Wed, 6 Apr 2022 17:23:59 +0100 Subject: [PATCH] worker/server: remove duplicate function The `ManifestJobStatus` and `ManifestByIdJobStatus` both had identical functionality. The `ManifestByIdJobStatus` is not being referenced anywhere in the codebase and so this function has been removed. --- internal/worker/server.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/internal/worker/server.go b/internal/worker/server.go index a85723264..b0be0f2df 100644 --- a/internal/worker/server.go +++ b/internal/worker/server.go @@ -243,23 +243,6 @@ func (s *Server) DepsolveJobStatus(id uuid.UUID, result *DepsolveJobResult) (*Jo return status, deps, nil } -func (s *Server) ManifestByIdJobStatus(id uuid.UUID, result *ManifestJobByIDResult) (*JobStatus, []uuid.UUID, error) { - jobType, status, deps, err := s.jobStatus(id, result) - if err != nil { - return nil, nil, err - } - - if jobType != "manifest-by-id" { - return nil, nil, fmt.Errorf("expected \"koji-init\", found %q job instead", jobType) - } - - if result.JobError == nil && result.Error != "" { - result.JobError = clienterrors.WorkerClientError(clienterrors.ErrorOldResultCompatible, result.Error) - } - - return status, deps, nil -} - func (s *Server) ManifestJobStatus(id uuid.UUID, result *ManifestJobByIDResult) (*JobStatus, []uuid.UUID, error) { jobType, status, deps, err := s.jobStatus(id, result) if err != nil {