Skip to content

Commit

Permalink
fix: not remove podgroup uid will cause topology annotation to be use…
Browse files Browse the repository at this point in the history
…less

Signed-off-by: jessestutler <[email protected]>
  • Loading branch information
JesseStutler committed Sep 9, 2024
1 parent c8eb453 commit 5573260
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/scheduler/plugins/task-topology/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ import (
"volcano.sh/volcano/pkg/scheduler/framework"
)

const (
// uidLength is the length of uid
uidLength = 36
)

type taskTopologyPlugin struct {
arguments framework.Arguments

Expand Down Expand Up @@ -247,7 +252,7 @@ func affinityCheck(job *api.JobInfo, affinity [][]string) error {

var taskNumber = len(job.Tasks)
var taskRef = make(map[string]bool, taskNumber)
var jobNamePrefix = job.Name + "-"
var jobNamePrefix = job.Name[:len(job.Name)-uidLength]
for _, task := range job.Tasks {
// the full task name looks like "${job name}-${task name}-${index}",
// so we can trim the jobNamePrefix and the indexSuffix to get the short task name.
Expand Down

0 comments on commit 5573260

Please sign in to comment.