You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "mdedetrich (via GitHub)" <gi...@apache.org> on 2025/03/29 23:40:37 UTC

[PR] Use GoogleSettings instead of GCStorageSettings [pekko-connectors]

mdedetrich opened a new pull request, #1020:
URL: https://github.com/apache/pekko-connectors/pull/1020

   In addition to getting rid of the depreciation message, this is necessary to add in [fake-gcs-server](https://github.com/fsouza/fake-gcs-server) testing as only `GoogleSettings` has the necessary `settings.withCredentials(NoCredentials(projectId, ""))` method (the deprecated `GCStorageSettings` has no such method and hence it forces official google authentication which won't work with gcs-storage-settings)
   
   I have verified this hasn't caused any regressions by testing against a real google account. Another easy way to verify is to make `ServiceAccountCredentials` public, as well as the various constructor parameters and then you can do
   
   ```scala
   
   val credentials = settings.credentials.asInstanceOf[org.apache.pekko.stream.connectors.google.auth.ServiceAccountCredentials]
   println("credentials")
   println(credentials.clientEmail)
   println(credentials.project)
   println(credentials.privateKey)
   ```
   
   And it will match the settings at https://github.com/apache/pekko-connectors/blob/1fe3474d654bf48b0e81011d878e541a32409c93/google-cloud-storage/src/test/resources/application.conf#L38-L40
   
   which means that everything is being loaded as expected


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Use GoogleSettings instead of GCStorageSettings [pekko-connectors]

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on code in PR #1020:
URL: https://github.com/apache/pekko-connectors/pull/1020#discussion_r2020031289


##########
google-cloud-storage/src/test/scala/org/apache/pekko/stream/connectors/googlecloud/storage/impl/GoogleGCStorageStreamIntegrationSpec.scala:
##########
@@ -44,12 +44,9 @@ import scala.annotation.nowarn
  */
 @DoNotDiscover
 class GoogleGCStorageStreamIntegrationSpec extends GCStorageStreamIntegrationSpec {
-  @nowarn("msg=deprecated")
-  def settings: GCStorageSettings = GCStorageSettings()
+  def settings: GoogleSettings = GoogleSettings()
 
   override def bucket = "connectors"
   override def rewriteBucket = "pekko-connectors-rewrite"
   override def projectId = settings.projectId
-  override def clientEmail = settings.clientEmail

Review Comment:
   These methods aren't actually used anywhere which is why we can delete them without problems



-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Use GoogleSettings instead of GCStorageSettings [pekko-connectors]

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich merged PR #1020:
URL: https://github.com/apache/pekko-connectors/pull/1020


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org