Plugin reports success even if changesets fail #3

Closed
stevesaliman opened this Issue Aug 30, 2012 · 3 comments

Comments

Projects
None yet
3 participants
@stevesaliman
Collaborator

stevesaliman commented Aug 30, 2012

When a changeset fails for whatever reason, a stack trace is printed on the console, but Gradle reports a successful build. Aside from being an incorrect status, this can cause issues. For example, suppose you have a CI server set to build and test your project. If the "gradle update" fails, ther's no sense trying to run the project's tests, but that is currently what would happen because the Liquibase plugin didn't report a failure.

I think the heart of the matter is in Main.java around lines 136 and again about 20 lines later. In both cases, we're in a catch block where the exception is logged, then eaten. I think the exception should be thrown so that Gradle registers this as a failure. If we throw the exception out to Gradle, we might not need to log the exception, which would clean up the code even further. Even cleaner still, we could skip the whole try/catch thing altogether since we need to throw exceptions to get Gradle to report failure anyway.

What do you think?

Steve

PS: I would have taken a stab at fixing the issue and issuing a pull request, but version 0.7-SNAPSHOT always fails, reporting "could not find method changelogs() for arguments..." when I try to run it, and that error was beyond my limited Gradle expertise to fix.

@rsshilli

This comment has been minimized.

Show comment Hide comment
@rsshilli

rsshilli Oct 4, 2012

I have the same problem. This is a real problem for us because after that, our Sphinx Indexer runs and fills the screen so you don't even see it visually unless you scroll up.

rsshilli commented Oct 4, 2012

I have the same problem. This is a real problem for us because after that, our Sphinx Indexer runs and fills the screen so you don't even see it visually unless you scroll up.

@mmollaverdi

This comment has been minimized.

Show comment Hide comment
@mmollaverdi

mmollaverdi Aug 31, 2013

Same problem here

Same problem here

@stevesaliman

This comment has been minimized.

Show comment Hide comment
@stevesaliman

stevesaliman Jun 15, 2014

Collaborator

This is now fixed in release 1.0.0

Collaborator

stevesaliman commented Jun 15, 2014

This is now fixed in release 1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment