Snactor: add command to show dependencies between actors by MichalHe · Pull Request #897 · oamg/leapp · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergeable.
If you want to request a review or rebuild a package in copr, you can use following commands as a comment:
review please @oamg/developers to notify leapp developers of the review request
/packit copr-build to submit a public copr build using packit
To launch regression testing public members of oamg organization can leave the following comment:
/rerun to schedule basic regression tests using this pr build and leapp-repository*main* as artifacts
/rerun 42 to schedule basic regression tests using this pr build and leapp-repository*PR42* as artifacts
/rerun-sst to schedule sst tests using this pr build and leapp-repository*main* as artifacts
/rerun-sst 42 to schedule sst tests using this pr build and leapp-repository*PR42* as artifacts
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.
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.
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'
@MichalHe thinking about the current implementation, it seems to me that it would fit more as sub-command for the workflow command, like:
$ snactor workflow show-dependencies
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:
snactor show-dependencies # nothing else - print dependencies for all actors discovered in the leapp repository
snactor show-dependencies --all # cover also actors in referenced repositories
snactor show-dependencies --workflow <WORKFLOW> # like --all but filter everything based on the specified workflow
@pirat89 You are right with having a subcommand of workflow would be better. I will move the code into the workflow command.
What I also wish to do is to collect actors from multiple repositories, not just the repository defined at ., because this feature is a bit useless if the actor I am developing lives in el8to9, but all of its dependencies are in common. Perhaps, is there a part of snactor's codebase that I could use as an example?
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: