Repository navigation
Add pools.sh autoscale: resize pools to their queued jobs - #113
Conversation
Fixed pool counts either hold idle runners' memory or leave jobs queueing. autoscale grows opted-in pools to busy + queued (capped at max) and shrinks them to min after an idle timeout, behind the same busy check as stop. Closes #110 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
GPT AI Code ReviewSkipped: API key not configured The To enable GPT reviews, add
Once the secret is configured, re-run this workflow or push a new commit to trigger a fresh review. REVIEW SKIPPED - API KEY NOT CONFIGURED Reviewed by GPT via gpt-pr-review.yml. Advisory only. |
DeepSeek AI Code Review1. Acceptance criteriaMost AC items are covered, but there are gaps:
2. Bugs and logic errors
3. CLI and API safety
4. Test coverage
5. Suggested follow-up issues
REQUEST CHANGES — Reviewed by DeepSeek via deepseek-pr-review.yml. Advisory only. |
A repo with over 100 queued or in-progress runs under-counted demand, and a quoted RUNNER_HOST_LABEL in .env never matched the host's own jobs. The README's API-cost claim was optimistic for busy repos. Refs #110 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Addressed the DeepSeek review in the latest commit:
|
GPT AI Code ReviewSkipped: API key not configured The To enable GPT reviews, add
Once the secret is configured, re-run this workflow or push a new commit to trigger a fresh review. REVIEW SKIPPED - API KEY NOT CONFIGURED Reviewed by GPT via gpt-pr-review.yml. Advisory only. |
DeepSeek AI Code Review1. Acceptance criteriaThe diff covers the ACs well: grow, cap at max, raise to min, idle-timeout shrink, busy refusal, label matching, and GitHub-unreachable skip all have corresponding tests in One gap worth flagging: the AC says "shellcheck clean" — the diff doesn't show a shellcheck invocation, and the reviewer comment claims CI runs it, but I can't verify from the diff. If shellcheck isn't actually wired up, that AC is unmet. Assuming the comment is accurate, this is fine. 2. Bugs and logic errors
gh api "repos/$repo/actions/runs/$id/jobs?filter=latest&per_page=100" --paginate \
--jq '.jobs[] | select(.status == "queued") | .labels | map(ascii_downcase) | join(",")'
if (( target < current )) && ! ( require_idle "$name" ) < /dev/null; then
echo "$name: not shrinking after all" >&2
state+="$name $since"$'\n'
continue
fi
Real issue:
3. CLI and API safety
4. Test coverageTests are thorough and cover the ACs. Missing cases I'd want:
5. Suggested follow-up issues
APPROVE — the ACs are met, the logic is sound, and the remaining concerns are non-blocking follow-ups. Reviewed by DeepSeek via deepseek-pr-review.yml. Advisory only. |
Closes #110
Summary
./pools.sh autoscale [--once] [--dry-run] [--interval <s>], driven by a gitignoredautoscale.conf(name min max [idle_minutes]), sopools.confis never rewritten each pass.idle_minuteswith nothing busy or queued, re-checked withrequire_idleright before. GitHub unreachable -> pool left alone.autoscale.conf.example.Follow-ups: #111 (memory/CPU sizing + host budget), #112 (Windows fleet), leonarduk/issue-worm-pro#1397 (dashboard).
Test plan
tests/pools_test.sh— all checks pass, including 20 new autoscale cases (grow/cap/min/idle timeout/busy refusal/label matching/GitHub down/dry-run)autoscale --once --dry-runon StevesBigLaptop against live GitHub: busy counts matched running jobs, idle pools reported countdowns, no state writtenautoscale.confand watch one grow/shrink cycle🤖 Generated with Claude Code