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: Spring Cloud AlloyDB integration #2787

Conversation

ttosta-google
Copy link
Contributor

This PR adds a component to allow our customers to connect to Google Cloud AlloyDB instances using Spring Boot with the Java Connector integration.

It includes a starter, autoconfigure, sample, associated integrations tests and documentation.

Issue related: GoogleCloudPlatform/alloydb-java-connector#151

@ttosta-google
Copy link
Contributor Author

@meltsufin This PR is ready for review.

For the integration tests, we need to create a AlloyDB cluster and instance right? Can you create them?

@meltsufin
Copy link
Member

Was spring-cloud-gcp-starters/effective-pom.xml added accidentally? It's making the PR look huge!

@ttosta-google
Copy link
Contributor Author

It was. I will remove it.

Co-authored-by: Burke Davison <40617934+burkedavison@users.noreply.github.com>

You will create a cluster and primary instance, a database within the instance, populate the database and then query it.

== Setup
Copy link
Member

Choose a reason for hiding this comment

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

I was able to get the sample working, but connection gave me a bit of struggle. @ttosta-google helped me understand that I either needed to run the sample from a VM within my created VPC, or enable the AlloyDB instance's for external connections.

Could there be a small section in this setup describing this expectation, and perhaps linking to https://cloud.google.com/alloydb/docs/connect-external or perhaps using the "Quickstart: Connect from Cloud Run" as the linked Quickstart instead of "Quickstart: Create and connect to a database"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. I will add a new section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

@burkedavison
Copy link
Member

@meltsufin : Is there a way to force the integration tests to run, given that this PR is being opened from a forked repo?

Otherwise, @ttosta-google we may need you to direct this PR to a new branch in this repo, then create a PR from that branch to main so we can trigger the ITs.

Copy link
Member

@burkedavison burkedavison left a comment

Choose a reason for hiding this comment

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

Minor improvements + needing to figure out how to run the ITs.

docs/src/main/asciidoc/alloydb.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/alloydb.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/alloydb.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/alloydb.adoc Outdated Show resolved Hide resolved
ttosta-google and others added 2 commits April 18, 2024 12:38
Co-authored-by: Burke Davison <40617934+burkedavison@users.noreply.github.com>
Copy link

sonarcloud bot commented Apr 18, 2024

@burkedavison burkedavison changed the base branch from main to feat-alloydb-integration April 18, 2024 17:21
@burkedavison burkedavison merged commit e5d2557 into GoogleCloudPlatform:feat-alloydb-integration Apr 18, 2024
11 checks passed
@burkedavison
Copy link
Member

New PR will be opened from feat-alloydb-integration to main to allow the ITs to run.

burkedavison pushed a commit that referenced this pull request Apr 23, 2024
* feat: Spring Cloud AlloyDB integration

* chore: add empty line

* chore: code review
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.

None yet

3 participants