Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Cloud SQL Proxy to v2 for tests #13123

Open
jackwotherspoon opened this issue Jan 31, 2025 · 0 comments · May be fixed by #13194
Open

Upgrade Cloud SQL Proxy to v2 for tests #13123

jackwotherspoon opened this issue Jan 31, 2025 · 0 comments · May be fixed by #13194
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. type: cleanup An internal cleanup or hygiene concern. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@jackwotherspoon
Copy link
Contributor

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.

@jackwotherspoon jackwotherspoon added priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Jan 31, 2025
@jackwotherspoon jackwotherspoon self-assigned this Jan 31, 2025
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. type: cleanup An internal cleanup or hygiene concern. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant