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
When an actor or a model contains a bug, snactor discover fails and no output is shown.
Reproducer:
Install leapp framework, create new repo and actor:
pip install git+https://github.com/leapp-to/leapp
snactor repo new discover-bug
cd discover-bug
snactor new-actor discover-bug
The actor is buggy, as it is missing a tag attribute.
Running snactor discover fails because of this:
$ snactor discover
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/leapp/repository/actor_definition.py", line 26, in inspect_actor
result = [get_actor_metadata(actor) for actor in get_actors()]
File "/usr/local/lib/python2.7/dist-packages/leapp/actors/__init__.py", line 276, in get_actors
get_actor_metadata(actor)
File "/usr/local/lib/python2.7/dist-packages/leapp/actors/__init__.py", line 261, in get_actor_metadata
_get_attribute(actor, 'tags', _is_tag_tuple, required=True),
File "/usr/local/lib/python2.7/dist-packages/leapp/actors/__init__.py", line 242, in _get_attribute
raise MissingActorAttributeError('Actor {} is missing attribute {}'.format(actor, name))
MissingActorAttributeError: Actor <class 'actor.DiscoverBug'> is missing attribute tags
No handlers could be found for logger "leapp.repository.discover-bug"
Inspection of actor in actors/bug failed
Similar thing happens when there is a bug in a model - create new model and don't fill in the topic:
snactor new-model buggy-model
The discover subcommand now does not output the traceback but still doesn't show the discovered objects.
$ snactor discover
Missing topic in Model BuggyModel
I expect the discover subcommand to deal with the buggy objects and show object where inspection was ok and possibly also the buggy ones, e.g.:
@vinzenz@vojtechsokol This is something that bites me almost every time, I think we should switch to using ast module for discover so that we can handle this use case in a more robust way.
I think this issue shouldn't be closed as the problem still persists. If I use the solution from #375, the traceback is gone which is nice, however I don't get any information if there is some failure.
When an actor or a model contains a bug,
snactor discover
fails and no output is shown.Reproducer:
Install leapp framework, create new repo and actor:
The actor is buggy, as it is missing a tag attribute.
Running
snactor discover
fails because of this:Similar thing happens when there is a bug in a model - create new model and don't fill in the topic:
The
discover
subcommand now does not output the traceback but still doesn't show the discovered objects.I expect the
discover
subcommand to deal with the buggy objects and show object where inspection was ok and possibly also the buggy ones, e.g.:The text was updated successfully, but these errors were encountered: