hanishi commented on code in PR #1494:
URL: https://github.com/apache/pekko-connectors/pull/1494#discussion_r2935240702


##########
google-cloud-pub-sub-grpc/src/main/scala/org/apache/pekko/stream/connectors/googlecloud/pubsub/grpc/impl/PekkoGrpcSettings.scala:
##########
@@ -43,13 +43,10 @@ import scala.annotation.nowarn
         
.withFallback(sys.settings.config.getConfig("pekko.grpc.client.\"*\"")))
 
     (config.callCredentials: @nowarn("msg=deprecated")) match {
-      case None                           => settings
-      case Some(DeprecatedCredentials(_)) => // Deprecated credentials were 
loaded from config so override them
-        sys.log.warning(
-          "Config path 
pekko.connectors.google.cloud.pubsub.grpc.callCredentials is deprecated, use 
pekko.connectors.google.credentials")
+      case Some(creds) => settings.withCallCredentials(creds)
+      case None        =>

Review Comment:
   Fixed. The None behavior is preserved. 
   `callCredentials = "none"` returns settings without credentials (for the 
emulator?), same as before.
   The implementation restores the original three-case credential resolution:   
                                                                                
                                             
     - callCredentials = "none" → no credentials attached (for emulator or 
testing?)                                                                       
                                                          
     - callCredentials = "deprecated" (reference.conf default) → credentials 
resolved via `GoogleSettings`, which supports the new 
google-application-default provider as well as the existing 
application-default, service account, etc.                                      
                                                                                
                                          
     - Explicit CallCredentials provided programmatically → used as-is
   
   The key difference from the old code is that PubSubSettings no longer 
eagerly calls `GoogleCredentials.getApplicationDefault()`at config parse time.
   Instead, credential resolution is deferred to `GoogleSettings`, which is the 
single source of truth. 
   
   This eliminates the redundant eager resolution that the old 
DeprecatedCredentials path was working around. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to