(This bug is re-posted from an e-mail I received yesterday.)
We are using python spanner client libraries, and I have a credentials issue in executing a sql query. Seems like executing a sql ignores the provided credentials to the client and just try to use the default credentials.
The code looks like:
spanner_client = spanner.Client(credentials=credentials, project=project_id)
instance = spanner_client.instance(instance_id)
database = instance.database(database_id)
database.execute_sql(stmt)
Debugging the code for a bit, I found out that eventually the code will try to create a session and it will try to get the spanner API client. When this object created, credentials is not passed and hence it's None, and hence the SpannerClient is trying to get the default credentials and fails in my case because I do not have default creds.