mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 11:59:29 +00:00
refactor: remove dead cloud_exec_long and _*_exec_long functions (#2407)
The cloud_exec_long dispatcher in common.sh and all five cloud-specific _exec_long implementations (aws, digitalocean, gcp, hetzner, sprite) were defined but never called by any code in the e2e test suite. Co-authored-by: spawn-qa-bot <qa@openrouter.ai> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
7801c263bb
commit
c4ae16849d
6 changed files with 0 additions and 190 deletions
|
|
@ -128,38 +128,6 @@ _hetzner_exec() {
|
|||
"root@${ip}" "${cmd}"
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# _hetzner_exec_long APP CMD TIMEOUT
|
||||
#
|
||||
# Execute a long-running command on the server via SSH with keepalive
|
||||
# and a remote-side timeout.
|
||||
# ---------------------------------------------------------------------------
|
||||
_hetzner_exec_long() {
|
||||
local app="$1"
|
||||
local cmd="$2"
|
||||
local timeout_secs="$3"
|
||||
local log_dir="${LOG_DIR:-/tmp}"
|
||||
|
||||
local ip_file="${log_dir}/${app}.ip"
|
||||
if [ ! -f "${ip_file}" ]; then
|
||||
log_err "No IP file found for ${app} at ${ip_file}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local ip
|
||||
ip=$(cat "${ip_file}")
|
||||
|
||||
# Pipe the command via stdin to avoid interpolating it into the remote
|
||||
# command string — eliminates shell injection risk from base64 encoding.
|
||||
printf '%s' "${cmd}" | ssh -o StrictHostKeyChecking=no \
|
||||
-o UserKnownHostsFile=/dev/null \
|
||||
-o LogLevel=ERROR \
|
||||
-o BatchMode=yes \
|
||||
-o ConnectTimeout=10 \
|
||||
-o ServerAliveInterval=15 \
|
||||
"root@${ip}" "timeout ${timeout_secs} bash"
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# _hetzner_teardown APP
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue