Skip to content

Commit

Permalink
fix(api): fail job if worker model is disabled (#6552)
Browse files Browse the repository at this point in the history
  • Loading branch information
sguiheux committed May 15, 2023
1 parent 4e9bc2f commit 6480259
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions engine/api/workflow/process_requirements.go
Expand Up @@ -115,6 +115,9 @@ func processNodeJobRunRequirements(ctx context.Context, store cache.Store, db go
sdk.AddRequirement(&requirements, v.ID, name, v.Type, value)
}
if wm != nil {
if wm.Disabled {
errm.Append(sdk.NewErrorFrom(sdk.ErrInvalidData, "worker model %s is disabled. Please update your requirement", wm.Name))
}
modelType = wm.Type

// Check that the worker model has the binaries capabilitites
Expand Down

0 comments on commit 6480259

Please sign in to comment.