Skip to content

Commit

Permalink
Cleanup (#3118)
Browse files Browse the repository at this point in the history
  • Loading branch information
severinson authored Nov 21, 2023
1 parent b4b36de commit 64b6dfe
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
5 changes: 1 addition & 4 deletions internal/scheduler/gang_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,7 @@ func (sch *GangScheduler) tryScheduleGangWithTxn(_ *armadacontext.Context, txn *

func addNodeSelectorToGctx(gctx *schedulercontext.GangSchedulingContext, nodeSelectorKey, nodeSelectorValue string) {
for _, jctx := range gctx.JobSchedulingContexts {
if jctx.PodRequirements.NodeSelector == nil {
jctx.PodRequirements.NodeSelector = make(map[string]string)
}
jctx.PodRequirements.NodeSelector[nodeSelectorKey] = nodeSelectorValue
jctx.AddNodeSelector(nodeSelectorKey, nodeSelectorValue)
}
}

Expand Down
2 changes: 0 additions & 2 deletions internal/scheduler/preempting_queue_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -862,8 +862,6 @@ func (evi *Evictor) Evict(ctx *armadacontext.Context, it nodedb.NodeIterator) (*
// Create a scheduling context for when re-scheduling this job.
// Mark as evicted and add a node selector to ensure the job is re-scheduled onto the node it was evicted from.
jctx := schedulercontext.JobSchedulingContextFromJob(evi.priorityClasses, job, GangIdAndCardinalityFromAnnotations)

// TODO: This is only necessary for jobs not scheduled in this cycle.
jctx.IsEvicted = true
jctx.AddNodeSelector(schedulerconfig.NodeIdLabel, node.Id)
evictedJctxsByJobId[job.GetId()] = jctx
Expand Down
1 change: 0 additions & 1 deletion internal/scheduler/testfixtures/testfixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ func TestSchedulingConfig() configuration.SchedulingConfig {
ExecutorTimeout: 15 * time.Minute,
MaxUnacknowledgedJobsPerExecutor: math.MaxInt,
EnableNewPreemptionStrategy: true,
// AlwaysAttemptScheduling: true,
}
}

Expand Down

0 comments on commit 64b6dfe

Please sign in to comment.