feat:Support Developer Edition connections.#2287
Open
hessjcg wants to merge 1 commit into
Open
Conversation
hessjcg
commented
Jun 4, 2026
| sqlDataClient); | ||
| } | ||
|
|
||
| private static class FakeSqlDataService extends SqlDataServiceGrpc.SqlDataServiceImplBase { |
Collaborator
Author
There was a problem hiding this comment.
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]; |
Collaborator
Author
There was a problem hiding this comment.
This dataCopy code is redundant. com.google.protobuf.ByteString.copyFrom(dataCopy) creates a copy.
| try { | ||
| currentBlock = readQueue.take(); | ||
| } catch (InterruptedException e) { | ||
| Thread.currentThread().interrupt(); |
Collaborator
Author
There was a problem hiding this comment.
Why are we interrupting the current thread again?
| "Unsupported IP type: " + type + " found in ipTypes parameter"); | ||
| } | ||
| } | ||
| if (result.contains(IpType.SQL_DATA) && !hasIpType) { |
Collaborator
Author
There was a problem hiding this comment.
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; | |||
|
|
|||
Collaborator
Author
There was a problem hiding this comment.
Add the logic to interpret SQL_DATA as PRIVATE,PSC,PUBLIC here.
a93cb58 to
71346f2
Compare
71346f2 to
ba7834e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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