Skip to content

Commit 6480259

Browse files
authored
fix(api): fail job if worker model is disabled (#6552)
1 parent 4e9bc2f commit 6480259

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

engine/api/workflow/process_requirements.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ func processNodeJobRunRequirements(ctx context.Context, store cache.Store, db go
115115
sdk.AddRequirement(&requirements, v.ID, name, v.Type, value)
116116
}
117117
if wm != nil {
118+
if wm.Disabled {
119+
errm.Append(sdk.NewErrorFrom(sdk.ErrInvalidData, "worker model %s is disabled. Please update your requirement", wm.Name))
120+
}
118121
modelType = wm.Type
119122

120123
// Check that the worker model has the binaries capabilitites

0 commit comments

Comments
 (0)