Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions ci3/dashboard/rk.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,26 @@ def make_options(param_name, options, current_value, suffix=''):
# Dashboard server needs local repo checkout at REPO_PATH
repo_path = os.environ.get('REPO_PATH')
if repo_path:
# Refresh the launcher checkout to current origin/next before launching.
# REPO_PATH only supplies the orchestration scripts (ci.sh/bootstrap_ec2);
# the grind target commit is checked out on the remote box. The launcher
# must stay current so grind uses the same transport (SSM) as the rest of
# CI -- a drifted checkout silently falls back to the retired SSH path and
# every instance times out waiting for SSH.
refresh = subprocess.run(
['git', '-C', repo_path, 'fetch', '--quiet', 'origin', 'next'],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True
)
if refresh.returncode == 0:
refresh = subprocess.run(
['git', '-C', repo_path, 'checkout', '--quiet', '--force', 'origin/next'],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True
)
if refresh.returncode != 0:
r.setex(run_id, 86400,
f'Failed to refresh launcher checkout at {repo_path}:\n{refresh.stdout}\n'.encode())
return redirect(f'/{run_id}')

subprocess.Popen(
['bash', '-c', f'cd {repo_path} && RUN_ID={run_id} CPUS={cpus} ./ci.sh grind-test {shlex.quote(full_cmd)} {grind_time} {jobs_pct} {memsuspend_pct} {commit}'],
stdout=subprocess.DEVNULL,
Expand Down
Loading