Repository navigation
Conversation
The runner was hard-wired to Auth Proxy v1, whose download URLs, -dir/-instances flag set and binary layout cannot complete caching_sha2_password full authentication on Cloud SQL for MySQL 8.4 — the first connection after a server restart, failover or maintenance event fails with 1045 Access denied, and the account cannot be moved back to mysql_native_password (ERROR 4052). A new sql_proxy_major_version option (default 1, unchanged) opts into the v2 binary: GitHub-releases download URL with its own version regex, --unix-socket + positional instance instead of -dir/-instances, --auto-iam-authn for IAM login, and the v2 ready-line on startup.
shahar1
requested changes
Sep 15, 2026
shahar1
left a comment
Contributor
There was a problem hiding this comment.
Welcome to Apache Airflow!
I'd kindly ask to read our guidelines regarding AI-assisted contributions, and include an AI attribution section in the PR body according to the existing template.
| @@ -0,0 +1,22 @@ | |||
| Google provider: ``CloudSqlProxyRunner`` can now run Cloud SQL Auth Proxy v2 | |||
Contributor
There was a problem hiding this comment.
Could you please remove this file? (currently we don't use newsfragments for changes in providers)
1 task done
Contributor
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Contributor
|
Closing in favor of #73646 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a
sql_proxy_major_versionoption toCloudSqlProxyRunner(default1— behavior unchanged) that opts into running the Cloud SQL Auth Proxy v2 binary.Why
The runner is hard-wired to Auth Proxy v1:
CLOUD_SQL_PROXY_DOWNLOAD_URL/CLOUD_SQL_PROXY_VERSION_DOWNLOAD_URLpoint at the v1 buckets, and_build_command_line_parameters()emits-dirand-instances, both removed in v2. v1 cannot completecaching_sha2_passwordfull authentication — on Cloud SQL for MySQL 8.4 (where it is the default andmysql_native_passwordis unavailable, ERROR 4052) the first connection after a server restart, failover or maintenance event fails with1045 Access denied. Auth Proxy v1 no longer receives development; its startup banner recommends v2.Reported in #72681.
What changes
sql_proxy_major_version=2builds the v2 command line:--unix-socket <dir>+ positional instance connection name,--auto-iam-authnwhensql_proxy_enable_iam_loginis set.GoogleCloudPlatform/cloud-sql-proxy), validated by a v2-specific version regex; an explicitsql_proxy_versionis required in v2 mode (no legacy 'latest' alias exists for the new binary layout).start_proxyalso accepts the v2 ready-line ("ready to accept new connections") alongside the v1 one.Tests
6 new unit tests in
providers/google/tests/unit/google/cloud/hooks/test_cloud_sql.py(v2 command line, IAM mapping, download URL, v1-style version rejection, version requirement, unknown major version rejection).Related
Closes #72681