-
Notifications
You must be signed in to change notification settings - Fork 86
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
Stop Gradle Deamons on-demand #342
Conversation
Thanks for the contribution. I'm curious about your use case:
I'm concerned that there a bunch of places in the code where it is assumed that a Job starts with a fresh state. |
So basically we have a single physical host that has 6 runners configured under a single user. |
@milis92 Thanks for the info. I have more questions that will inform any additional work we need to for your use case:
|
Regarding the functionality added by your PR, I'd prefer to avoid having a configuration option and instead to only stop the daemon processes when it's required to save the Gradle User Home directory. It would be pretty simple to change |
No, its a out-of-the-box MacMini with MacOs (Monterey)
Yes, they all have their isolated workspaces and temp directories, managed completely by the runners (we are not cleaning up anything before/after the run) This is how it looks flowchart LR
subgraph h[HOST]
direction TB
gh(("~/.gradle"))
subgraph r1["action_runner_1"]
direction TB
w1[_work]
t1[_temp]
end r1
subgraph r2 ["action_runner_2"]
direction TB
w2[_work]
t2[_temp]
end r2;
subgraph r3 ["action_runner_3"]
direction TB
w3[_work]
t3[_temp]
end r3
r1 --> gh
r2 --> gh
r3 --> gh
end h
Nope, this shouldn't happen. Each run is supposed to start with a clean environment. The only thing thats preconfigured is |
Yeah, this seems like a better approach. Having an extra config param was more of a quick fix ;) |
Thanks so much for the details @milis92. I'm completely unfamiliar with self-hosted runners (until now). One potential issue I can see is if
For now, I'm going to assume things are working as expected for self-hosted runners, as I don't currently have the capacity to set this up for testing. Please report any issues that you find. Thanks. |
Yes there are, and I think it makes sense not to stop Gradle daemons in these cases. |
Signed-off-by: Ivan Milisavljevic <cartman.dev@gmail.com>
…GRADLE_HOME is going to be cached Signed-off-by: Ivan Milisavljevic <cartman.dev@gmail.com>
From the docs on RUNNER_TEMP
Job summary works well on our side, il take a deeper look and open a separate issue if I find any problems. I proposed new changes with following updates:
|
Yep, those changes are just what I'm going for in #344 |
@milis92 Apologies, looks like I jumped the gun by implementing this in a separate PR. I really appreciate you taking the time to submit this PR, and hope that you'll find time to contribute other fixes/improvements in the future. |
I stole the README text directly from your PR (with credit): 3292389 |
No worries, I'm really glad I could help. 👍 |
As stated in #341, post action step is canceling all Gradle tasks being executed on the host.
This PR gives consumers the ability to disable cancellation and keep the daemons running after-action run is completed