mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(cli): properly handle build log streaming during coder ping (#15600)
Closes #15584. - The `Collecting Diagnostics` spinner now starts after the workspace build logs (if any) have finished streaming. - Removes network interfaces with negative MTUs from `healthsdk` diagnostics. - Improves the wording on diagnostics for MTUs below the 'safe' value to indicate that direct connections may be degraded, or rendered unusable (i.e. if every packet is dropped).
This commit is contained in:
+6
-6
@@ -103,11 +103,6 @@ func (r *RootCmd) ping() *serpent.Command {
|
||||
ctx, cancel := context.WithCancel(inv.Context())
|
||||
defer cancel()
|
||||
|
||||
spin := spinner.New(spinner.CharSets[5], 100*time.Millisecond)
|
||||
spin.Writer = inv.Stderr
|
||||
spin.Suffix = pretty.Sprint(cliui.DefaultStyles.Keyword, " Collecting diagnostics...")
|
||||
spin.Start()
|
||||
|
||||
notifyCtx, notifyCancel := inv.SignalNotifyContext(ctx, StopSignals...)
|
||||
defer notifyCancel()
|
||||
|
||||
@@ -118,10 +113,15 @@ func (r *RootCmd) ping() *serpent.Command {
|
||||
workspaceName,
|
||||
)
|
||||
if err != nil {
|
||||
spin.Stop()
|
||||
return err
|
||||
}
|
||||
|
||||
// Start spinner after any build logs have finished streaming
|
||||
spin := spinner.New(spinner.CharSets[5], 100*time.Millisecond)
|
||||
spin.Writer = inv.Stderr
|
||||
spin.Suffix = pretty.Sprint(cliui.DefaultStyles.Keyword, " Collecting diagnostics...")
|
||||
spin.Start()
|
||||
|
||||
opts := &workspacesdk.DialAgentOptions{}
|
||||
|
||||
if r.verbose {
|
||||
|
||||
Reference in New Issue
Block a user