cloudrunv2: send 0.0 values for cpuUtilization and concurrencyUtilization to support disabling scaling signals - #18682
Conversation
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @ScottSuarez, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 56d3f43: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 14 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @manalikumar, @ian-mi, @ScottSuarez VCR tests complete for 56d3f43! |
…scaling signals with 0.0 Using a custom expander with raw config inspection ensures that 0.0 is only sent when explicitly configured by the user in HCL, avoiding sending 0.0 for unconfigured fields which causes Cloud Run API 400 errors when scaling block is used without utilization targets.
56d3f43 to
298c7a9
Compare
When setting
cpu_utilization = 0orconcurrency_utilization = 0to disable autoscaling thresholds, Terraform was omitting the field because0.0is considered an empty value in Go.Using a custom expander with raw config inspection ensures that
0.0is explicitly sent in the request payload to the Cloud Run v2 API when configured in HCL, while unconfigured fields remain omitted so default autoscaling behavior is preserved without triggering mutual exclusion 400 errors.Fixes b/448515376