Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action should not stop gradle deamons started by other runners on a shared host #341

Closed
milis92 opened this issue Jun 21, 2022 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@milis92
Copy link

milis92 commented Jun 21, 2022

Stoping Gradle daemons on self-hosted non-ephermal runner is currently canceling Gradle tasks that run in other jobs or workflows even.

This is caused by the post-action step that's stoping all running daemons.

async function stopAllDaemons(gradleHomes: string[]): Promise<void> {

@bigdaz bigdaz changed the title Stoping gradle deamons on non-ephemeral runners Avoid stopping gradle deamons started by other runners on a shared host Jun 22, 2022
@bigdaz bigdaz changed the title Avoid stopping gradle deamons started by other runners on a shared host Action should not stop gradle deamons started by other runners on a shared host Jun 22, 2022
@bigdaz
Copy link
Member

bigdaz commented Jun 22, 2022

At the moment, we run gradle --stop for all Gradle versions run during the build. If multiple runners on a host share the same Gradle User Home, then this will result in stopping Gradle steps running concurrently.

While it may be considered back practise to share Gradle User Home between different runners on a host, we should avoid stopping the Gradle Daemon when the Gradle User Home directory already exists at the start of the job (in which case we don't attempt to save/restore the Gradle User Home).

@bigdaz bigdaz self-assigned this Jun 22, 2022
@bigdaz bigdaz closed this as completed in 6965e8e Jun 23, 2022
@bigdaz bigdaz added this to the v2.2.2 milestone Jun 23, 2022
@i-walker
Copy link

We've experienced this issue with 2.2.1 in several PR's with similar stack-traces like this one https://github.com/arrow-kt/arrow/runs/7498667115?check_suite_focus=true, where the Deamon is cancelled without the task being finished

@bigdaz
Copy link
Member

bigdaz commented Jul 26, 2022

@i-walker That appears to be an unrelated failure. This issue is about the daemon being stopped after the build completes, whereas your issue is that the daemon is stopping/crashing during the build.

See gradle/gradle#19750 for a possible cause of this issue.

@i-walker
Copy link

Thank you @bigdaz :D I think that was the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants