Bug with Gradle Daemon relaunching between runs

This is directly related to OLMIS-729.

I have been investigating the mentioned issue, and it turned out it is a known bug in Gradle.

When a task is terminated with ctrl+c (which is a usual way to shutdown bootRun task), the Gradle Daemon process also gets killed.

I followed some discussions about this issue, and this behavior seems to be an intended design choice, and for now the developers do not plan to change the way it works, in future they may offer another command that will try to cancel the build first (not forcing kill), which would also keep the daemon alive.

At the moment, we could only solve the issue by using their Tooling API to create a separate way to cancel the task instead of killing it, but we will probably not be able to achieve simple CLI solution.

Gradle Issue: https://issues.gradle.org/browse/GRADLE-3083

Related discussion with devs: https://discuss.gradle.org/t/ctrl-c-during-running-build-also-kills-daemon/10158

Thanks Paweł for looking into it. Please update OLMIS-729 with your findings.
Team: is this issue causing any deleterious effects? If it is indeed minor, then I suggest we toss this back into the backlog.

Rich

···

On Tuesday, July 19, 2016 at 8:02:34 AM UTC-7, pnawrocki wrote:

This is directly related to OLMIS-729.

I have been investigating the mentioned issue, and it turned out it is a known bug in Gradle.

When a task is terminated with ctrl+c (which is a usual way to shutdown bootRun task), the Gradle Daemon process also gets killed.

I followed some discussions about this issue, and this behavior seems to be an intended design choice, and for now the developers do not plan to change the way it works, in future they may offer another command that will try to cancel the build first (not forcing kill), which would also keep the daemon alive.

At the moment, we could only solve the issue by using their Tooling API to create a separate way to cancel the task instead of killing it, but we will probably not be able to achieve simple CLI solution.

Gradle Issue: https://issues.gradle.org/browse/GRADLE-3083

Related discussion with devs: https://discuss.gradle.org/t/ctrl-c-during-running-build-also-kills-daemon/10158

I’m moving it to the backlog for now.

Regards,

Paweł

···

On 19.07.2016 19:57, Rich Magnuson wrote:

Thanks Paweł for looking into it. Please update OLMIS-729 with your findings.
Team: is this issue causing any deleterious effects? If it is indeed minor, then I suggest we toss this back into the backlog.

Rich

      On Tuesday, July 19, 2016 at 8:02:34 AM UTC-7, pnawrocki wrote:

This is directly related to OLMIS-729.

            I have been investigating the mentioned issue, and it turned out it is a known bug in Gradle.
            When a task is terminated with ctrl+c (which is a usual way to shutdown bootRun task), the Gradle Daemon process also gets killed.
            I followed some discussions about this issue, and this behavior seems to be an intended design choice, and *for now* the developers do not plan to change the way it works, in future they may offer another command that will try to cancel the build first (not forcing kill), which would also keep the daemon alive.
            At the moment, we could only solve the issue by using their Tooling API to create a *separate* way to *cancel*                 the task instead of killing it, but we will probably not be able to achieve simple CLI solution.
            Gradle Issue: [https://issues.gradle.org/browse/GRADLE-3083](https://issues.gradle.org/browse/GRADLE-3083)

Related discussion with devs: https://discuss.gradle.org/t/ctrl-c-during-running-build-also-kills-daemon/10158

  You received this message because you are subscribed to the Google Groups "OpenLMIS Dev" group.

  To unsubscribe from this group and stop receiving emails from it, send an email to openlmis-dev+unsubscribe@googlegroups.com.

  To post to this group, send email to openlmis-dev@googlegroups.com.

  To view this discussion on the web visit [https://groups.google.com/d/msgid/openlmis-dev/da54e974-bf5c-4324-9ae7-2fc6fce63653%40googlegroups.com](https://groups.google.com/d/msgid/openlmis-dev/da54e974-bf5c-4324-9ae7-2fc6fce63653%40googlegroups.com?utm_medium=email&utm_source=footer).

  For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).