Cloud Run Admin API v2 — HTTP 409 when restoring service-level scaling
Hello Google Cloud Community,
We are experiencing an issue restoring automatic scaling on a production Cloud Run service associated with a Firebase Functions Gen 2 deployment.
Initial configuration:
-
Service-level scaling: AUTOMATIC
-
Maximum instances: 20
-
Traffic: 100% to the existing latest revision
Maintenance action:
We temporarily disabled the service by setting manual scaling to zero instances. This succeeded, and the service returned HTTP 503 as expected.
Recovery attempts:
We attempted to restore automatic scaling through Cloud Run Admin API v2 using an up-to-date etag.
First attempt:
-
Update mask:
scaling,traffic -
Result: HTTP 409
Second attempt:
-
Update mask:
scaling -
Requested scaling mode: AUTOMATIC
-
Maximum instances: 20
-
Result: HTTP 409 ALREADY_EXISTS
The second attempt returned:
Revision named '[existing-revision]' with different configuration already exists.
Neither PATCH explicitly modified the revision template.
Current verified state:
-
Service scaling: MANUAL
-
Manual instance count: 0
-
Service generation matches observed generation
-
Reconciliation completed successfully
-
No traffic tags
-
Revision template maximum instances: 10
-
Stored revision maximum instances: 10
The revision template and stored revision configurations match. The original service-level maximum of 20 is separate from the revision-level maximum of 10.
Both recovery requests omitted an explicit clearing of manualInstanceCount.
Questions:
-
Why would a service-level scaling update produce an existing-revision configuration collision?
-
What is the officially supported procedure for transitioning from MANUAL/0 back to AUTOMATIC through Cloud Run Admin API v2?
-
Should
manualInstanceCountbe explicitly cleared using a granular update mask and a null value? -
Is there a known issue involving revision configuration comparisons during service-level scaling changes?
-
Is there a safe recovery procedure that preserves the existing revision, traffic configuration and IAM settings without redeploying?
We have stopped further production modifications until the recovery procedure can be validated.
Any guidance or official documentation would be greatly appreciated. Thank you.