spawn/scaleway/lib
A 77db796aff
refactor: Decompose create_server in Scaleway and Fly.io providers (#171)
Break down the two longest create_server functions (104 and 102 lines)
into focused sub-functions for readability and reusability:

Scaleway (104 -> 53 lines):
- Extract _scaleway_extract_ip() for IP parsing from server response
- Extract _scaleway_power_on_and_wait() for power-on + polling loop

Fly.io (102 -> 14 lines):
- Extract _fly_create_app() for app creation with "already exists" handling
- Extract _fly_create_and_start_machine() for machine lifecycle

Also fix ((attempt++)) to attempt=$((attempt + 1)) in Fly.io to avoid
potential set -e failures when attempt is 0.

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 07:18:00 -08:00
..
common.sh refactor: Decompose create_server in Scaleway and Fly.io providers (#171) 2026-02-10 07:18:00 -08:00