mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-01 21:30:21 +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
|
|
@ -154,39 +154,6 @@ _digitalocean_exec() {
|
|||
"root@${ip}" "${cmd}"
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# _digitalocean_exec_long APP CMD TIMEOUT
|
||||
#
|
||||
# Same as _digitalocean_exec but with ServerAliveInterval for long-running
|
||||
# commands, and wraps the command in `timeout`.
|
||||
# ---------------------------------------------------------------------------
|
||||
_digitalocean_exec_long() {
|
||||
local app="$1"
|
||||
local cmd="$2"
|
||||
local timeout_secs="${3:-120}"
|
||||
|
||||
local ip_file="${LOG_DIR:-/tmp}/${app}.ip"
|
||||
if [ ! -f "${ip_file}" ]; then
|
||||
log_err "IP file not found: ${ip_file}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local ip
|
||||
ip=$(cat "${ip_file}")
|
||||
|
||||
if [ -z "${ip}" ]; then
|
||||
log_err "Empty IP in ${ip_file}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# 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 ConnectTimeout=10 -o LogLevel=ERROR -o BatchMode=yes \
|
||||
-o "ServerAliveInterval=15" -o "ServerAliveCountMax=$((timeout_secs / 15 + 1))" \
|
||||
"root@${ip}" "timeout ${timeout_secs} bash"
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# _digitalocean_teardown APP
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue