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

Add tool to visualize Jobs in graphviz dot format #19626

Merged
merged 1 commit into from
Dec 11, 2019

Conversation

Fryguy
Copy link
Member

@Fryguy Fryguy commented Dec 10, 2019

@agrare @chessbyte Please review.

This uses the transitions hash to visualize the Job. Here is an example using the VmScan class:

vm_scan

Note that by default I don't render the "*" transitions, otherwise the graph is a total mess. If that ever gets cleaned up, I could see changing the default. FWIW, here's what it looks like with that enabled:

Mozilla Firefox 2019-12-10 17-36-41

There is also a tool to do this from the command line. Hopefully this can help with things like #19607 .

@Fryguy Fryguy added the tools label Dec 10, 2019
@Fryguy Fryguy force-pushed the visualize_state_machines branch 2 times, most recently from 55af53a to 379576e Compare December 10, 2019 22:34
@Fryguy Fryguy force-pushed the visualize_state_machines branch from 379576e to b112771 Compare December 10, 2019 22:34
@miq-bot
Copy link
Member

miq-bot commented Dec 10, 2019

Checked commit Fryguy@b112771 with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 2 offenses detected

tools/job_to_svg.rb

@Fryguy
Copy link
Member Author

Fryguy commented Dec 10, 2019

I don't know why the bot is saying it doesn't have execute perms because it does.

$ ls -l tools/job_to_svg.rb
-rwxr-xr-x 1 jfrey staff 551 Dec 10 17:35 tools/job_to_svg.rb

@chessbyte
Copy link
Member

@agrare LGTM. Merge if you agree.

@agrare
Copy link
Member

agrare commented Dec 11, 2019

I don't know why the bot is saying it doesn't have execute perms because it does.

Yeah that's a known bug, ManageIQ/miq_bot#445

Copy link
Member

@agrare agrare left a comment

Choose a reason for hiding this comment

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

This is awesome

@agrare agrare merged commit aebb31b into ManageIQ:master Dec 11, 2019
@agrare agrare added this to the Sprint 127 Ending Jan 6, 2020 milestone Dec 11, 2019
@Fryguy Fryguy deleted the visualize_state_machines branch December 11, 2019 19:35
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.

4 participants