fix(pod): remove --stop-after and --terminate-after - #330
Merged
justinwlin merged 1 commit intoAug 27, 2026
Merged
Conversation
justinwlin
force-pushed
the
justinlin/con-1258-enforce-runpodctl-stop-after-and-terminate-after-timers
branch
from
August 26, 2026 19:19
2cf39ea to
9c44819
Compare
Both flags were forwarded to podFindAndDeployOnDemand, which accepts stopAfter/terminateAfter and never acts on them: the pod keeps running, and billing, past the deadline. The value is also not readable back from the Pod type or REST v2, so the cli cannot detect the failure after the fact either. Nothing a client can do makes the timer fire, and a flag that silently costs money is worse than no flag, so both are gone. Passing one is now a usage error. Also drops StopAfter/TerminateAfter from CreatePodGQLInput and duration.ParseDeadline, which had no other caller.
justinwlin
force-pushed
the
justinlin/con-1258-enforce-runpodctl-stop-after-and-terminate-after-timers
branch
from
August 26, 2026 19:28
9c44819 to
d381563
Compare
justinwlin
marked this pull request as ready for review
August 26, 2026 19:37
lukepiette
approved these changes
Aug 27, 2026
lukepiette
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Deletion-only change removing two flags that were silently ignored server-side while the pod kept billing — failing loudly beats silently costing money.
What I verified:
- No leftovers. Grepped the head branch for
stopAfter,terminateAfter,stop-after,terminate-after, andParseDeadlineacross Go and Markdown — zero matches. Removal is complete, including the generated docs. - Builds and tests pass.
go build ./...and the full test suite are green on the branch locally. - The rationale holds. The field is write-only with no REST v2 equivalent, so the CLI genuinely can't verify or enforce the timer, and the PR's production evidence shows the API ignores it.
Two notes, neither blocking:
- Stale description: the body says
duration.ParseDeadlinewas dropped, but it doesn't exist onmainand no duration file is in the diff (onlyduration.Parseexists, still used by--since/--wait-timeout). Worth correcting the description before merge. - Breaking CLI change: scripts passing
--stop-afterwill now hard-fail withunknown flag. Right behavior, but deserves a release-notes line. And since auto-stop is a genuinely useful capability, confirm the backend ticket (CON-1258) stays open rather than closing with this PR.
🤖 Reviewed with Claude Code
justinwlin
deleted the
justinlin/con-1258-enforce-runpodctl-stop-after-and-terminate-after-timers
branch
August 27, 2026 22:51
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.
--stop-afterand--terminate-afternever worked. Both are removed.Part of CON-1258, which stays open: this removes the broken surface, it does not fix the feature. runpod/RunPod#5718 is the backend fix that makes the deadline actually fire, and runpodctl#331 restores the flags with validation once it lands.
Why
The flags were forwarded to
podFindAndDeployOnDemandasstopAfter/terminateAfter. The API accepts both as valid input and then does not act on them: the pod keeps running, and billing, past the deadline.The value is also write-only. It is not readable on the
Podtype and does not exist in REST v2 at all, so the CLI cannot confirm the timer landed, and cannot detect afterwards that it did not fire.Three further problems, all moot once the flag is gone:
1h,24h,7d) was rejected by the GraphQLDateTimescalar, leaking the raw scalar error. Only RFC 3339 was ever sent successfully.Nothing a client can do makes the timer fire, and a flag that silently costs money is worse than no flag.
What changed
Both flags are deleted. Passing one is a usage error:
They no longer appear in
--helpor the generated docs, andStopAfter/TerminateAfterare dropped fromCreatePodGQLInput.internal/durationis untouched —duration.Parsestill backs--sinceand--wait-timeout.Release notes
Breaking.
runpodctl pod create --stop-afterand--terminate-afterare removed. Scripts passing either now fail withunknown flagand a non-zero exit instead of creating a pod on a timer that never fired. There is no replacement until the backend enforces the deadline; until then, stop or terminate the pod explicitly.Evidence
Two GPU pods created against production with
stopAfterroughly four minutes out. Both stayedRUNNINGpast the deadline, with no state change and no error. Deleted manually afterwards.mqb8yey2sq8qkaRUNNINGbdwcl5lzqwqny0RUNNINGgo build ./...andgo test ./...green.