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

Support rendering recursive static DAGs #845

Merged
merged 5 commits into from
Feb 26, 2019

Conversation

rileyjbauer
Copy link
Contributor

@rileyjbauer rileyjbauer commented Feb 21, 2019

With this change, StaticGraphParser no longer breaks when trying to lay out recursive pipelines.

This PR also adds a new mock template: mock-recursive-template.yaml which includes multiple instances of recursion.


This change is Reviewable

}
// Parent here will be the task that pointed to this DAG template.
// We do not set an edge if the task has dependencies because in that case it makes sense
// for incoming edges to only be drawn from its dependencies, not the DAG node itself
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you clarify this comment a little? Why does having or not having dependencies affect having an edge to its parent node?

Copy link
Contributor Author

@rileyjbauer rileyjbauer Feb 25, 2019

Choose a reason for hiding this comment

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

This might be a bit wordy, see if you think it makes sense:

// Parent here will be the task that pointed to this DAG template.
// Within a DAG template, tasks can have dependencies on one another, and long chains of
// dependencies can be present within a single DAG. In these cases, we choose not to draw an
// edge from the DAG node itself to these tasks with dependencies because such an edge would
// not be meaningful to the user. For example, consider a DAG A with two tasks, B and C, where
// task C depends on the output of task B. C is a task of A, but it's semantically much more important that
// C depends on B, so to avoid cluttering the graph, we simply omit the edge between A and C:
//      A                  A   
//    /   \    becomes    /  
//   B <-- C             B 
//                      /
//                     C

Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure we won't ever be removing useful information from the graph by doing so?
Separately, the comment is much more clear now, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know for certain, but I haven't been able to think of a case where it'd be preferable to see those extra edges, and removing them makes the execution flow of the pipeline a lot clearer (IMO)

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM then, thanks.
/lgtm

frontend/src/lib/StaticGraphParser.ts Outdated Show resolved Hide resolved
@rileyjbauer
Copy link
Contributor Author

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rileyjbauer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rileyjbauer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 85de728 into kubeflow:master Feb 26, 2019
cheyang pushed a commit to alibaba/pipelines that referenced this pull request Mar 28, 2019
* Adds support for rendering recursive pipelines to the StaticGraphParser

* Adds a recursive pipeline to the list of mocks

* Fixes recursive graph rendering under new styling

* Adds additional comments and surfaces pipeline yaml error to users

* Remove unnecessary comment
@rileyjbauer rileyjbauer deleted the support-recursive-dags branch May 6, 2019 22:14
Linchin pushed a commit to Linchin/pipelines that referenced this pull request Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants