Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(backend): implement subdag output resolution #11196

Merged
merged 19 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/src/v2/cmd/driver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ func init() {
flag.Set("logtostderr", "true")
// Change the WARNING to INFO level for debugging.
flag.Set("stderrthreshold", "WARNING")
// Enable V(4) logging level for more verbose debugging.
// flag.Set("v", "4")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

}

func validate() error {
Expand Down
11 changes: 11 additions & 0 deletions backend/src/v2/component/launcher_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,17 @@ func (l *LauncherV2) Execute(ctx context.Context) (err error) {
}
}
glog.Infof("publish success.")
// At the end of the current task, we check the statuses of all tasks in the current DAG and update the DAG's status accordingly.
// TODO: If there's a pipeline whose only components are DAGs, this launcher logic will never run and as a result the dag status will never be updated. We need to implement a mechanism to handle this edge case.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's a pipeline whose only components are DAGs

I can't imagine a valid case for this. and I vaguely recall the compiler check that a pipeline must have concrete tasks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's the case then I'll reword it, as the screenshots of the oneof scenario above showcases that there are some instances of dags that seem to not be updated with this functionality. There probably is some logic that can be used to address those edge cases.

dag, err := l.metadataClient.GetDAG(ctx, execution.GetExecution().CustomProperties["parent_dag_id"].GetIntValue())
if err != nil {
glog.Errorf("DAG Status Update: failed to get DAG: %s", err.Error())
}
pipeline, _ := l.metadataClient.GetPipelineFromExecution(ctx, execution.GetID())
err = l.metadataClient.UpdateDAGExecutionsState(ctx, dag, pipeline)
if err != nil {
glog.Errorf("failed to update DAG state: %s", err.Error())
}
}()
executedStartedTime := time.Now().Unix()
execution, err = l.prePublish(ctx)
Expand Down
Loading
Loading