Commit b58a22c2 authored by Michael Schurter's avatar Michael Schurter
Browse files

remove spurious TODOs and FIXMEs

parent ec09ea61
Showing with 5 additions and 12 deletions
+5 -12
...@@ -196,12 +196,11 @@ func newAllocHealthTracker(parentCtx context.Context, logger *log.Logger, alloc ...@@ -196,12 +196,11 @@ func newAllocHealthTracker(parentCtx context.Context, logger *log.Logger, alloc
minHealthyTime time.Duration, useChecks bool) *allocHealthTracker { minHealthyTime time.Duration, useChecks bool) *allocHealthTracker {
a := &allocHealthTracker{ a := &allocHealthTracker{
logger: logger, logger: logger,
healthy: make(chan bool, 1), healthy: make(chan bool, 1),
allocStopped: make(chan struct{}), allocStopped: make(chan struct{}),
alloc: alloc, alloc: alloc,
tg: alloc.Job.LookupTaskGroup(alloc.TaskGroup), tg: alloc.Job.LookupTaskGroup(alloc.TaskGroup),
//FIXME should i wrap all these parameters up in a struct?
minHealthyTime: minHealthyTime, minHealthyTime: minHealthyTime,
useChecks: useChecks, useChecks: useChecks,
allocUpdates: allocUpdates, allocUpdates: allocUpdates,
...@@ -260,7 +259,6 @@ func (a *allocHealthTracker) TaskEvents() map[string]string { ...@@ -260,7 +259,6 @@ func (a *allocHealthTracker) TaskEvents() map[string]string {
// Go through are task information and build the event map // Go through are task information and build the event map
for task, state := range a.taskHealth { for task, state := range a.taskHealth {
//FIXME skip this for migrations?
useChecks := a.tg.Update.HealthCheck == structs.UpdateStrategyHealthCheck_Checks useChecks := a.tg.Update.HealthCheck == structs.UpdateStrategyHealthCheck_Checks
if e, ok := state.event(deadline, a.tg.Update.MinHealthyTime, useChecks); ok { if e, ok := state.event(deadline, a.tg.Update.MinHealthyTime, useChecks); ok {
events[task] = e events[task] = e
...@@ -542,7 +540,6 @@ func (t *taskHealthState) event(deadline time.Time, minHealthyTime time.Duration ...@@ -542,7 +540,6 @@ func (t *taskHealthState) event(deadline time.Time, minHealthyTime time.Duration
} }
// We are running so check if we have been running long enough // We are running so check if we have been running long enough
//FIXME need minHealthyTime here
if t.state.StartedAt.Add(minHealthyTime).After(deadline) { if t.state.StartedAt.Add(minHealthyTime).After(deadline) {
return fmt.Sprintf("Task not running for min_healthy_time of %v by deadline", minHealthyTime), true return fmt.Sprintf("Task not running for min_healthy_time of %v by deadline", minHealthyTime), true
} }
......
...@@ -20,9 +20,6 @@ type DrainDeadlineNotifier interface { ...@@ -20,9 +20,6 @@ type DrainDeadlineNotifier interface {
Watch(nodeID string, deadline time.Time) Watch(nodeID string, deadline time.Time)
} }
// TODO Make any of what I just wrote true :) Initially it is just a simple
// implementation.
// deadlineHeap implements the DrainDeadlineNotifier and is backed by a min-heap // deadlineHeap implements the DrainDeadlineNotifier and is backed by a min-heap
// to efficiently determine the next deadlining node. It also supports // to efficiently determine the next deadlining node. It also supports
// coalescing several deadlines into a single emission. // coalescing several deadlines into a single emission.
......
...@@ -1193,7 +1193,6 @@ const ( ...@@ -1193,7 +1193,6 @@ const (
// ShouldDrainNode checks if a given node status should trigger an // ShouldDrainNode checks if a given node status should trigger an
// evaluation. Some states don't require any further action. // evaluation. Some states don't require any further action.
//TODO(schmichael) Update for drainv2?!
func ShouldDrainNode(status string) bool { func ShouldDrainNode(status string) bool {
switch status { switch status {
case NodeStatusInit, NodeStatusReady: case NodeStatusInit, NodeStatusReady:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment