Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6e7f65b

Browse files
fix(cli): properly handle build log streaming duringcoder ping (#15600)
Closes#15584.- The `Collecting Diagnostics` spinner now starts after the workspacebuild 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 toindicate that direct connections may be degraded, or rendered unusable(i.e. if every packet is dropped).
1 parent32fc844 commit6e7f65b

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

‎cli/ping.go‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,6 @@ func (r *RootCmd) ping() *serpent.Command {
103103
ctx,cancel:=context.WithCancel(inv.Context())
104104
defercancel()
105105

106-
spin:=spinner.New(spinner.CharSets[5],100*time.Millisecond)
107-
spin.Writer=inv.Stderr
108-
spin.Suffix=pretty.Sprint(cliui.DefaultStyles.Keyword," Collecting diagnostics...")
109-
spin.Start()
110-
111106
notifyCtx,notifyCancel:=inv.SignalNotifyContext(ctx,StopSignals...)
112107
defernotifyCancel()
113108

@@ -118,10 +113,15 @@ func (r *RootCmd) ping() *serpent.Command {
118113
workspaceName,
119114
)
120115
iferr!=nil {
121-
spin.Stop()
122116
returnerr
123117
}
124118

119+
// Start spinner after any build logs have finished streaming
120+
spin:=spinner.New(spinner.CharSets[5],100*time.Millisecond)
121+
spin.Writer=inv.Stderr
122+
spin.Suffix=pretty.Sprint(cliui.DefaultStyles.Keyword," Collecting diagnostics...")
123+
spin.Start()
124+
125125
opts:=&workspacesdk.DialAgentOptions{}
126126

127127
ifr.verbose {

‎codersdk/healthsdk/interfaces.go‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,14 @@ func generateInterfacesReport(st *interfaces.State) (report InterfacesReport) {
6868
continue
6969
}
7070
report.Interfaces=append(report.Interfaces,healthIface)
71-
ififace.MTU<safeMTU {
71+
// Some loopback interfaces on Windows have a negative MTU, which we can
72+
// safely ignore in diagnostics.
73+
ififace.MTU>0&&iface.MTU<safeMTU {
7274
report.Severity=health.SeverityWarning
7375
report.Warnings=append(report.Warnings,
7476
health.Messagef(health.CodeInterfaceSmallMTU,
75-
"Network interface %s has MTU %d (less than %d), which may degrade the quality of direct connections",iface.Name,iface.MTU,safeMTU),
77+
"Network interface %s has MTU %d (less than %d), which may degrade the quality of direct "+
78+
"connections or render them unusable.",iface.Name,iface.MTU,safeMTU),
7679
)
7780
}
7881
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp