Skip to content

Comments

Add cloudSqlInstance extraction for PostgreSQL sockets#401

Merged
davideme merged 1 commit intomainfrom
codex/add-postgresql-socket-factory
Feb 20, 2026
Merged

Add cloudSqlInstance extraction for PostgreSQL sockets#401
davideme merged 1 commit intomainfrom
codex/add-postgresql-socket-factory

Conversation

@davideme
Copy link
Owner

Summary

  • ensure the JDBC configuration sets cloudSqlInstance when a unix socket path is provided for both Java and Kotlin datasources
  • add helper logic/tests that deduplicate the instance extraction and assert the new property is applied alongside existing cloud SQL options

Testing

  • Not run (not requested)

Copilot AI review requested due to automatic review settings February 20, 2026 15:10
Copy link
Contributor

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

This PR adds support for extracting and setting the cloudSqlInstance property from Unix socket paths for Google Cloud SQL connections in both Java and Kotlin implementations. This ensures proper JDBC configuration when connecting to Cloud SQL using Unix domain sockets.

Changes:

  • Added extractCloudSqlInstance helper methods in both Java and Kotlin to parse the instance connection name from Unix socket paths
  • Updated configureCloudSqlProperties methods to set the cloudSqlInstance datasource property
  • Added comprehensive tests verifying the new property is correctly set alongside existing Cloud SQL configuration

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/java/src/main/java/org/openapitools/config/DataSourceConfig.java Added extractCloudSqlInstance method to extract instance name from Unix socket path and set cloudSqlInstance property
src/java/src/test/java/org/openapitools/config/DataSourceConfigTest.java Updated existing tests to verify cloudSqlInstance property is set correctly
src/kotlin/src/main/kotlin/com/lampcontrol/database/DatabaseFactory.kt Added extractCloudSqlInstance method to extract instance name from Unix socket path and set cloudSqlInstance property
src/kotlin/src/test/kotlin/com/lampcontrol/database/DatabaseFactoryTest.kt Added new test to verify cloudSqlInstance property extraction and configuration

@davideme davideme merged commit 7bd1391 into main Feb 20, 2026
12 checks passed
@davideme davideme deleted the codex/add-postgresql-socket-factory branch February 20, 2026 15:15
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.

1 participant