-
Notifications
You must be signed in to change notification settings - Fork 321
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
feat(proposal): runonce scripts, eqivalent to .bashrc.d
but runs only once without any race conditions between several terminals
#1104
base: main
Are you sure you want to change the base?
Conversation
.bashrc.d
but runs only once without any race conditions between several terminals
.bashrc.d
but runs only once without any race conditions between several terminals.bashrc.d
but runs only once without any race conditions between several terminals
Overall it looks good, but it seems we've added too many tricks to bashrc that don't seem regular |
@iQQBot would it make sense to sync with @axonasif , to talk about next steps? @axonasif I'm not sure if the IDE team planned on this work? suggestion: flip this back to draft, and plan next steps with @iQQBot in the context of a Linear issue, in the IDE team, but assigned to @axonasif. cc: @laushinka |
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.
Deferring to @iQQBot for now, cc @laushinka
edit: please re-request my review, or team workspace, as needed
Thanks for mentioning, Kyle! @axonasif Thank you for the initiative 👍🏽 As per Kyle's suggestion, Asif would you mind putting the issue to the IDE team's Triage? |
Description
As IDEs start without loading the login shell for quick startup, previous assumptions about race condition between
.bashrc.d
startup scripts are not ideal anymore. This introduces a new directory alongside.bashrc.d
called.runonce
. Scripts placed inside$HOME/.runonce
will be executed once in the lifecycle of a workspace, and all task terminals will wait for.runonce
scripts to complete before proceeding to execute the.gitpod.yml
task commands. While scripts placed inside$HOME/.bashrc.d
are used for modifying the shell environment (e.g. exporting env vars) each time a terminal is created and not for starting services.This PR only migrates the VNC startup to
.runonce
. I plan to create a followup PR to migrate rust, dotnet, mysql, postgres, vnc and yugabyte startup scripts as well (see axonasif@7907f57).Related Issue(s)
Fixes #1067, gitpod-io/gitpod#18491, slack report, frontapp ticket.
How to test
Open https://gitpod.io/#https://github.com/axonasif/test/tree/vnc_test and check if all task terminals are attempting to start the vnc service.
Or if you want to emulate the race-condition environment from your existing workspace:
Documentation
/hold