-
Notifications
You must be signed in to change notification settings - Fork 439
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
fix: grpc issue (UNAUTHENTICATED errors against Cloud Spanner emulator in v1.45.0) #5224
fix: grpc issue (UNAUTHENTICATED errors against Cloud Spanner emulator in v1.45.0) #5224
Conversation
76bbf39
to
0db265d
Compare
Hi @HannahShiSFB |
There is this part, where the array union operator is replaced with array_merge(), in
A similar change is also needed in |
That's a good catch, otherwise behavior could change for some implementations! |
There are 5 emulators in google cloud: Spanner, Firestore, PubSub, Datastore, BigTable. They all have the same issue. |
Hello guys, |
Hi @jmleroux ! The changes here only effect Spanner. We will need to make additional changes for them to be added to Firestore, PubSub, Datastore, and BigTable. However, this can be done at any time (the changes here will not effect existing behavior). EDIT: I've added the changes for the other relevant packages in #5250 |
fix of grpc/grpc#29233, which is caused by grpc/grpc#25586 which removed insecure channel.
Regardless whether Spanner connects to emulator or production server, gax-php always create a CredentialsWrapper (https://github.com/googleapis/gax-php/blob/v1.12.0/src/GapicClientTrait.php#L434) and add it to callstack (https://github.com/googleapis/gax-php/blob/v1.12.0/src/GapicClientTrait.php#L610).
When creating gRPC calls, GrpcTransport calls CredentialsWrapper (https://github.com/googleapis/gax-php/blob/v1.12.0/src/Transport/GrpcTransport.php#L258-L259) to setup a callback for auth token, which requires secure level to be equal or higher than GRPC_PRIVACY_AND_INTEGRITY which doesn’t work on an insecure channel.