-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compute: unable to resize instance group to 0 #5174
Comments
cc @noahdietz WDYT? A bug perhaps? |
Yep, this is a bug. There are only 3 This does potentially open up users to some confusing errors/scenarios if they don't set the field (because there isn't a good way to enforce required fields in Go unless they are pointers) and the default empty We probably want to include some extra documentation to the method to ensure it is explicitly set by the user. I will open an issue on the generator to fix this and we can close this one when it is regenerated. Extra documentation might come in a separate issue/PR as that might benefit non-diregapic clients as well. |
Opened googleapis/gapic-generator-go#819 to track the bug fix. |
In REST clients, singular, primitive required fields will be added to query params regardless of if they are default empty value or not. This is the fix for #5174 which will come in the next regen.
https://pkg.go.dev/cloud.google.com/[email protected] should have the fix google-cloud-go/compute/apiv1/instance_group_managers_client.go Lines 1297 to 1302 in 5563382
|
https://github.com/googleapis/google-cloud-go/blob/main/compute/apiv1/instance_group_managers_client.go#L1301
When size is 0, the size parameter is not added to HTTP param - and server returns 400 bad request - leading to unability to resize intance group to 0.
The gcloud cli works:
The text was updated successfully, but these errors were encountered: