From 93a65ef3c69f1bbe1122abdda983d533b27fbdb9 Mon Sep 17 00:00:00 2001 From: Drew Bailey Date: Tue, 12 Jan 2021 11:01:59 -0500 Subject: [PATCH] wip, fix failing tests, still update job summary if job status not changing --- nomad/state/state_store.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nomad/state/state_store.go b/nomad/state/state_store.go index ae1d5f5ee07..7fba12ac77c 100644 --- a/nomad/state/state_store.go +++ b/nomad/state/state_store.go @@ -8,7 +8,6 @@ import ( "strings" "time" - "github.com/davecgh/go-spew/spew" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" multierror "github.com/hashicorp/go-multierror" @@ -1489,7 +1488,6 @@ func (s *StateStore) upsertJobImpl(index uint64, job *structs.Job, keepVersion b // Setup the indexes correctly if existing != nil { - spew.Dump("EXISTING!") job.CreateIndex = existing.(*structs.Job).CreateIndex job.ModifyIndex = index @@ -3944,7 +3942,6 @@ func (s *StateStore) updateJobStabilityImpl(index uint64, namespace, jobID strin copy := job.Copy() copy.Stable = stable - spew.Dump("COPY STABLEEE", copy.Stable) return s.upsertJobImpl(index, copy, true, txn) } @@ -4447,7 +4444,6 @@ func (s *StateStore) setJobStatus(index uint64, txn *txn, // Fast-path if nothing has changed. if oldStatus == newStatus { - spew.Dump("DOING THIS THING") if err := s.setJobSummary(txn, job, index, oldStatus, newStatus, firstPass); err != nil { return err } @@ -4456,6 +4452,10 @@ func (s *StateStore) setJobStatus(index uint64, txn *txn, return nil } + // TODO (drew) + // not inserting the job again with modify index/status + // prevents job stability test pass + // Copy and update the existing job updated := job.Copy() updated.Status = newStatus