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

chore: bump Go Connector to v1.14.0 #5086

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jackwotherspoon
Copy link
Contributor

The Cloud SQL Go Connector just released a new version in which it fixed
some issues related to non-GDU environments.

Bumping version in Cloud SQL samples to get this fix propagated.

Also fixing mysql and sqlserver pointing at improper path.

@jackwotherspoon jackwotherspoon requested review from a team as code owners January 15, 2025 21:40
@jackwotherspoon jackwotherspoon self-assigned this Jan 15, 2025
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jan 15, 2025
Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jackwotherspoon, reviewers, and future viewers,

I'm Gemini, and I'm currently reviewing this pull request. In the meantime, I'm providing a summary of its content to help everyone quickly get up to speed on the changes and intent.

This pull request, "chore: bump Go Connector to v1.14.0", aims to update the Cloud SQL Go Connector version used in the golang-samples repository to v1.14.0. This new version includes fixes for issues related to non-GDU environments. Additionally, the PR addresses incorrect paths in the mysql and sqlserver samples.

Here's a breakdown of the changes:

  • Dependency Update: The go.mod files for both the MySQL and PostgreSQL samples have been updated to use cloud.google.com/go/cloudsqlconn v1.14.0.
  • Dockerfile Updates: The Dockerfile for both MySQL and SQL Server samples have been updated to use golang:1.22-bookworm as the base image (previously golang:1.21-bookworm). Specifically, line 18 in both cloudsql/mysql/database-sql/Dockerfile and cloudsql/postgres/database-sql/Dockerfile and cloudsql/sqlserver/database-sql/Dockerfile changed from FROM golang:1.21-bookworm to FROM golang:1.22-bookworm.
  • Import Path Correction: The functions.go file for MySQL has been corrected to import the correct path for the cloudsql package. Specifically, line 19 in cloudsql/mysql/database-sql/cmd/functions/functions.go changed from cloudsql "github.com/GoogleCloudPlatform/golang-samples/cloudsql/postgres/database-sql" to cloudsql "github.com/GoogleCloudPlatform/golang-samples/cloudsql/mysql/database-sql", and similarly for the SQL Server sample, line 19 in cloudsql/sqlserver/database-sql/cmd/functions/functions.go changed from cloudsql "github.com/GoogleCloudPlatform/golang-samples/cloudsql/postgres/database-sql" to `cloudsql "github.com/GoogleCloudPlatform/golang-samples/cloudsql/sqlserver/database-sql".
  • go.sum Updates: Numerous updates to go.sum files across all three databases (MySQL, PostgreSQL, and SQL Server) reflect the dependency updates and Go version bump. These changes are extensive and detailed in the diff. The most significant changes include updating the versions of cloud.google.com/go/auth, cloud.google.com/go/auth/oauth2adapt, cloud.google.com/go/compute/metadata, github.com/go-logr/logr, github.com/google/s2a-go, github.com/googleapis/enterprise-certificate-proxy, github.com/googleapis/gax-go/v2, github.com/jackc/pgx/v5, golang.org/x/crypto, golang.org/x/net, golang.org/x/oauth2, golang.org/x/sys, golang.org/x/text, golang.org/x/time, google.golang.org/api, google.golang.org/genproto/googleapis/rpc, and google.golang.org/grpc.

I'll have a more detailed review shortly.

Meanwhile, here's a little something to brighten your day:

Version bumped high,
Fixes flow like a clear stream,
Code now runs so smooth.

Copy link

@code-review-assist code-review-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request bumps the Google Cloud SQL Go Connector to v1.14.0, addressing issues in non-GDU environments and correcting improper paths in the MySQL and SQLServer samples. The changes are well-structured and address the stated goals. Bumping the Go version to 1.22 is a good practice and aligns with the latest stable release. The dependency updates in the go.mod files are appropriate and contribute to maintaining a secure and up-to-date codebase.

@jackwotherspoon
Copy link
Contributor Author

@telpirion it looks like this PR is having issues because I updated the Cloud SQL go.mod files to use Go 1.22...

I see that the top level go.work has Go 1.21, is there a clean way to have the Cloud SQL samples use Go 1.22 currently?

v1.14.0 of the Cloud SQL Go Connector dropped support for Go 1.21

@telpirion telpirion self-assigned this Jan 16, 2025
@telpirion
Copy link
Collaborator

@telpirion it looks like this PR is having issues because I updated the Cloud SQL go.mod files to use Go 1.22...

I see that the top level go.work has Go 1.21, is there a clean way to have the Cloud SQL samples use Go 1.22 currently?

v1.14.0 of the Cloud SQL Go Connector dropped support for Go 1.21

@muncus is working to bump our minVer to 1.22. We should have you all set in a moment.

@muncus
Copy link
Collaborator

muncus commented Jan 16, 2025

testing takes a while for these version updates, but pr #5093 is in the works to fix this.

@muncus
Copy link
Collaborator

muncus commented Jan 17, 2025

Our minimum version is now 1.22, so once you've merged the conflicted files, the tests should work for you. LMK if you still have trouble.

@jackwotherspoon
Copy link
Contributor Author

Our minimum version is now 1.22, so once you've merged the conflicted files, the tests should work for you. LMK if you still have trouble.

@muncus Looks like for some reason I am having issues even after merging main in 👀

@muncus
Copy link
Collaborator

muncus commented Jan 17, 2025

oops, looks like I missed a spot. I'll get that fixed up asap. thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants