-
Notifications
You must be signed in to change notification settings - Fork 71
Snactor: add command to show dependencies between actors #897
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergeable.
To launch regression testing public members of oamg organization can leave the following comment:
Please open ticket in case you experience technical problem with the CI. (RH internal only) Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra. |
3b648e8
to
ebd5656
Compare
Introduce a new command 'show-dependencies' that prints producent/ consumer dependencies between all actors in a given workflow in the DOT format that allows easy visualization.
ebd5656
to
f7e5e24
Compare
|
||
workflow = repository.lookup_workflow(params.workflow_name) | ||
if not workflow: | ||
raise CommandError('Could not find any workflow named "{}"'.format(params.name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# snactor show-dependencies IPUConfig
Traceback (most recent call last):
File "/usr/bin/snactor", line 11, in <module>
load_entry_point('leapp==0.18.0', 'console_scripts', 'snactor')()
File "/usr/lib/python3.6/site-packages/leapp/snactor/__init__.py", line 79, in main
cli.command.execute(version=_('snactor version {}').format(VERSION))
File "/usr/lib/python3.6/site-packages/leapp/utils/clicmd.py", line 111, in execute
args.func(args)
File "/usr/lib/python3.6/site-packages/leapp/utils/clicmd.py", line 133, in called
self.target(args)
File "/usr/lib/python3.6/site-packages/leapp/utils/repository.py", line 20, in checker
return f(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/leapp/snactor/context.py", line 34, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/leapp/snactor/commands/show_dependencies.py", line 36, in cli
raise CommandError('Could not find any workflow named "{}"'.format(params.name))
AttributeError: 'Namespace' object has no attribute 'name'
Possibly workflow_name
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, should be fixed (untested, will test in a moment).
694dca1
to
f9680cc
Compare
@MichalHe thinking about the current implementation, it seems to me that it would fit more as sub-command for the
as snactor (and leapp) can works also without workflows at all, but currently it's connected strictly to workflow. If we want to have it as the main command, I would expect maybe something like this:
wdyt? |
@pirat89 You are right with having a subcommand of What I also wish to do is to collect actors from multiple repositories, not just the repository defined at |
Adds a new command
show-dependencies <workflow>
that displays all producer/consumer dependencies in the workflow. The output of the command is in the DOT language that allows easy visualization of graphs.Example use: