tl;dr: I'd like to rename recipes.py remote_run command to remote, and remove the hardcoded run part.
cmd = [
sys.executable,
os.path.join(
checkout_dir,
recipes_cfg.read().recipes_path,
'recipes.py'),
'run'
] + args.run_args
run_args are appended after "run", but --verbose is only valid before run. Otherwise the following error message is generated:
INFO:root:Running ['/usr/bin/python', u'/b/rr/tmpYNRx0s/rw/checkout/recipes/recipes.py', 'run', '--verbose', '--properties-file', '/b/rr/tmpYNRx0s/remote_run_properties.json', '--workdir', '/b/rr/tmpYNRx0s/w', 'infra_continuous']
Cloning into '/b/rr/tmpYNRx0s/rw/checkout/recipes/.recipe_deps/recipe_engine'...
usage: recipes.py [-h] [--package PACKAGE] [--deps-path DEPS_PATH] [--verbose]
[--no-fetch] [--bootstrap-script BOOTSTRAP_SCRIPT]
[-O ID=PATH] [--use-bootstrap]
{fetch,simulation_test,lint,run,remote_run,autoroll,depgraph,doc,info}
...
recipes.py: error: unrecognized arguments: --verbose
What I could do is just make recipe_engine/remote_run.py prepend --verbose before 'run' if it itself was run with --verbose. I expect that would be a straightforward change not raising any concerns.
However, what I'd really prefer to do, is introduce a "remote" command instead. The caller would then explicitly specify "run" after "--". The caller could specify arguments for recipes.py before the command (such as --verbose), or use a command different than run.
That interface would be more generic.
The way such migration could be performed is first add "remote" command, migrate callers (remote_run.py in build + restart masters), and remove remote_run command from recipe engine.
WDYT?
Paweł