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

fix: Liquibase sample did not execute migration #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

olavloite
Copy link

The sample application does not seem to actually execute the migration. I've updated the sample and tested it locally, and with these changes it seems to execute the migration successfully.

See also cloudspannerecosystem/liquibase-spanner#74 (comment)

@sebarthel89
Copy link

Thanks for taking care ! Now, it indeed trys to execute.

Does the project work for you with this settings?

using the settings of the README I have trouble starting the serve

Caused by: io.grpc.StatusRuntimeException: NOT_FOUND: Instance not found: projects/test-project/instances/test-instance
resource_type: "type.googleapis.com/google.spanner.admin.instance.v1.Instance"
resource_name: "projects/test-project/instances/test-instance"
description: "Instance does not exist."

The service fails due to that running the tests and starting the service.

@olavloite
Copy link
Author

Thanks for taking care ! Now, it indeed trys to execute.

Does the project work for you with this settings?

using the settings of the README I have trouble starting the serve

Caused by: io.grpc.StatusRuntimeException: NOT_FOUND: Instance not found: projects/test-project/instances/test-instance
resource_type: "type.googleapis.com/google.spanner.admin.instance.v1.Instance"
resource_name: "projects/test-project/instances/test-instance"
description: "Instance does not exist."

The service fails due to that running the tests and starting the service.

Yes, it works for me, but I have to admit that I am not 100% sure in exact which order I executed all steps in the sample project. The reason that it is failing for you is that the test-instance (and also testdb) is not created on the emulator when you are running the application. If you create the instance and database on the emulator before running the sample application, it should work.

@sebarthel89
Copy link

works now for me too! Thank you. It's a bit like black magic what gcloud does, and where the emulator jumps in. Starting the emulator pretty early fixes the problem indeed.

thanks for being responsive!

I think it would be very beneficial to have a running spring boot example set up with liquibase and spanner :). I guess that's how the majority of teams would like to set up a service.

@olavloite
Copy link
Author

works now for me too! Thank you. It's a bit like black magic what gcloud does, and where the emulator jumps in. Starting the emulator pretty early fixes the problem indeed.

thanks for being responsive!

I think it would be very beneficial to have a running spring boot example set up with liquibase and spanner :). I guess that's how the majority of teams would like to set up a service.

Thanks for reporting back. And yes, I think you are right that having a working Spring Boot example is a good idea, as it is a very common setup. I'll try to look into it, and hopefully also be able to remove the glcoud magic. The newest version of the JDBC driver contains an auto-configure options for working with the emulator without the need to execute gcloud commands manually.

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

2 participants