- Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Replicated in version 1.7.7, 1.7.8, and 1.7.9 on MacOS, and various flavors of linux with python 3.7
Prior to July 3rd, the following code worked, and returned the IAM policy for a given project:
from googleapiclient.discovery import build service = build('cloudresourcemanager','v1') req = service.projects().getIamPolicy(resource='my-project') resp = req.execute() print(resp)
Since then, our existing applications using that functionality started throwing an error that the required parameter body
was missing. At first I thought google made a breaking change to the discovery document, but upon checking, the discovery doc does not require the body
parameter. Then I started poking around and I see this library adds it as required here: https://github.com/googleapis/google-api-python-client/blob/master/googleapiclient/discovery.py#L494
All of the code related to this, that I noticed, is over 7 years old. So its unlikely that a change to the library broke anything. One thing that COULD explain the issue is a few lines below the line i linked above... IF the discovery document didn't previously send a request
field in the method description, this library would make the body optional. I have no way to determine if that actually happened, as I don't have any older cached discovery documents for the cloudresourcemanager v1 API.
I realize what I'm reporting here isn't a bug with this library, but something appears to have changed the behavior in this case (and potentially others) so I wanted to:
- report it (so others can find it)
- see if you have a way to determine what happened
Thanks!