GoogleCloudPlatform / cloud-code-intellij

Plugin to support the Google Cloud Platform in IntelliJ IDEA - Docs and Issues Repository
Apache License 2.0
318 stars 59 forks source link

Update Cloud SQL Auth proxy version #3138

Closed yegor-yegorov closed 1 year ago

yegor-yegorov commented 1 year ago

Issue

Today I attempted to connect to the GCloud SQL instance using the GCloud IAM database user through Cloud SQL Auth Proxy. I used the -i flag for automatic authentication using the application default IAM credentials configured in the gcloud cli. To do this, I called the cloud-sql-proxy directly from the Cloud Code installation located in $HOME/<user>/.cache/... since the plugin doesn't provide a way to input cli arguments or environment variables for cloud-sql-proxy command. However, I received an error message stating: "The proxy has encountered a terminal error: unable to start: MYSQL_8_0_30 does not support Auto IAM DB Authentication". Initially, I thought I had misconfigured my MySQL instance, but I later discovered that everything works fine with the latest version of cloud-sql-proxy (version 2.2.0) which I manually installed. The current version installed by Cloud Code is 2.0.0-preview.3.

In addition to updating the version of CLoud SQL Auth proxy, maybe it would be wise to be able to configure a path to locally installed cloud-sql-proxy in plugin settings.

Environment:

Cloud Code version: 23.5.1-222-IB.1 Cloud SDK:

IDE: PyCharm 2023.1.1 (Professional Edition) Cloud SQL Auth Proxy version installed by Cloud Code: 2.0.0-preview.3 Cloud SQL Auth Proxy version installed manually: 2.2.0 OS: Linux (Manjaro Linux, kernel 6.3)

ivanporty commented 1 year ago

Thank you for the report @yegor-yegorov! We will schedule Cloud SQL Proxy version update for the next release, and think about using locally available version as an alternative.

ivanporty commented 1 year ago

@yegor-yegorov Cloud SQL proxy version has been updated to the latest (2.4.0) and released with the latest plugin version (23.6.1). Let us know if it works for you! Closing.