spawn/upcloud/lib
A cbcf79d376
refactor: Extract common API retry interval update logic to reduce duplication (#70)
- Add `_update_retry_interval()` helper in shared/common.sh to eliminate
  repeated backoff interval calculation and cap logic (was copied 10+ times
  across cloud provider API wrappers)
- Refactor generic_cloud_api() to use new helper, reducing from 83 to 70 lines
- Refactor scaleway_api() to use new helper, reducing from 66 to 53 lines
- Refactor upcloud_api() to use new helper, reducing from 65 to 52 lines

This reduces cyclomatic complexity by eliminating nested if statements for
interval updates and consolidates the retry backoff logic in one place,
making future maintenance easier and reducing bugs from copy-paste errors.

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-09 03:36:08 -08:00
..
common.sh refactor: Extract common API retry interval update logic to reduce duplication (#70) 2026-02-09 03:36:08 -08:00