diff --git a/cherry/lib/common.sh b/cherry/lib/common.sh index 972f58a4..1927252a 100755 --- a/cherry/lib/common.sh +++ b/cherry/lib/common.sh @@ -167,7 +167,7 @@ get_server_name() { # Sets CHERRY_SERVER_IP on success _cherry_wait_for_ip() { local server_id="$1" - log_info "Waiting for IP address assignment..." + log_step "Waiting for IP address assignment..." local ip_address="" local attempts=0 local max_attempts=60 @@ -181,10 +181,13 @@ _cherry_wait_for_ip() { ip_address=$(printf '%s' "$server_info" | _cherry_extract_primary_ip) attempts=$((attempts + 1)) + if [[ -z "$ip_address" ]] && [[ $((attempts % 5)) -eq 0 ]]; then + log_step "Still waiting for IP address... (attempt ${attempts}/${max_attempts})" + fi done if [[ -z "$ip_address" ]]; then - log_error "Failed to get server IP address" + log_error "Failed to get server IP address after ${max_attempts} attempts" return 1 fi @@ -209,7 +212,7 @@ create_server() { local project_id project_id=$(get_cherry_project_id) || return 1 - log_info "Creating Cherry Servers server..." + log_step "Creating Cherry Servers server..." log_info "Plan: $plan, Region: $region, Image: $image" local payload @@ -260,7 +263,7 @@ wait_for_cloud_init() { local ip="$1" local timeout="${2:-300}" - log_info "Waiting for system initialization..." + log_step "Waiting for system initialization..." if ! run_server "$ip" "cloud-init status --wait --long" 2>/dev/null; then log_warn "cloud-init wait timed out or not available, proceeding anyway" diff --git a/contabo/lib/common.sh b/contabo/lib/common.sh index 2f794d14..db6df544 100644 --- a/contabo/lib/common.sh +++ b/contabo/lib/common.sh @@ -239,7 +239,7 @@ create_server() { export CONTABO_INSTANCE_ID log_info "Instance created: ID=$CONTABO_INSTANCE_ID" - log_info "Waiting for instance to be provisioned..." + log_step "Waiting for instance to be provisioned..." _contabo_wait_for_instance "$CONTABO_INSTANCE_ID" } diff --git a/github-codespaces/aider.sh b/github-codespaces/aider.sh index b0b15a57..cb61711e 100755 --- a/github-codespaces/aider.sh +++ b/github-codespaces/aider.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/amazonq.sh b/github-codespaces/amazonq.sh index 661f2f55..00d25c87 100644 --- a/github-codespaces/amazonq.sh +++ b/github-codespaces/amazonq.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/claude.sh b/github-codespaces/claude.sh index ac5a4285..75df9640 100755 --- a/github-codespaces/claude.sh +++ b/github-codespaces/claude.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/cline.sh b/github-codespaces/cline.sh index 135f181d..fd06ed91 100644 --- a/github-codespaces/cline.sh +++ b/github-codespaces/cline.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/codex.sh b/github-codespaces/codex.sh index f3d4f4db..dfc8c7fe 100644 --- a/github-codespaces/codex.sh +++ b/github-codespaces/codex.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/gemini.sh b/github-codespaces/gemini.sh index 02ce1337..508d3bd1 100644 --- a/github-codespaces/gemini.sh +++ b/github-codespaces/gemini.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/goose.sh b/github-codespaces/goose.sh index fc25cf38..ec3497d1 100644 --- a/github-codespaces/goose.sh +++ b/github-codespaces/goose.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/gptme.sh b/github-codespaces/gptme.sh index 43776a7b..a265a4d0 100755 --- a/github-codespaces/gptme.sh +++ b/github-codespaces/gptme.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/interpreter.sh b/github-codespaces/interpreter.sh index d559dd21..58ae6ef3 100644 --- a/github-codespaces/interpreter.sh +++ b/github-codespaces/interpreter.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/kilocode.sh b/github-codespaces/kilocode.sh index 1714d212..c1de05b3 100644 --- a/github-codespaces/kilocode.sh +++ b/github-codespaces/kilocode.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/lib/common.sh b/github-codespaces/lib/common.sh index 8c8aefb8..af4a781e 100755 --- a/github-codespaces/lib/common.sh +++ b/github-codespaces/lib/common.sh @@ -89,7 +89,7 @@ create_codespace() { local machine="${2:-basicLinux32gb}" local idle_timeout="${3:-30m}" - log_info "Creating GitHub Codespace..." + log_step "Creating GitHub Codespace..." log_info "Repo: $repo" log_info "Machine: $machine" log_info "Idle timeout: $idle_timeout" @@ -117,7 +117,7 @@ wait_for_codespace() { local max_attempts=60 local attempt=0 - log_info "Waiting for codespace to be ready..." + log_step "Waiting for codespace to be ready..." while [[ $attempt -lt $max_attempts ]]; do local state diff --git a/github-codespaces/nanoclaw.sh b/github-codespaces/nanoclaw.sh index cce8c056..110a449b 100644 --- a/github-codespaces/nanoclaw.sh +++ b/github-codespaces/nanoclaw.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/openclaw.sh b/github-codespaces/openclaw.sh index 6cb65f00..6e7fb5f1 100644 --- a/github-codespaces/openclaw.sh +++ b/github-codespaces/openclaw.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/opencode.sh b/github-codespaces/opencode.sh index 3b4dd974..da0845d9 100644 --- a/github-codespaces/opencode.sh +++ b/github-codespaces/opencode.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/github-codespaces/plandex.sh b/github-codespaces/plandex.sh index 302d620b..96c6e618 100644 --- a/github-codespaces/plandex.sh +++ b/github-codespaces/plandex.sh @@ -21,7 +21,7 @@ REPO="${GITHUB_REPO:-OpenRouterTeam/spawn}" MACHINE="${CODESPACE_MACHINE:-basicLinux32gb}" IDLE_TIMEOUT="${CODESPACE_IDLE_TIMEOUT:-30m}" -log_info "Creating codespace for repo: $REPO" +log_step "Creating codespace for repo: $REPO" CODESPACE=$(create_codespace "$REPO" "$MACHINE" "$IDLE_TIMEOUT") if [[ -z "$CODESPACE" ]]; then diff --git a/netcup/lib/common.sh b/netcup/lib/common.sh index 126e113f..f4cfafec 100644 --- a/netcup/lib/common.sh +++ b/netcup/lib/common.sh @@ -216,7 +216,7 @@ print(json.dumps(param)) # Poll the Netcup API until the VPS has an IPv4 address # Sets NETCUP_SERVER_IP on success _netcup_wait_for_ip() { - log_info "Waiting for IP assignment..." + log_step "Waiting for IP assignment..." local ip="" local attempts=0 while [[ -z "$ip" ]] && [[ $attempts -lt 60 ]]; do @@ -233,10 +233,13 @@ except: pass " 2>/dev/null || echo "") attempts=$((attempts + 1)) + if [[ -z "$ip" ]] && [[ $((attempts % 5)) -eq 0 ]]; then + log_step "Still waiting for IP assignment... (attempt ${attempts}/60)" + fi done if [[ -z "$ip" ]]; then - log_error "Timeout waiting for IP assignment" + log_error "Timeout waiting for IP assignment after 60 attempts" return 1 fi diff --git a/ramnode/lib/common.sh b/ramnode/lib/common.sh index b7a8b8c3..a855c30e 100755 --- a/ramnode/lib/common.sh +++ b/ramnode/lib/common.sh @@ -221,7 +221,7 @@ _pick_flavor() { return fi - log_info "Fetching available instance types..." + log_step "Fetching available instance types..." local flavors flavors=$(_list_flavors) @@ -231,7 +231,7 @@ _pick_flavor() { return fi - log_info "Available instance types:" + log_step "Available instance types:" local i=1 local names=() while IFS='|' read -r name cores ram disk; do @@ -314,7 +314,7 @@ print(json.dumps(body)) # Poll the RamNode API until the server has an IPv4 address # Sets RAMNODE_SERVER_IP on success _ramnode_wait_for_ip() { - log_info "Waiting for IP address..." + log_step "Waiting for IP address..." local max_attempts=30 local attempt=0 while [[ $attempt -lt $max_attempts ]]; do @@ -340,9 +340,12 @@ for net_name, addrs in addresses.items(): fi attempt=$((attempt + 1)) + if [[ $((attempt % 5)) -eq 0 ]]; then + log_step "Still waiting for IP address... (attempt ${attempt}/${max_attempts})" + fi done - log_error "Timeout waiting for IP address" + log_error "Timeout waiting for IP address after ${max_attempts} attempts" return 1 } @@ -378,7 +381,7 @@ create_server() { flavor=$(_pick_flavor) # Get image ID - log_info "Fetching Ubuntu 24.04 image..." + log_step "Fetching Ubuntu 24.04 image..." local image_id image_id=$(_list_images) if [[ -z "$image_id" ]]; then diff --git a/shared/common.sh b/shared/common.sh index c03259e1..0e33e674 100644 --- a/shared/common.sh +++ b/shared/common.sh @@ -541,7 +541,7 @@ wait_for_oauth_code() { local timeout="${2:-120}" local elapsed=0 - log_info "Waiting for authentication in browser (this usually takes 10-30 seconds, timeout: ${timeout}s)..." + log_step "Waiting for authentication in browser (this usually takes 10-30 seconds, timeout: ${timeout}s)..." while [[ ! -f "${code_file}" ]] && [[ ${elapsed} -lt ${timeout} ]]; do sleep "${POLL_INTERVAL}" elapsed=$((elapsed + POLL_INTERVAL)) @@ -1793,7 +1793,7 @@ _multi_creds_validate() { return 0 fi - log_info "Testing ${provider_name} credentials..." + log_step "Testing ${provider_name} credentials..." if ! "${test_func}"; then log_error "Invalid ${provider_name} credentials" log_error "The credentials may be expired, revoked, or incorrectly copied." @@ -2108,7 +2108,7 @@ _display_and_select() { local default_value="${2}" local default_id="${3:-}" - log_info "Available ${prompt_text}:" + log_step "Available ${prompt_text}:" local i=1 local ids=() local default_idx=1 @@ -2150,7 +2150,7 @@ interactive_pick() { return fi - log_info "Fetching available ${prompt_text}..." + log_step "Fetching available ${prompt_text}..." local items items=$("${list_callback}")