-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Determine this is the right repository
- I determined this is the correct repository in which to report this bug.
Summary of the issue
Context
I wanna manage my cloud run function's service level scaling from python client. however i get 409 error even though it should not trigger a new version according to the behaviour on UI.
Here is the example code:
# Get the current service
service = client.get_service(name=service_name)
service.scaling.min_instance_count = min_instances
update_mask = field_mask_pb2.FieldMask(
paths=["scaling.minInstanceCount"]
)
update_request = run_v2.UpdateServiceRequest(
service=service,
update_mask=update_mask,
allow_missing=False
)
# Update the service
operation = client.update_service(request=update_request)
Expected Behavior:
The Scaling value is updated without an error message

Actual Behavior:
Update operation returns the following error message:
409 Revision named '' with different configuration already exists.
API client name and version
google-cloud-run 0.10.9
Reproduction steps: code
file: main.py
# Get the current service
service = client.get_service(name=service_name)
service.scaling.min_instance_count = min_instances
update_mask = field_mask_pb2.FieldMask(
paths=["scaling.minInstanceCount"] ## also tried scaling.min_instance_count
)
update_request = run_v2.UpdateServiceRequest(
service=service,
update_mask=update_mask,
allow_missing=False
)
# Update the service
operation = client.update_service(request=update_request)
Reproduction steps: supporting files
Reproduction steps: actual results
409 Revision named '' with different configuration already exists.
Reproduction steps: expected results
HTTP 200
OS & version + platform
MacOS Sequoia
Python environment
3.11.9
Python dependencies
google-api-core 2.25.1
google-auth 2.40.3
google-cloud-run 0.10.9
googleapis-common-protos 1.70.0
Additional context
No response
Yiming075
Metadata
Metadata
Assignees
Labels
triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.