Skip to content

Commit

Permalink
fix: temporary fix for double cyclic (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
deryrahman authored Jan 18, 2023
1 parent 5f2c317 commit 396493b
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions core/job/service/job_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,15 +357,10 @@ func (j JobService) Validate(ctx context.Context, jobTenant tenant.Tenant, jobSp
}

// check cyclic deps for every job
isAlreadyCyclic := map[string]bool{}
for _, jobEntity := range jobsWithUnresolvedUpstreams {
if jobNamesWithCyclic, err := j.validateCyclic(jobEntity.Job().Spec().Name(), jobMap, identifierToJobsMap); err != nil {
if _, ok := isAlreadyCyclic[jobEntity.Job().Spec().Name().String()]; !ok {
me.Append(err)
}
for _, jobName := range jobNamesWithCyclic {
isAlreadyCyclic[jobName] = true
}
if _, err := j.validateCyclic(jobEntity.Job().Spec().Name(), jobMap, identifierToJobsMap); err != nil {
me.Append(err)
break
}
}

Expand Down

0 comments on commit 396493b

Please sign in to comment.