metomi / rose

:rose: Rose is a toolkit for writing, editing and running application configurations.
https://metomi.github.io/rose/
GNU General Public License v3.0
55 stars 53 forks source link

`rose app-run` fails if git is not installed #2809

Closed MetRonnie closed 5 days ago

MetRonnie commented 1 month ago
$ ./test-app-run 
+ cat rose-app.conf
[command]
default=echo Hello
+ rose app-run
Traceback (most recent call last):
  File "..../python3.9/site-packages/metomi/rose/popen.py", line 267, in run_bg
    proc = Popen(args, text=True, **kwargs)
  File "..../python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "..../python3.9/subprocess.py", line 1837, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/local/fcm/cylc-8.3.3-2/bin/rose", line 10, in <module>
    sys.exit(rose())
  File "..../python3.9/site-packages/metomi/rose/rose.py", line 281, in rose
    main(
  File "..../python3.9/site-packages/metomi/rose/rose.py", line 396, in main
    exec_sub_cmd(ns, sub_cmd, cmd_args)
  File "..../python3.9/site-packages/metomi/rose/rose.py", line 194, in exec_sub_cmd
    _exec_python(
  File "..../python3.9/site-packages/metomi/rose/rose.py", line 230, in _exec_python
    fcn()
  File "..../python3.9/site-packages/metomi/rose/app_run.py", line 553, in main
    runner = AppRunner(event_handler)
  File "..../python3.9/site-packages/metomi/rose/app_run.py", line 370, in __init__
    Runner.__init__(self, *args, **kwargs)
  File "..../python3.9/site-packages/metomi/rose/run.py", line 125, in __init__
    config_pm = ConfigProcessorsManager(event_handler, popen, fs_util)
  File "..../python3.9/site-packages/metomi/rose/config_processor.py", line 109, in __init__
    SchemeHandlersManager.__init__(
  File "..../python3.9/site-packages/metomi/rose/scheme_handler.py", line 98, in __init__
    handler = class_(*args, **kwargs)
  File "..../python3.9/site-packages/metomi/rose/config_processors/fileinstall.py", line 65, in __init__
    self.loc_handlers_manager = PullableLocHandlersManager(
  File "..../python3.9/site-packages/metomi/rose/config_processors/fileinstall.py", line 868, in __init__
    SchemeHandlersManager.__init__(
  File "..../python3.9/site-packages/metomi/rose/scheme_handler.py", line 98, in __init__
    handler = class_(*args, **kwargs)
  File "..../python3.9/site-packages/metomi/rose/loc_handlers/git.py", line 39, in __init__
    ret_code, versiontext, stderr = self.manager.popen.run(
  File "..../python3.9/site-packages/metomi/rose/popen.py", line 234, in run
    proc = self.run_bg(*args, **kwargs)
  File "..../python3.9/site-packages/metomi/rose/popen.py", line 271, in run_bg
    raise RosePopenError(args, 1, "", str(exc))
metomi.rose.popen.RosePopenError: git version # return-code=1, stderr=
[Errno 2] No such file or directory: 'git'
ColemanTom commented 1 week ago

Also rose task-run appears to require git to exist to run. This just hit me, and we really didn't want to have to have git installed on a compute node which is meant to be pretty minimal.

ColemanTom commented 1 week ago

Is there any ETA on fixing this @MetRonnie and a release going out?

MetRonnie commented 1 week ago

I can have a look today, and we can probably do a release in the next couple of weeks

oliver-sanders commented 5 days ago

Closed by #2818