-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
misc: add remote visual studio code support to gceworker #73336
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nifty, thanks.
I suppose this means that the gceworker will keep running if the laptop is suspended while VSCode is open. No complaints from me, that doesn't seem terrible for the few people who use gceworkers as their main dev environment. But I've been discussing with @dt in the past some sort of dead man's switch that either keeps an open SSH session or pings the gceworker regularly, causing it to shut down when the laptop suspends, and then automatically start it back up when the laptop resumes. Just a thought.
scripts/gceworker.sh
Outdated
@@ -146,6 +150,13 @@ case "${cmd}" in | |||
-ignore 'Name *.o' \ | |||
-ignore 'Name zcgo_flags*.go' | |||
;; | |||
code) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider vscode
to make it clearer what it's for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, yeah something like that would probably be overkill for me, this just addresses I shutdown vscode but left the gceworker running problem which I do ALL THE TIME!
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @erikgrinaker)
scripts/gceworker.sh, line 153 at r1 (raw file):
Previously, erikgrinaker (Erik Grinaker) wrote…
Consider
vscode
to make it clearer what it's for.
👍
9b9f56b
to
3262c94
Compare
bors r+ |
Yeah, as mentioned, I use a something slightly different. I tend to leave vscode running for days or weeks at a time, so something like this, that only stops my worker when vscode exits, would basically be the same as just touching .active once and then never stopping it. Instead, I leave something like |
Huh, actually, now I'm wondering if this is just based on keeping the workup up until vscode quits, what does touching .active do that vscode's own ssh session to the remote server process doesn't? or do you want your worker to stay up even if your client is off/disconnected but vscode hasn't been terminated? |
Build failed (retrying...): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize the vscode ssh session was enough to keep the worker up, I guess before I was manually touch'ing .active before so I just wanted to automate deleteing it, but for my use cases I guess I can just remove the .active bits and forget about it.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @erikgrinaker)
gceworker.sh code will start the gceworker, touch /.active, start code and run a remote SSH to it. When code exits the .active will be removed. Release note: none
3262c94
to
27155a0
Compare
Canceled. |
bors r+ |
Build succeeded: |
gceworker.sh code will start the gceworker, touch /.active, start code
and run a remote SSH to it. When code exits the .active will be
removed.
Release note: none