kokhlo commented on issue #72681:
URL: https://github.com/apache/airflow/issues/72681#issuecomment-5581559792

   I can take this one.
   
   The mechanism and the fix location are both laid out in the issue body: 
`providers/google/common/hooks/cloud_sql.py` hard-codes v1 URLs and builds v1 
command lines (lines 595-596 in main, unchanged through 22.4.0), and v2 has no 
backward-compatible flag set for `-dir` / `-instances` → a conditional 
command-builder that switches on `sql_proxy_version` (or a new config key 
`sql_proxy_major_version`).
   
   Plan:
   1. Extend `_start_proxy` to build different argument sets per major version 
(v1: `-dir` + `-instances`; v2: `--unix-socket` + 
`--impersonate-service-account` if present + instance connection name as 
positional).
   2. Keep the v1 download paths as default for backward compatibility; add a 
new flag/env that opts into v2 explicitly (or infers major version from 
`sql_proxy_version` when set).
   3. Unit test coverage for the command-line builder for both major versions, 
plus an integration test against Cloud SQL Auth Proxy v2 emulation (local TCP 
socket).
   4. Docs update noting that v1 is EoL and `caching_sha2_password` full auth 
requires v2.
   
   Any preference on the name for the opt-in flag (`cloud_sql_proxy_use_v2` vs 
inferring from `sql_proxy_version`)?


-- 
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]

Reply via email to