Split off from #17
See also: googleapis/python-datastore#74
See also: googleapis/python-storage#177
In a "blank slate" design, I would argue that the credentials' project should supersede the one present in the environment. However, for backward compatibility, we need to use the credentials' project only if the environment variable is not set. So the order should follow the pattern from google.auth.default when inferring project ID:
- Explicit project ID passed to client constructor
- Project ID set in
GOOGLE_CLOUD_PROJECT envvar
- Project ID from credentials, if present
- Project ID from SDK
- Project ID from GAE
- Project ID from GCE
Split off from #17
See also: googleapis/python-datastore#74
See also: googleapis/python-storage#177
In a "blank slate" design, I would argue that the credentials' project should supersede the one present in the environment. However, for backward compatibility, we need to use the credentials' project only if the environment variable is not set. So the order should follow the pattern from
google.auth.defaultwhen inferring project ID:GOOGLE_CLOUD_PROJECTenvvar