Closed luisospina-sealed closed 1 year ago
After some debugging I think this is related to missing google auth credentials. Google requires to have an environment variable GOOGLE_APPLICATION_CREDENTIALS pointing to a gcloud-service-key.json file with the credentials/key. Is there a way to specify/pass this file to the plugin?
Hi, Thanks for submitting this issue. Did you set this environment variables and its not working? So the driver is not picking it out? We dont have any specific code that tackles this situation, this is something the driver should manage (I think).
Hi @FBurguer, does the plugin use Liquibase docker internally? If so, is there a way in the plugin to copy the gcloud-service-key.json and add an environment variable pointing to it in the container?
@luisospina-sealed - The liquibase-gradle plugin doesn't use Docker. Gradle should have access to any environment variables you set, and those would get passed through and be available to Liquibase and the Google Cloud Service as well.
If that's the case then I don't think the main problem I reported is related to the Google credentials.
Is there a way to modify Liquibase
logs level? Even if I run the task with the --debug
flag Liquibase logs will still be of INFO level. I'd probably get more info from Liquibase, the error
Something unusual has occurred to cause the driver to fail. Please report this exception.
doesn't give much information.
Does it work if you put the driver URL in quotes? I know I have seen that be an issue with similar exception errors, but not this specific one.
@luisospina-sealed this looks like it is likely an issue related to Gradle, and not Liquibase specifically. I am reaching out to someone over there to see how we can best help.
notes from conversation with @nvoxland : gradle extension isn't managing log set up based on gradle level configuration like it should. This needs to be fixed on this end in the liquibase-gradle extension
@luisospina-sealed The --debug
option tells Gradle to log in debug mode, but not Liquibase.
The Liquibase Gradle plugin acts as a thin wrapper around the Liquibase CLI, translating any methods in the activities
block of build.gradle into Liquibase CLI options, so adding logLevel 'debug'
to the activity in build.gradle will turn on debug loging in Liquibase. One advantage to this approach is that we can get debug logging from Liquibase without having to also see the debug logs from Gradle itself.
I'm not sure it would make sense to automatically set the debug flag in Liquibase when using --debug
. The philosophical question is this: when we run gradle in debug mode, does that mean we also want everything it runs to also be in debug mode? For example running gradlew --debug bootRun
in a Spring Boot application does not enable debug logging in the application being run. I suspect that there are few things that cascade gradle's debug flag into the things it runs.
From the Maven plugin side, we have the Liquibase MavenLogger go through the maven-configured logger. The end result is that the -X
maven setting (which seems to correspond to --debug in gradle, right?) ends up enabling FINE level logging from liquibase.
I don't think the original issue is related to the Gradle plugin, so I'm going to close this issue. The question of having the this plugin inherit logging from Gradle is a separate issue.
Out of curiousity, @nvoxland Does the Maven Spring Boot plugin also inherit logging from the -X
setting?
I'm trying to use the plugin to perform the migrations using liquibase against a Postgres DB inside Google Cloud (Google cloud SQL instance). This connection requires to setup a secure socket which is provided by Gradle dependency com.google.cloud.sql:postgres-socket-factory:1.7.0
I'm able to connect to the DB using my application, but when trying to use liquibase plugin the following error occurs:
The error Something unusual has occurred to cause the driver to fail. Please report this exception. doesn't say much Once again, I'm able to connect to the DB using the same JDBC URL and credentials, but the error comes when trying to do so using Liquibase