Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Add ability to visualize DAG at CLI #62

Closed
alexanderdean opened this issue Aug 26, 2016 · 10 comments
Closed

Add ability to visualize DAG at CLI #62

alexanderdean opened this issue Aug 26, 2016 · 10 comments
Assignees
Milestone

Comments

@alexanderdean
Copy link
Contributor

alexanderdean commented Aug 26, 2016

We should be able to:

  • Visualize a DAG at the CLI when editing a DAG
  • The failure output should visualize the DAG
  • The success output should be able to optionally visualize the DAG, maybe with a --verbose setting
@alexanderdean alexanderdean added this to the Version 0.3.0 milestone Aug 26, 2016
@alexanderdean alexanderdean changed the title Add ASCII art visualization for DAG, use this in failure reporting and success reporting with --verbose Add ASCII art visualization for DAG, use this in failure reportingm and success reporting with --verbose Aug 26, 2016
@alexanderdean alexanderdean changed the title Add ASCII art visualization for DAG, use this in failure reportingm and success reporting with --verbose Add ASCII art visualization for DAG, use this in failure reporting, and success reporting with --verbose Aug 26, 2016
@alexanderdean
Copy link
Contributor Author

Super important for @ihortom

@ninjabear
Copy link
Contributor

ninjabear commented Sep 16, 2016

It's the ASCII art part that's hard here (using backslashes or pipes for edges etc). This is mainly because of complications such as font width etc (th is shorter than W etc).

Printing a topologically sorted version of the file like:

                                      A
                                B          C
                                D          E

would probably complete the use-case, and be a bit less complicated to implement?

@alexanderdean alexanderdean changed the title Add ASCII art visualization for DAG, use this in failure reporting, and success reporting with --verbose Add ability to visualize DAG at CLI Sep 16, 2016
@alexanderdean
Copy link
Contributor Author

I think here, let's not get stuck on the ASCII Art aspect. If we have to pipe the output from Factotum into another tool like dot2png, so be it.

@ninjabear
Copy link
Contributor

This could also be like:

A -> B
C -> D

The important thing here is to see which tasks have dependencies set up - so you can catch it if one is missed.

@ninjabear
Copy link
Contributor

We could store these images with the Factfile - as we do with makefiles currently

ninjabear added a commit that referenced this issue Sep 29, 2016
Usage: factotum dot <factfile> --output=sample.dot
@ninjabear
Copy link
Contributor

This is completed in 2536f98 which introduces a new command factotum dot job.factfile to generate a graphviz dot file representation of the DAG (which can then be plugged into a standard toolchain)

@alexanderdean
Copy link
Contributor Author

Super cool!

@ihortom
Copy link

ihortom commented Sep 30, 2016

@ninjabear - below is the output I got when running one of the factiles:

    "check-lock"
    "emr-etl-runner"
    "storage-loader"
    "run-dedupe-sql"
    "check-lock" -> "emr-etl-runner"
    "emr-etl-runner" -> "storage-loader"
    "storage-loader" -> "run-dedupe-sql"

I thought the DOT syntax would be rather like

    1 [label="check-lock"]
    2 [label="emr-etl-runner"]
    3 [label="storage-loader"]
    4 [label="run-dedupe-sql"]
    1 -> 2
    2 -> 3
    3 -> 4

Otherwise, I see no point in the top section (extra noise)

    "check-lock"
    "emr-etl-runner"
    "storage-loader"
    "run-dedupe-sql"

Just the below will suffice

    "check-lock" -> "emr-etl-runner"
    "emr-etl-runner" -> "storage-loader"
    "storage-loader" -> "run-dedupe-sql"

@ninjabear
Copy link
Contributor

Hey @ihortom, are you using a tool to read these? Check out http://www.webgraphviz.com/ for an example, there's also a command line utility called dot which can generate images of the DAGs.

@ihortom
Copy link

ihortom commented Oct 4, 2016

@ninjabear - ah, great! Thanks for that.

@ninjabear ninjabear assigned ninjabear and unassigned ninjabear Oct 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants