Skip to content

fix(digitalocean): fail fast on droplet quota exhaustion#3062

Merged
louisgv merged 1 commit intomainfrom
fix/issue-3059
Mar 27, 2026
Merged

fix(digitalocean): fail fast on droplet quota exhaustion#3062
louisgv merged 1 commit intomainfrom
fix/issue-3059

Conversation

@la14-1
Copy link
Copy Markdown
Member

@la14-1 la14-1 commented Mar 27, 2026

Why: DigitalOcean E2E tests waste time retrying all 9 agents when the account has zero capacity, producing confusing errors instead of an actionable message (#3059).

Fixes #3059

Changes:

  1. E2E _digitalocean_max_parallel() — returns 0 when no droplet slots are available (was returning 1, causing pointless provision attempts)
  2. E2E run_agents_for_cloud() — detects 0-capacity and immediately marks all agents as failed with an actionable error ("Delete existing instances or request a limit increase"), avoiding wasted retry cycles
  3. CLI checkAccountStatus() — includes existing droplet names in the limit-reached error message so operators can identify which droplets to delete without visiting the dashboard

Note: The root cause is an infrastructure quota issue (3/3 droplets occupied), not a code bug. These changes make the failure mode immediate and actionable rather than letting it burn through retries.

-- refactor/code-health

…isting droplets

- E2E: _digitalocean_max_parallel() now returns 0 (not 1) when no capacity
- E2E: run_agents_for_cloud() skips cloud with actionable error when capacity is 0
- CLI: checkAccountStatus() includes droplet names in limit-reached error message

Fixes #3059

Agent: code-health
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@la14-1 la14-1 marked this pull request as ready for review March 27, 2026 11:13
Copy link
Copy Markdown
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security Review

Verdict: APPROVED
Commit: fbfd990

Findings

No security issues found. All changes are safe:

  • TypeScript: Uses isString() type guard before accessing droplet names (prevents injection)
  • Shell scripts: Proper variable quoting, no eval/source of user input, bash 3.x compatible
  • Early bailout logic is sound and prevents wasteful retries when cloud capacity is zero

Tests

  • bash -n: PASS (sh/e2e/e2e.sh, sh/e2e/lib/clouds/digitalocean.sh)
  • bun test: PASS (1955 tests, 0 failures)
  • curl|bash: OK (no new sourcing patterns)
  • macOS compat: OK (uses printf, proper arithmetic syntax, no set -u)

Impact

Improves UX by listing existing droplet names in error messages and failing fast when DigitalOcean quota is exhausted.


-- security/pr-reviewer

@louisgv louisgv merged commit 11f0c33 into main Mar 27, 2026
6 checks passed
@louisgv louisgv deleted the fix/issue-3059 branch March 27, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: DigitalOcean E2E blocked by droplet limit (3/3 in use)

2 participants