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

Action config is fetched even if it is not used #870

Open
YevheniiSemendiak opened this issue Jun 28, 2022 · 0 comments
Open

Action config is fetched even if it is not used #870

YevheniiSemendiak opened this issue Jun 28, 2022 · 0 comments
Labels
feature request New feature or request invalid This doesn't seem right

Comments

@YevheniiSemendiak
Copy link
Collaborator

Example live.yaml config with action pointing to non-existing repository:

kind: live

jobs:
  ubuntu:
    image: ubuntu

  test:
    action: gh:nothing/nothing@master

If one fires neuro-flow run ubuntu, he gets an error:
ERROR: Cannot fetch action: either repository 'nothing/nothing' or tag 'master' does not exist
Which is misleading, why should neuro-flow fetch this repo if this job is not triggered?

Traceback
nf run ubuntu
ERROR: Cannot fetch action: either repository 'nothing/nothing' or tag 'master' does not exist
Traceback (most recent call last):
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/neuro_flow/cli/main.py", line 210, in main
    cli.main(args=args, standalone_mode=False)
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/click/decorators.py", line 38, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/neuro_flow/cli/utils.py", line 40, in wrapper
    return runner.run(callback(*args, **kwargs))
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/neuro_cli/asyncio_utils.py", line 53, in run
    return self._loop.run_until_complete(main_task)
  File "/Users/ysem/miniconda3/envs/neuro/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/neuro_flow/cli/live.py", line 77, in run
    await runner.run(
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/neuro_flow/live_runner.py", line 457, in run
    job_meta = await self.flow.get_meta(job_id)
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/neuro_flow/context.py", line 1393, in get_meta
    action_ast = await self._get_action_ast(job_ast)
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/neuro_flow/context.py", line 1380, in _get_action_ast
    action_ast = await self._cl.fetch_action(action_name)
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/neuro_flow/config_loader.py", line 129, in fetch_action
    self.__action_cache[action_name] = await self._fetch_action(action_name)
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/neuro_flow/config_loader.py", line 124, in _fetch_action
    async with self.action_stream(action_name) as stream:
  File "/Users/ysem/miniconda3/envs/neuro/lib/python3.9/contextlib.py", line 175, in __aenter__
    return await self.gen.__anext__()
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/neuro_flow/config_loader.py", line 258, in action_stream
    async with self._tarball_from_github(repo, version) as tarball:
  File "/Users/ysem/miniconda3/envs/neuro/lib/python3.9/contextlib.py", line 175, in __aenter__
    return await self.gen.__anext__()
  File "/Users/ysem/.local/pipx/venvs/neuro-all/lib/python3.9/site-packages/neuro_flow/config_loader.py", line 292, in _tarball_from_github
    raise ValueError(
ValueError: Cannot fetch action: either repository 'nothing/nothing' or tag 'master' does not exist

This issue originated from the NM feedback session - sometimes folks are getting Bad Gateway error errors in NF when it tries to fetch action config.
Maybe, we could also improve this behavior by performing retries while fetching the config from GH?

@YevheniiSemendiak YevheniiSemendiak added feature request New feature or request invalid This doesn't seem right labels Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant