vertx-gradle-plugin icon indicating copy to clipboard operation
vertx-gradle-plugin copied to clipboard

Don't recommend --no-daemon

Open oehme opened this issue 8 years ago • 8 comments

Users should never have to use --no-daemon, it makes builds very slow. I don't quite understand what problem this section in the readme is about, but we should fix the root cause instead:

If you encounter issues with your application still being running in the background due to how the Gradle caching works, then you may try running the vertxRun task with gradle --no-daemon vertxRun.

oehme avatar Jan 09 '18 15:01 oehme

I've experienced before sporadic cases where the background job wasn't killed on redeployments, and we've had occasional reports like this.

jponge avatar Jan 10 '18 12:01 jponge

How do you start the background job? How/when do you stop it?

oehme avatar Jan 10 '18 14:01 oehme

vertxRun starts a job (JavaExec), it gets killed with a good old signal.

On Wed, Jan 10, 2018 at 3:12 PM, Stefan Oehme [email protected] wrote:

How do you start the background job? How/when do you stop it?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jponge/vertx-gradle-plugin/issues/12#issuecomment-356613236, or mute the thread https://github.com/notifications/unsubscribe-auth/AABlab_0yWUrCoJoxTyupNVZCOcktklzks5tJMU-gaJpZM4RYCVF .

jponge avatar Jan 10 '18 14:01 jponge

Can you point me at the code where you send the signal before you start the next one?

oehme avatar Jan 10 '18 14:01 oehme

We are just starting a JavaExec task with vertxRun: https://github.com/jponge/vertx-gradle-plugin/blob/master/src/main/kotlin/io/vertx/gradle/VertxPlugin.kt#L144

On Wed, Jan 10, 2018 at 3:26 PM, Stefan Oehme [email protected] wrote:

Can you point me at the code where you send the signal before you start the next one?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jponge/vertx-gradle-plugin/issues/12#issuecomment-356617338, or mute the thread https://github.com/notifications/unsubscribe-auth/AABlaXh_RwnwOl22QmXQ3zYhPn-i6Fmtks5tJMiOgaJpZM4RYCVF .

jponge avatar Jan 10 '18 14:01 jponge

Okay, so the the task blocks Gradle from finishing the build and basically just waits for a kill signal. And you are sometimes seeing Gradle cancel the build on the kill, but the exec task not finishing?

oehme avatar Jan 10 '18 14:01 oehme

In general it just works... it's very sporadic :-)

On Wed, Jan 10, 2018 at 3:48 PM, Stefan Oehme [email protected] wrote:

Okay, so the the task blocks Gradle from finishing the build and basically just waits for a kill signal. And you are sometimes seeing Gradle cancel the build on the kill, but the exec task not finishing?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jponge/vertx-gradle-plugin/issues/12#issuecomment-356623937, or mute the thread https://github.com/notifications/unsubscribe-auth/AABlaYYuw30oCrqUV0_KEq_cocTA3OJvks5tJM2wgaJpZM4RYCVF .

jponge avatar Jan 10 '18 14:01 jponge

Thanks for the explanation - sounds like a race condition in the build cancellation code.

oehme avatar Jan 10 '18 14:01 oehme