PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
17.49k stars 1.64k forks source link

Allow showing NotReady tasks in flow run graph #10932

Open EmilRex opened 1 year ago

EmilRex commented 1 year ago

First check

Prefect Version

2.x

Describe the current behavior

Tasks that are created but not executed aren't shown on the flow run graph. This is probably expected behavior, however in some cases can be useful information. For example, suppose you construct a graph ahead of time by submitting all of your tasks. It can then be helpful to see your entire graph to judge when execution stopped.

Describe the proposed behavior

Allow users to toggle whether or not to show tasks that were not run yet (i.e. in the NotReady state)

Example Use

Example of creating a graph with NotReady tasks:

import time
from prefect import flow, task

@task
def dummy(crash=False):
    if crash:
        raise ValueError("This is a dummy error")
    time.sleep(1)

@flow
def main():
    a = dummy.submit()
    b = dummy.submit(wait_for=[a], crash=True)
    c = dummy.submit()
    d = dummy.submit(wait_for=[b, c])
    e = dummy.submit(wait_for=[d])

if __name__ == "__main__":
    main()

Additional context

No response

taylor-curran commented 1 year ago

+1 to this

pleek91 commented 7 months ago

I removed the UI tag from this because the UI will show them if the api returns them. The nodes are missing from the graph-v2 api response.