thoth-station/mi

Entities not recognized

xtuchyna opened this issue · 3 comments

Describe the bug
When trying to run srcopsmetrics in external project, following error happened.

To Reproduce
Steps to reproduce the behavior:

  1. Use v2.10.0 of mi

LOGS

INFO:srcopsmetrics.github_knowledge:Overall repositories found: 1
INFO:srcopsmetrics.bot_knowledge:######################## Analysing thoth-station/mi-scheduler ########################

INFO:srcopsmetrics.bot_knowledge:########################
INFO:srcopsmetrics.bot_knowledge:Detected entities:

INFO:srcopsmetrics.bot_knowledge:########################
Traceback (most recent call last):
  File "/usr/lib64/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/xtuchyna/.local/share/virtualenvs/generative-patches-uqvRJSfQ/lib/python3.8/site-packages/srcopsmetrics/cli.py", line 215, in <module>
    cli(auto_envvar_prefix="MI")
  File "/home/xtuchyna/.local/share/virtualenvs/generative-patches-uqvRJSfQ/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/xtuchyna/.local/share/virtualenvs/generative-patches-uqvRJSfQ/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/xtuchyna/.local/share/virtualenvs/generative-patches-uqvRJSfQ/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/xtuchyna/.local/share/virtualenvs/generative-patches-uqvRJSfQ/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/xtuchyna/.local/share/virtualenvs/generative-patches-uqvRJSfQ/lib/python3.8/site-packages/srcopsmetrics/cli.py", line 178, in cli
    analyse_projects(repositories=repos, is_local=is_local, entities=entities_args)
  File "/home/xtuchyna/.local/share/virtualenvs/generative-patches-uqvRJSfQ/lib/python3.8/site-packages/srcopsmetrics/bot_knowledge.py", line 83, in analyse_projects
    raise NotKnownEntitiesError(
srcopsmetrics.exceptions.NotKnownEntitiesError: ('Invalid specified entities: %s', ['Issue'])\

/kind bug

Tried to update latest mi tag to not contain kebechet prefix here #508

UPDATE:
I think this has something to do with the PATH setting and its inspection during runtime.
Seems like there is no problem when the repo is cloned, but there is a problem when the mi is launched as a module

Fixed in #517