Skip to content

Commit

Permalink
fix: check outputAsset array length before deactivating them
Browse files Browse the repository at this point in the history
Signed-off-by: Guilhem Barthés <[email protected]>
  • Loading branch information
guilhem-barthes committed Jul 17, 2024
1 parent e6b1bdd commit 00a8ca0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/service/computetask.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ func (s *ComputeTaskService) DisableOutput(taskKey string, identifier string, re
return err
}

// If the task is failing because of the linked function failing, we may need
if len(outputAssets) == 0 {
return orcerrors.NewCannotDisableAsset(fmt.Sprintf("there is no output asset with identifier %s for task %s", identifier, taskKey))
}

var service disabler

// All outputs under the same identifier have the same kind so we use only the first one
Expand Down

0 comments on commit 00a8ca0

Please sign in to comment.