-
Notifications
You must be signed in to change notification settings - Fork 887
refactor: deprecate login_before_ready
in favor of startup_script_behavior
#7837
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE workspace_agents ADD COLUMN login_before_ready boolean NOT NULL DEFAULT TRUE; | ||
|
||
UPDATE workspace_agents SET login_before_ready = CASE WHEN startup_script_behavior = 'non-blocking' THEN TRUE ELSE FALSE END; | ||
|
||
ALTER TABLE workspace_agents DROP COLUMN startup_script_behavior; | ||
DROP TYPE startup_script_behavior; | ||
|
||
COMMENT ON COLUMN workspace_agents.login_before_ready IS 'If true, the agent will delay logins until it is ready (e.g. executing startup script has ended).'; | ||
|
||
COMMIT; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
BEGIN; | ||
|
||
CREATE TYPE startup_script_behavior AS ENUM ('blocking', 'non-blocking'); | ||
mafredri marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ALTER TABLE workspace_agents ADD COLUMN startup_script_behavior startup_script_behavior NOT NULL DEFAULT 'non-blocking'; | ||
|
||
UPDATE workspace_agents SET startup_script_behavior = (CASE WHEN login_before_ready THEN 'non-blocking' ELSE 'blocking' END)::startup_script_behavior; | ||
|
||
ALTER TABLE workspace_agents DROP COLUMN login_before_ready; | ||
|
||
COMMENT ON COLUMN workspace_agents.startup_script_behavior IS 'When startup script behavior is non-blocking, the workspace will be ready and accessible upon agent connection, when it is blocking, workspace will wait for the startup script to complete before becoming ready and accessible.'; | ||
|
||
COMMIT; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
nit: Do we need
begin
&commit
around this block?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 suppose yes, fixed. I'm sometimes on the fence since we're not consistent about always using them. We should probably always enforce it, can't think of a reason not to.