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

feat: add support for configuring Admin API URL #1617

Merged
merged 4 commits into from
Oct 16, 2023

Conversation

ttosta-google
Copy link
Collaborator

Fixes #1587

@ttosta-google
Copy link
Collaborator Author

Note: I will update docs/jdbc.md once the PR #1605 is merged.

Copy link
Member

@enocom enocom left a comment

Choose a reason for hiding this comment

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

Do we want to keep service path? I believe we don't use that in any meaningful way in this project or any other connectors.

Copy link
Collaborator

@hessjcg hessjcg left a comment

Choose a reason for hiding this comment

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

I've requested some minor changes to the documentation. The implementation looks great! Nice work.

private static final Pattern GENERATE_EPHEMERAL_CERT_PATTERN =
Pattern.compile(
".*/sql/v1beta4/projects/(?<project>.*)/instances/(?<instance>.*):generateEphemeralCert");
"(?<baseUrl>.*)sql/v1beta4/projects/(?<project>.*)/instances/(?<instance>.*):generateEphemeralCert");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice. This is as good as an integration test, since it actually exercises the http client.

return adminRootUrl;
}

public String getlAdminServicePath() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is a typo. Maybe it should be getAdminServicePath

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for catching that. Updated.

docs/r2dbc.md Outdated
### Example

```java
ConnectionFactoryOptions options=ConnectionFactoryOptions.builder()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated.

docs/r2dbc.md Show resolved Hide resolved
@ttosta-google
Copy link
Collaborator Author

Do we want to keep service path? I believe we don't use that in any meaningful way in this project or any other connectors.

I don't have a preference. I could remove it. @hessjcg what do you think?

@enocom
Copy link
Member

enocom commented Oct 16, 2023

For historical reasons we've always used v1beta4, even though there's a v1. This is to ensure v1beta4 continues to work, given the significant customer usage.

Copy link
Collaborator

@hessjcg hessjcg left a comment

Choose a reason for hiding this comment

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

LGTM. Nice work!

docs/r2dbc.md Show resolved Hide resolved
@hessjcg
Copy link
Collaborator

hessjcg commented Oct 16, 2023

Do we want to keep service path? I believe we don't use that in any meaningful way in this project or any other connectors.

I think we providecloudSqlAdminApiServicePath for consistency with the underlying Java API. This leaves all options open for our customers who need this feature.

@ttosta-google ttosta-google merged commit bd2f0ce into main Oct 16, 2023
16 checks passed
@ttosta-google ttosta-google deleted the support-set-admin-api-url branch October 16, 2023 18:43
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.

Add support for configuring Admin API URL
3 participants