From d451c45098bf7a95b61732eeda90b3ce3aa508f2 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Wed, 25 Jan 2023 10:00:44 +0000 Subject: [PATCH 1/3] fix(site): Hide agent lifecycle unless opted in via `delay_login_until_ready` Refs: #5835 --- site/src/components/Resources/AgentStatus.tsx | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/site/src/components/Resources/AgentStatus.tsx b/site/src/components/Resources/AgentStatus.tsx index b607d3201b5a2..db513665f022f 100644 --- a/site/src/components/Resources/AgentStatus.tsx +++ b/site/src/components/Resources/AgentStatus.tsx @@ -135,22 +135,28 @@ const StartErrorLifecycle: React.FC<{ const ConnectedStatus: React.FC<{ agent: WorkspaceAgent }> = ({ agent }) => { - return ( - - - - - - - - - - - - - - - ) + // NOTE(mafredri): Keep this behind feature flag for the time-being, + // if delay_login_until_ready is true, the user has updated to + // terraform-provider-coder v0.6.7 and opted in to the functionality. + if (agent.delay_login_until_ready) { + return ( + + + + + + + + + + + + + + + ) + } + return } const DisconnectedStatus: React.FC = () => { From 594448180285d7e49ecdb030f9077dbebfbe38be Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Wed, 25 Jan 2023 10:28:41 +0000 Subject: [PATCH 2/3] fixup! fix(site): Hide agent lifecycle unless opted in via `delay_login_until_ready` --- site/src/components/Resources/AgentStatus.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site/src/components/Resources/AgentStatus.tsx b/site/src/components/Resources/AgentStatus.tsx index db513665f022f..dd473a53480a5 100644 --- a/site/src/components/Resources/AgentStatus.tsx +++ b/site/src/components/Resources/AgentStatus.tsx @@ -138,6 +138,10 @@ const ConnectedStatus: React.FC<{ // NOTE(mafredri): Keep this behind feature flag for the time-being, // if delay_login_until_ready is true, the user has updated to // terraform-provider-coder v0.6.7 and opted in to the functionality. + // + // Remove check once documentation is in place and we we do a breaking + // release indicating startup script behavior has changed. + // https://github.com/coder/coder/issues/5749 if (agent.delay_login_until_ready) { return ( From ef53fd73ca3b8c0b3173fa36fd5814ff74a42cbf Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Wed, 25 Jan 2023 12:46:38 +0200 Subject: [PATCH 3/3] Update site/src/components/Resources/AgentStatus.tsx --- site/src/components/Resources/AgentStatus.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/components/Resources/AgentStatus.tsx b/site/src/components/Resources/AgentStatus.tsx index dd473a53480a5..0ab12ffdc95ae 100644 --- a/site/src/components/Resources/AgentStatus.tsx +++ b/site/src/components/Resources/AgentStatus.tsx @@ -139,7 +139,7 @@ const ConnectedStatus: React.FC<{ // if delay_login_until_ready is true, the user has updated to // terraform-provider-coder v0.6.7 and opted in to the functionality. // - // Remove check once documentation is in place and we we do a breaking + // Remove check once documentation is in place and we do a breaking // release indicating startup script behavior has changed. // https://github.com/coder/coder/issues/5749 if (agent.delay_login_until_ready) {