Skip to content

Commit 5bda4e6

Browse files
committed
fix: simplify keepalive error message
Use simpler "Connection to Depot runner lost" message that focuses users on the troubleshooting documentation.
1 parent b5f051b commit 5bda4e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/buildx/commands/build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ func wrapBuildError(err error, bake bool) error {
10971097
return &wrapped{err, msg}
10981098
}
10991099
if st.Code() == codes.Unavailable && strings.Contains(st.Message(), "keepalive ping failed") {
1100-
msg := "Connection to BuildKit lost. This error occurs when BuildKit is shut down, often due to the runner reaching resource starvation caused by an Out of Memory (OOM) condition.\n\nFor troubleshooting steps, visit: https://depot.dev/docs/container-builds/troubleshooting#error-keep-alive-ping-failed-to-receive-ack-within-timeout"
1100+
msg := "Connection to Depot runner lost.\n\nFor troubleshooting steps, visit: https://depot.dev/docs/container-builds/troubleshooting#error-keep-alive-ping-failed-to-receive-ack-within-timeout"
11011101
return &wrapped{err, msg}
11021102
}
11031103
}
@@ -1178,7 +1178,7 @@ func rewriteFriendlyErrors(err error) error {
11781178
return errors.New("build canceled")
11791179
}
11801180
if strings.Contains(err.Error(), "keepalive ping failed") {
1181-
return errors.New("Connection to BuildKit lost. This error occurs when BuildKit is shut down, often due to the runner reaching resource starvation caused by an Out of Memory (OOM) condition.\n\nFor troubleshooting steps, visit: https://depot.dev/docs/container-builds/troubleshooting#error-keep-alive-ping-failed-to-receive-ack-within-timeout")
1181+
return errors.New("Connection to Depot runner lost.\n\nFor troubleshooting steps, visit: https://depot.dev/docs/container-builds/troubleshooting#error-keep-alive-ping-failed-to-receive-ack-within-timeout")
11821182
}
11831183
return err
11841184
}

0 commit comments

Comments
 (0)