Skip to content

plugin: Add a new importer/exporter type for Google Cloud.#2

Merged
mathieu-plak merged 8 commits into
mainfrom
mm/gce_proxy
Apr 30, 2026
Merged

plugin: Add a new importer/exporter type for Google Cloud.#2
mathieu-plak merged 8 commits into
mainfrom
mm/gce_proxy

Conversation

@mathieu-plak
Copy link
Copy Markdown
Contributor

@mathieu-plak mathieu-plak commented Apr 28, 2026

  • Adds a new importer/exporter prototype, mysql+gcsql that uses the Cloud SQL proxy in order to make connection more user friendly.

  • It works at two level, first by registering a new sql Driver for any database/sql usage. And then for mysqldump/mysqlimport it uses the library to dial to a localhost:$RANDOMPORT and points the binary to this.

* Adds a new importer/exporter prototype, mysql+gce that uses the Cloud
  SQL proxy in order to make connection more user friendly.

* It works at two level, first by registering a new sql Driver for any
  database/sql usage. And then for mysqldump/mysqlimport it uses the
  library to dial to a localhost:$RANDOMPORT and points the binary to
  this.
Comment thread mysqlconn/conn.go
Comment thread mysqlconn/conn.go
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new MySQL connector variant intended for Google Cloud SQL by introducing proxy-backed importer/exporter binaries and extending connection handling to support a Cloud SQL dialer/proxy path.

Changes:

  • Add new mysql-proxy-importer / mysql-proxy-exporter plugin binaries and register protocol mysql+gcsql.
  • Extend mysqlconn.ConnConfig / ParseConnConfig to optionally set up a Cloud SQL proxy and add a Cloud SQL DSN path for database/sql.
  • Update build/test Dockerfiles, Makefile, manifest, and docs to include the new binaries/protocol.

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/plakar-mysql.Dockerfile Builds the new proxy plugin binaries into the test image and adjusts source path.
tests/plakar-mariadb.Dockerfile Same as above for the MariaDB test image build context.
plugin/mysql-proxy-importer/mysql-proxy-importer.go New importer entrypoint using ParseConnConfig(true, ...) for Cloud SQL proxy mode.
plugin/mysql-proxy-exporter/mysql-proxy-exporter.go New exporter entrypoint using ParseConnConfig(true, ...) for Cloud SQL proxy mode.
plugin/mysql-importer/mysql-importer.go Updates ParseConnConfig call signature for non-proxy mode.
plugin/mysql-exporter/mysql-exporter.go Updates ParseConnConfig call signature for non-proxy mode.
plugin/mariadb-importer/mariadb-importer.go Updates ParseConnConfig call signature for non-proxy mode.
plugin/mariadb-exporter/mariadb-exporter.go Updates ParseConnConfig call signature for non-proxy mode.
mysqlconn/conn.go Implements proxy setup + Cloud SQL DSN generation and flags on ConnConfig.
manifest/metadata.go Switches openDB to use a different DSN/driver when SqlCloud is enabled.
manifest.yaml Registers the new importer/exporter and protocol mysql+gcsql.
go.mod Adds Cloud SQL connector dependency and updates module versions / Go version directive.
go.sum Updates sums for new and upgraded dependencies.
README.md Documents mysql+gcsql:// protocol and intended behavior.
Makefile Builds/cleans the new proxy binaries.
.gitignore Ignores newly built proxy binaries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread mysqlconn/conn.go
Comment thread mysqlconn/conn.go
Comment thread mysqlconn/conn.go
Comment thread mysqlconn/conn.go
Comment thread manifest/metadata.go Outdated
Comment thread manifest.yaml Outdated
@mathieu-plak mathieu-plak merged commit cdbe6fa into main Apr 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants