Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredoconnell committed Sep 19, 2024
1 parent 7995606 commit 2e11cb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions workflow/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1044,9 +1044,8 @@ func (e *executor) prepareOptionalExprDependencies(
dependencyType = dgraph.OptionalDependency
}

// The way that this will work is the current node will depend on the grouped
// node to isolate the optional dependencies. The current node will depend on it
// with either optional or completion dependencies
// Creates a new group node to isolate the optional dependencies.
// The current node will depend on the group node with the dependency type set in `dependencyType`.
optionalDagNode, err := e.createGroupNode(currentNode, pathInCurrentNode, dag, dependencyType)
if err != nil {
return err
Expand Down
3 changes: 2 additions & 1 deletion workflow/yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ func TestBuildWaitOptionalExpr_InvalidExpr(t *testing.T) {
}

func TestBuildWaitOptionalExpr_InvalidTag(t *testing.T) {
// It should never get there outside the unit test.
// This code tests an invalid tag used with buildOptionalExpressions that
// should not be possible in production code due to other checks.
yamlInput := []byte(`!invalid some_expr`)
input := assert.NoErrorR[yaml.Node](t)(yaml.New().Parse(yamlInput))
_, err := buildOptionalExpression(input, make([]string, 0))
Expand Down

0 comments on commit 2e11cb4

Please sign in to comment.