From 56e5494e48646c9d6ecbb1a43221087f638b3c66 Mon Sep 17 00:00:00 2001 From: Chris Baker <1675087+cgbaker@users.noreply.github.com> Date: Wed, 1 Apr 2020 11:55:55 -0500 Subject: [PATCH 1/3] Update nomad/job_endpoint.go Co-Authored-By: Drew Bailey <2614075+drewbailey@users.noreply.github.com> --- nomad/job_endpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomad/job_endpoint.go b/nomad/job_endpoint.go index 2761549f4..150b4e191 100644 --- a/nomad/job_endpoint.go +++ b/nomad/job_endpoint.go @@ -934,7 +934,7 @@ func (j *Job) Scale(args *structs.JobScaleRequest, reply *structs.JobRegisterRes reply.JobModifyIndex = job.ModifyIndex } - // only create an eval for non-dispatch jobs and if the count was provided + // Only create an eval for non-dispatch jobs and if the count was provided // for now, we'll do this even if count didn't change if !job.IsPeriodic() && !job.IsParameterized() && args.Count != nil { eval := &structs.Evaluation{ From 026245b185548c68ceb940137c960a198624399a Mon Sep 17 00:00:00 2001 From: Chris Baker <1675087+cgbaker@users.noreply.github.com> Date: Wed, 1 Apr 2020 11:56:01 -0500 Subject: [PATCH 2/3] Update nomad/state/state_store.go Co-Authored-By: Drew Bailey <2614075+drewbailey@users.noreply.github.com> --- nomad/state/state_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomad/state/state_store.go b/nomad/state/state_store.go index 6972c28c8..5d5c84ee1 100644 --- a/nomad/state/state_store.go +++ b/nomad/state/state_store.go @@ -651,7 +651,7 @@ func (s *StateStore) UpsertScalingEvent(index uint64, req *structs.ScalingEventR } events := jobEvents.ScalingEvents[req.TaskGroup] - // prepend this latest event + // Prepend this latest event events = append( []*structs.ScalingEvent{req.ScalingEvent}, events..., From 01f0656f95a1c4d646bb71d9d4a596a86c414846 Mon Sep 17 00:00:00 2001 From: Chris Baker <1675087+cgbaker@users.noreply.github.com> Date: Wed, 1 Apr 2020 11:56:12 -0500 Subject: [PATCH 3/3] Update nomad/state/state_store.go Co-Authored-By: Drew Bailey <2614075+drewbailey@users.noreply.github.com> --- nomad/state/state_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomad/state/state_store.go b/nomad/state/state_store.go index 5d5c84ee1..27208c40c 100644 --- a/nomad/state/state_store.go +++ b/nomad/state/state_store.go @@ -656,7 +656,7 @@ func (s *StateStore) UpsertScalingEvent(index uint64, req *structs.ScalingEventR []*structs.ScalingEvent{req.ScalingEvent}, events..., ) - // truncate older events + // Truncate older events if len(events) > structs.JobTrackedScalingEvents { events = events[0:structs.JobTrackedScalingEvents] }