Adding --gcp-cloud-run-scale-down-stabilization-duration flag - #1167
Adding --gcp-cloud-run-scale-down-stabilization-duration flag#1167seanbollin wants to merge 1 commit into
Conversation
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37bae511f3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99856f6bd4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
99856f6 to
d8a362a
Compare
gcristea-temporal
left a comment
There was a problem hiding this comment.
This looks good, thank you for taking adding the extra argument.
Not sure whether my review approval alone is enough for you to merge.
|
please use the PR template that demos the UX difference. |
jaypipes
left a comment
There was a problem hiding this comment.
I would suggest using --scale-down-stabilization-window or --scale-down-stabilization-duration to align with the identical Kubernetes autoscaler settings.
d8a362a to
ca11705
Compare
ca11705 to
eb1ac89
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb1ac89aa4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…yment version commands Exposes the rate-based scaler's scale-down stabilization window (previously hard-coded to 90s) as --gcp-cloud-run-scale-down-stabilization-duration on `temporal worker deployment create-version` and `update-version-compute-config`, so worker pools running long or bursty activities aren't scaled down before in-flight work finishes. The flag is a duration and joins the existing all-or-none GCP Cloud Run scaler group; the CLI converts it to milliseconds and sends it under the rate-based scaler's no_sync_quiet_ms config key, so no server-side change is required. describe-version surfaces the value as a duration string. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
52945d4 to
92f242b
Compare
Related issues
Closes: https://temporalio.atlassian.net/browse/COM-241
What changed?
Adds
--gcp-cloud-run-scale-down-stabilization-durationtotemporal worker deployment create-versionandtemporal worker deployment update-version-compute-config.UX difference: the GCP Cloud Run scaler's scale-down stabilization window was
previously hard-coded to 90s, so a worker pool running long or bursty activities
could be scaled down out from under in-flight work. Users can now configure it:
Details:
90s,5m,10m), matching the CLI's conventionfor time-valued flags (
cliext.FlagDuration, like--schedule-to-close-timeout,--retention). It joins the existing all-or-none GCP Cloud Run scaler group, so--gcp-cloud-run-min-instances,--gcp-cloud-run-max-instances,--gcp-cloud-run-initial-instances,--gcp-cloud-run-utilization-target, and--gcp-cloud-run-scale-down-stabilization-durationmust all be set together.it may scale the pool down. Defaults to
90swhen unset;0sdisables the wait.scaler's existing
no_sync_quiet_msconfig key, which the server (WCI) alreadyvalidates and applies — no server-side change is required.
describe-versionsurfaces the value as a duration string (JSONscaleDownStabilization, e.g."5m 0s", formatted the same way as scheduledurations; the text summary shows the same).
Checklist
Stability
-o json/-o jsonl) are treated as breaking changes —describe-versiongains an additivescaleDownStabilizationMsfield; the GCP scaler JSON block is not in a tagged release yet, so no released output changesDesign
temporal <noun> <verb>structure — no new commands; flag added to existing commandsscale-down-stabilization-durationnames the behavior (cf. k8s HPA "stabilization window"), not the internalno_sync_quiet_mskey(Experimental)incommands.yaml— both commands already carry a "This is an experimental feature" noteHelp text (see style guide at the top of
commands.yaml)--namespace, not-n), one flag per lineYourXxxform (YourWorkflowId,YourNamespace)Behavior
Tests
SharedServerSuite) — group/negative/sub-millisecond/wrong-provider cases inTestCreateWorkerDeploymentVersion_Errors; carried in...UpdateModesfunc TestXxx) —TestGCPCloudRunScalerDetails,TestFormatComputeConfigProto_ScalerBoundsManual tests
Setup
Happy path
Error case
Composition