Skip to content

Commit

Permalink
simulator: Exit with error when secret is not set
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Doan <[email protected]>
  • Loading branch information
doanac committed Oct 6, 2023
1 parent 02d6d7f commit a8ede07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions runner/jobserv_runner/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ def get_args(args=None):
_update_shared_volumes_mapping(args.worker_dir, vols, args.rundef)
_handle_inputs(rundef_path, args.rundef)

for name, val in (args.rundef.get("secrets") or {}).items():
if val == "TODO":
sys.exit(f"Missing required secret value in run definition: {name}")

if not os.path.isdir(args.worker_dir):
sys.exit("worker-dir does not exist: " + args.worker_dir)
args.runner_dir = os.path.join(args.worker_dir, "run")
Expand Down

0 comments on commit a8ede07

Please sign in to comment.