fix(coderd/agentapi): set ReadyAt for start timeout (#13846)

This commit is contained in:
Mathias Fredriksson
2024-07-09 18:55:16 +00:00
committed by GitHub
parent b07e3069dd
commit 35a808f089
4 changed files with 14 additions and 3 deletions
+3 -1
View File
@@ -98,7 +98,9 @@ func (a *LifecycleAPI) UpdateLifecycle(ctx context.Context, req *agentproto.Upda
// This agent is (re)starting, so it's not ready yet.
readyAt.Time = time.Time{}
readyAt.Valid = false
case database.WorkspaceAgentLifecycleStateReady, database.WorkspaceAgentLifecycleStateStartError:
case database.WorkspaceAgentLifecycleStateReady,
database.WorkspaceAgentLifecycleStateStartTimeout,
database.WorkspaceAgentLifecycleStateStartError:
if !startedAt.Valid {
startedAt = dbChangedAt
}