Skip to content

feat:Support Developer Edition connections.#2287

Open
hessjcg wants to merge 1 commit into
mainfrom
sql-data-service-public
Open

feat:Support Developer Edition connections.#2287
hessjcg wants to merge 1 commit into
mainfrom
sql-data-service-public

Conversation

@hessjcg
Copy link
Copy Markdown
Collaborator

@hessjcg hessjcg commented Jun 4, 2026

This PR adds support for Developer Edition connections via the SqlDataService. It includes a fallback mechanism to standard IP connections if the SqlDataService is not supported by the instance edition.

See GoogleCloudPlatform/cloud-sql-go-connector#1108

sqlDataClient);
}

private static class FakeSqlDataService extends SqlDataServiceGrpc.SqlDataServiceImplBase {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Create a common FakeSqlDataService class in the test source directory. Use it in ConnectorTest and SqlDataClientTest.

throw new IOException("Stream failed", error);
}

byte[] dataCopy = new byte[len];
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This dataCopy code is redundant. com.google.protobuf.ByteString.copyFrom(dataCopy) creates a copy.

try {
currentBlock = readQueue.take();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Why are we interrupting the current thread again?

"Unsupported IP type: " + type + " found in ipTypes parameter");
}
}
if (result.contains(IpType.SQL_DATA) && !hasIpType) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Remove this. The fallback behavior does not belong here in the configuration data model. Fallback should occur in Connector.java

@@ -58,6 +58,9 @@ ConnectionMetadata toConnectionMetadata(
String preferredIp = null;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Add the logic to interpret SQL_DATA as PRIVATE,PSC,PUBLIC here.

@hessjcg hessjcg force-pushed the sql-data-service-public branch from a93cb58 to 71346f2 Compare June 4, 2026 19:29
@hessjcg hessjcg force-pushed the sql-data-service-public branch from 71346f2 to ba7834e Compare June 4, 2026 20:02
@hessjcg hessjcg marked this pull request as ready for review June 4, 2026 20:44
@hessjcg hessjcg requested a review from a team as a code owner June 4, 2026 20:44
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.

2 participants