mxschmitt / action-tmate

Debug your GitHub Actions via SSH by using tmate to get access to the runner system itself.
https://mxschmitt.github.io/action-tmate/
MIT License
2.95k stars 289 forks source link

tmate disconnects after 40 minutes #184

Open oleg-alexandrov opened 11 months ago

oleg-alexandrov commented 11 months ago

First, thank you for the useful tool. It is hard to debug things without connecting to the cloud which tmate provides.

For the last several days, however, this program is consistently timing out after 40 minutes or so. It doesn't matter if I am always actively working in it or not, if I run heavy jobs or just doing simple things. I don't exit it unintentionally either. The connection simply breaks.

Here's how it looks like: https://github.com/NeoGeographyToolkit/StereoPipeline/actions/workflows/ssh.yml

Here is how it is set up:

- name: Setup tmate session
  uses: mxschmitt/action-tmate@v3
  timeout-minutes: 600
  with:
    limit-access-to-actor: true

I think it is all legit. I put a very large timeout, and that is not the issue.

Any thoughts? Thank you.

Aniark commented 11 months ago

see #99

nilsnolde commented 9 months ago

Maybe Github changes smth and is detecting that you're not actually using it as CI, but for playing around on it? FWIW, while I love this action for exactly that, debugging, it can easily be abused and I'd argue trying to reserve a VM for 10!!! hours on free infrastructure definitely categories as abuse.

Why I actually came here: using v3 I get a

Warning: Unexpected input(s) 'timeout-minutes', valid inputs are ['sudo', 'install-dependencies', 'limit-access-to-actor', 'detached', 'tmate-server-host', 'tmate-server-port', 'tmate-server-rsa-fingerprint', 'tmate-server-ed25519-fingerprint', 'github-token']

see here

AFAIU timeout-minutes is not supposed to keep the connection open for you while you're using it, rather keeping it open while you're not using it (i.e. workflow fails but it might take you longer than the standard 10 mins to realize it).

Still, please be aware that you're playing around with actual hardware there which costs money and energy to operate. This kind of behavior, reserving machines for 10 hours for (surely) no good reason, is not only costing Github shit tons of avoidable cash, it's also hurting all of us eventually if they realize this abusive behavior and scale down their free offerings. Not to mention this costs energy, smth we should all be concerned about.