You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "kokhlo (via GitHub)" <gi...@apache.org> on 2026/09/09 08:06:43 UTC

[PR] fix(google): add Cloud SQL Auth Proxy v2 mode to CloudSqlProxyRunner [airflow]

kokhlo opened a new pull request, #72785:
URL: https://github.com/apache/airflow/pull/72785

   ## Description
   
   Adds a `sql_proxy_major_version` option to `CloudSqlProxyRunner` (default `1` — 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_URL` point at the v1 buckets, and `_build_command_line_parameters()` emits `-dir` and `-instances`, both removed in v2. v1 **cannot complete `caching_sha2_password` full authentication** — on Cloud SQL for MySQL 8.4 (where it is the default and `mysql_native_password` is unavailable, ERROR 4052) the first connection after a server restart, failover or maintenance event fails with `1045 Access denied`. Auth Proxy v1 no longer receives development; its startup banner recommends v2.
   
   Reported in #72681.
   
   ### What changes
   
   - `sql_proxy_major_version=2` builds the v2 command line: `--unix-socket <dir>` + positional instance connection name, `--auto-iam-authn` when `sql_proxy_enable_iam_login` is set.
   - v2 downloads come from GitHub releases (`GoogleCloudPlatform/cloud-sql-proxy`), validated by a v2-specific version regex; an explicit `sql_proxy_version` is **required** in v2 mode (no legacy 'latest' alias exists for the new binary layout).
   - `start_proxy` also accepts the v2 ready-line ("ready to accept new connections") alongside the v1 one.
   - Unknown major versions are rejected with a clear error.
   
   ### 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).
   
   ```
   TestCloudSqlProxyRunner (all, incl. 6 new) .... 18 passed
   full file ..................................... 132 passed, 6 env-related failures identical on clean main (baseline-verified via git stash)
   ```
   
   ## Related
   
   Closes #72681


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Add Cloud SQL Auth Proxy v2 mode to CloudSqlProxyRunner [airflow]

Posted by "github-actions[bot] (via GitHub) via commits" <co...@airflow.apache.org>.
github-actions[bot] commented on PR #72785:
URL: https://github.com/apache/airflow/pull/72785#issuecomment-6618912285

   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.


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Add Cloud SQL Auth Proxy v2 mode to CloudSqlProxyRunner [airflow]

Posted by "shahar1 (via GitHub) via commits" <co...@airflow.apache.org>.
shahar1 closed pull request #72785: Add Cloud SQL Auth Proxy v2 mode to CloudSqlProxyRunner
URL: https://github.com/apache/airflow/pull/72785


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Add Cloud SQL Auth Proxy v2 mode to CloudSqlProxyRunner [airflow]

Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 commented on code in PR #72785:
URL: https://github.com/apache/airflow/pull/72785#discussion_r4019044381


##########
airflow-core/newsfragments/72785.significant.rst:
##########
@@ -0,0 +1,22 @@
+Google provider: ``CloudSqlProxyRunner`` can now run Cloud SQL Auth Proxy v2

Review Comment:
   Could you please remove this file? (currently we don't use newsfragments for changes in providers)



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Add Cloud SQL Auth Proxy v2 mode to CloudSqlProxyRunner [airflow]

Posted by "kokhlo (via GitHub)" <gi...@apache.org>.
kokhlo commented on PR #72785:
URL: https://github.com/apache/airflow/pull/72785#issuecomment-5740136483

   Hi @shahar1, thanks for pointing this out. I've read the guidelines on Gen-AI assisted contributions and added the AI attribution section from the PR template to the PR body above — checkbox marked and the tool specified via the `Generated-by:` line.
   
   To confirm per the guidelines: all AI-generated code was reviewed and understood before inclusion, relevant tests and static checks were run locally, and the changes are limited to the feature itself. Happy to answer any questions about the AI assistance in this PR.


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Add Cloud SQL Auth Proxy v2 mode to CloudSqlProxyRunner [airflow]

Posted by "shahar1 (via GitHub) via commits" <co...@airflow.apache.org>.
shahar1 commented on PR #72785:
URL: https://github.com/apache/airflow/pull/72785#issuecomment-6666388460

   Closing in favor of https://github.com/apache/airflow/pull/73646


-- 
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: commits-unsubscribe@airflow.apache.org

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