From b9991a3f2b4803da6c95a01f631a6184698e672e Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Mon, 9 Nov 2020 13:02:05 -0500 Subject: [PATCH] remove Namespace field from JobScaleRequest --- command/agent/job_endpoint.go | 2 -- nomad/structs/structs.go | 13 ++++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/command/agent/job_endpoint.go b/command/agent/job_endpoint.go index c4e6d01fda7..f1864b2e20a 100644 --- a/command/agent/job_endpoint.go +++ b/command/agent/job_endpoint.go @@ -495,7 +495,6 @@ func (s *HTTPServer) jobScaleAction(resp http.ResponseWriter, req *http.Request, return nil, CodedError(400, err.Error()) } - namespace := args.Target[structs.ScalingTargetNamespace] targetJob := args.Target[structs.ScalingTargetJob] if targetJob != "" && targetJob != jobName { return nil, CodedError(400, "job ID in payload did not match URL") @@ -503,7 +502,6 @@ func (s *HTTPServer) jobScaleAction(resp http.ResponseWriter, req *http.Request, scaleReq := structs.JobScaleRequest{ JobID: jobName, - Namespace: namespace, Target: args.Target, Count: args.Count, PolicyOverride: args.PolicyOverride, diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 481b157ba03..58049ef70c1 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -693,13 +693,12 @@ type JobPlanRequest struct { // JobScaleRequest is used for the Job.Scale endpoint to scale one of the // scaling targets in a job type JobScaleRequest struct { - Namespace string - JobID string - Target map[string]string - Count *int64 - Message string - Error bool - Meta map[string]interface{} + JobID string + Target map[string]string + Count *int64 + Message string + Error bool + Meta map[string]interface{} // PolicyOverride is set when the user is attempting to override any policies PolicyOverride bool WriteRequest