fix: send workersStandby for scale-to-zero + read runpodctl config - #375
Open
Swigler wants to merge 2 commits into
Open
fix: send workersStandby for scale-to-zero + read runpodctl config#375Swigler wants to merge 2 commits into
Swigler wants to merge 2 commits into
Conversation
When deploying with workers=(0, N) for scale-to-zero, Flash never sent the workersStandby field to the API. RunPod's backend defaults it to 1, so a warm worker stays up 24/7 regardless of workersMin=0. - Add workersStandby field to ServerlessResource model - Set workersStandby = workersMin in the deploy payload, so workers=(0, N) correctly sends workersStandby=0 Closes runpod#364
runpodctl writes credentials as a top-level `apikey` field, while Flash only looked for `[default].api_key`. Users who set up runpodctl first were told to run `flash login` despite valid credentials existing. - Add fallback in get_api_key() to check top-level `apikey` when no [default] section is found - [default].api_key still takes precedence when both exist - Add tests for runpodctl-only config and precedence behavior Closes runpod#363
Swigler
force-pushed
the
fix/scale-to-zero-and-config-compat
branch
from
September 3, 2026 17:56
a41fc7b to
2b8d108
Compare
Author
|
Friendly ping — this is ready for review. Hit this while running scale-to-zero deployments; happy to adjust if the approach doesn't fit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two fixes in one branch (separate commits):
1. Scale-to-zero broken by missing
workersStandby(Fixes #364)When deploying with
workers=(0, N), Flash sendsworkersMin: 0but never sendsworkersStandby. RunPod's API defaultsworkersStandbyto 1, so a warm worker stays up 24/7 even though the user asked for scale-to-zero.Fix: Add
workersStandbyfield toServerlessResourceand set it toworkersMinin the deploy payload.workers=(0, 4)now sendsworkersStandby: 0— true scale-to-zero.2. Flash can't read runpodctl's config.toml (Fixes #363)
runpodctlwrites credentials as a top-levelapikeyfield. Flash only looks for[default].api_key. Users who set uprunpodctlfirst get "please run flash login" despite valid credentials existing in the same file.Fix: Add a fallback in
get_api_key()to check the top-levelapikeywhen no[default]section is found.[default].api_keystill wins when both exist.Test plan
get_api_key()returns the key[default].api_keytakes precedenceCloses #364
Closes #363