f0cal/saltbox

Removal of boxes installed with -e breaks all others

AndreyShprengel opened this issue · 0 comments

If a saltbox is installed with -e and the path is missing at runtime saltbox fails entirely. It should instead fail to "import" that particular box or formala and carry on otherwise; Sample traceback:

File "/home/andrey/dev/f0cal/project/_venv/bin/saltbox", line 11, in <module>
    load_entry_point('saltbox', 'console_scripts', 'saltbox')()
  File "/home/andrey/dev/f0cal/project/saltbox/src/saltbox/__main__.py", line 63, in main
    return plugnparse.scan_and_run("saltbox", base_parser=parser)
  File "/home/andrey/dev/f0cal/project/_venv/src/plugnparse/plugnparse/plugnparse/__init__.py", line 14, in scan_and_run
    scan(package_name, base_parser), use_dict=use_dict, use_kwargs=use_kwargs
  File "/home/andrey/dev/f0cal/project/_venv/src/plugnparse/plugnparse/plugnparse/__init__.py", line 36, in run
    return _func(parser, **ns)
  File "/home/andrey/dev/f0cal/project/saltbox/src/saltbox/venv.py", line 110, in _venv_exec
    with SaltBox.executor_factory(config) as api:
  File "/home/andrey/dev/f0cal/project/saltbox/src/saltbox/api.py", line 222, in __enter__
    self.render_all(registry.template_roots, self._config_obj.salt_root_path)
  File "/home/andrey/dev/f0cal/project/saltbox/src/saltbox/api.py", line 198, in render_all
    cls.render_one(template_root, salt_root, template_vars)
  File "/home/andrey/dev/f0cal/project/saltbox/src/saltbox/api.py", line 205, in render_one
    RecipeTemplate.render_to_path(template_root, tmp_dir, template_vars=_t_vars)
  File "/home/andrey/dev/f0cal/project/saltbox/src/saltbox/template.py", line 68, in render_to_path
    cls.copy_tree(src_path, dst_path)
  File "/home/andrey/dev/f0cal/project/saltbox/src/saltbox/template.py", line 12, in copy_tree
    assert os.path.exists(src_path), src_path
AssertionError: /home/andrey/dev/f0cal/project/device-farm/cluster-api.saltbox/src/cluster-bootstrap