0
votes

I'm trying to setup Flyway for Google Cloud Spanner (beta) using the flyway gradle plugin but it gets the error below when executing ./gradlew flywayinfo.

> Error occured while executing flywayInfo
  No database found to handle jdbc:cloudspanner:/projects/<my-project>/instances/<my-instance>/databases/<my-db>

build.gradle

plugins {
 id 'java'
 id 'org.flywaydb.flyway' version '7.13.0'
}

...

dependencies {
 implementation(
  'org.flywaydb:flyway-gcp-spanner:7.13.0-beta'
 )
}

flyway {
 url = 'jdbc:cloudspanner:/projects/<my-project>/instances/<my-instance>/databases/<my-db>'
}

The values in the url correspond to my project and instance names.

I've also tried:

  • using a service account key in the end of the URL
  • adding the com.google.cloud:google-cloud-spanner-jdbc:2.3.2 JDBC driver dependency (implementation)
  • I'm behind a proxy but I have set it in my gradle.properties with systemProp.http.proxyHost and systemProp.http.proxyPort (also for https)

Using Flyway CLI and the API programmatically works.

1

1 Answers

-1
votes

It seems like the error comes from flyway implementation here. Your issue seems somewhat similar with https://github.com/flyway/flyway/issues/3028.

Consider opening a new issue here: https://github.com/flyway/flyway/issues