Skip to content

Upgrade Cloud SQL Proxy to v2 for tests #13123

Open
@jackwotherspoon

Description

@jackwotherspoon

The testing infrastructure starts the Cloud SQL Proxy (v1) prior to running tests:

# Run Cloud SQL proxy (background process exit when script does)
wget --quiet https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 \
-O ${HOME}/cloud_sql_proxy && chmod +x ${HOME}/cloud_sql_proxy
${HOME}/cloud_sql_proxy -instances="${MYSQL_INSTANCE}"=tcp:3306,"${MYSQL_INSTANCE}" -dir "${HOME}" &>> \
${HOME}/cloud_sql_proxy.log &
echo -e "\Cloud SQL proxy started for MySQL."
${HOME}/cloud_sql_proxy -instances="${POSTGRES_INSTANCE}"=tcp:5432,"${POSTGRES_INSTANCE}" -dir "${HOME}" &>> \
${HOME}/cloud_sql_proxy-postgres.log &
echo -e "\Cloud SQL proxy started for Postgres."
${HOME}/cloud_sql_proxy -instances="${SQLSERVER_INSTANCE}"=tcp:1433 &>> \
${HOME}/cloud_sql_proxy-sqlserver.log &
echo -e "\Cloud SQL proxy started for SQL Server."

The Cloud SQL Proxy (v2) was released on Jan 17, 2023. Latest is now v2.15.0 and is highly recommended over v1 usage.

The v2 has numerous new features and improvements over v1 such as debug logging,
lazy refresh, PSC connections, non-GDU environments, metrics and tracing, etc.

There is a migration guide that can be used to help with the CLI changes required to migrate.

Should also clean up any stale usage of v1 Proxy in this repo, which can be found by looking
for cloud_sql_proxy as the v2 Proxy binary is cloud-sql-proxy.

Metadata

Metadata

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.samplesIssues that are directly related to samples.type: cleanupAn internal cleanup or hygiene concern.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions