Skip to content

Commit a5a96e1

Browse files
committed
cleanup
1 parent 8e10363 commit a5a96e1

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

scheduler/reconciler/reconcile_node.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,6 @@ func (nr *NodeReconciler) computeForNode(
395395
// check if perhaps there's nothing else to do for this TG
396396
if existingDeployment ||
397397
tg.Update.IsEmpty() ||
398-
(dstate.DesiredTotal == 0 && dstate.DesiredCanaries == 0) ||
399398
!deploymentPlaceReady {
400399
continue
401400
}

scheduler/reconciler/reconcile_node_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func TestDiffSystemAllocsForNode_Sysbatch_terminal(t *testing.T) {
7373
}
7474

7575
nr := NewNodeReconciler(nil)
76-
diff, _ := nr.computeForNode(job, "node1", eligible, nil, tainted, required, live, terminal, true)
76+
diff := nr.computeForNode(job, "node1", eligible, nil, tainted, required, live, terminal, true)
7777

7878
assertDiffCount(t, diffResultCount{ignore: 1, place: 1}, diff)
7979
if len(diff.Ignore) > 0 {
@@ -96,7 +96,7 @@ func TestDiffSystemAllocsForNode_Sysbatch_terminal(t *testing.T) {
9696
}
9797

9898
nr := NewNodeReconciler(nil)
99-
diff, _ := nr.computeForNode(job, "node1", eligible, nil, tainted, required, live, terminal, true)
99+
diff := nr.computeForNode(job, "node1", eligible, nil, tainted, required, live, terminal, true)
100100
assertDiffCount(t, diffResultCount{update: 1, place: 1}, diff)
101101
})
102102

@@ -158,7 +158,7 @@ func TestDiffSystemAllocsForNode_Placements(t *testing.T) {
158158
for _, tc := range testCases {
159159
t.Run(tc.name, func(t *testing.T) {
160160
nr := NewNodeReconciler(nil)
161-
diff, _ := nr.computeForNode(
161+
diff := nr.computeForNode(
162162
job, tc.nodeID, eligible, nil,
163163
tainted, required, allocsForNode, terminal, true)
164164

@@ -217,7 +217,7 @@ func TestDiffSystemAllocsForNode_Stops(t *testing.T) {
217217
terminal := structs.TerminalByNodeByName{}
218218

219219
nr := NewNodeReconciler(nil)
220-
diff, _ := nr.computeForNode(
220+
diff := nr.computeForNode(
221221
job, node.ID, eligible, nil, tainted, required, allocs, terminal, true)
222222

223223
assertDiffCount(t, diffResultCount{ignore: 1, stop: 1, update: 1}, diff)
@@ -287,7 +287,7 @@ func TestDiffSystemAllocsForNode_IneligibleNode(t *testing.T) {
287287
}
288288

289289
nr := NewNodeReconciler(nil)
290-
diff, _ := nr.computeForNode(
290+
diff := nr.computeForNode(
291291
job, tc.nodeID, eligible, ineligible, tainted,
292292
required, []*structs.Allocation{alloc}, terminal, true,
293293
)
@@ -344,7 +344,7 @@ func TestDiffSystemAllocsForNode_DrainingNode(t *testing.T) {
344344
}
345345

346346
nr := NewNodeReconciler(nil)
347-
diff, _ := nr.computeForNode(
347+
diff := nr.computeForNode(
348348
job, drainNode.ID, map[string]*structs.Node{}, nil,
349349
tainted, required, allocs, terminal, true)
350350

@@ -396,7 +396,7 @@ func TestDiffSystemAllocsForNode_LostNode(t *testing.T) {
396396
}
397397

398398
nr := NewNodeReconciler(nil)
399-
diff, _ := nr.computeForNode(
399+
diff := nr.computeForNode(
400400
job, deadNode.ID, map[string]*structs.Node{}, nil,
401401
tainted, required, allocs, terminal, true)
402402

@@ -522,7 +522,7 @@ func TestDiffSystemAllocsForNode_DisconnectedNode(t *testing.T) {
522522
}
523523

524524
nr := NewNodeReconciler(nil)
525-
got, _ := nr.computeForNode(
525+
got := nr.computeForNode(
526526
job, tc.node.ID, eligibleNodes, nil, taintedNodes,
527527
required, []*structs.Allocation{alloc}, terminal, true,
528528
)

0 commit comments

Comments
 (0)