Skip to content

fix(k8s): include entity kind/name in kubectl timeout error message#6762

Open
breezy-devs wants to merge 1 commit into
tilt-dev:masterfrom
breezy-devs:improve-kubectl-timeout-error-message
Open

fix(k8s): include entity kind/name in kubectl timeout error message#6762
breezy-devs wants to merge 1 commit into
tilt-dev:masterfrom
breezy-devs:improve-kubectl-timeout-error-message

Conversation

@breezy-devs
Copy link
Copy Markdown

Fixes #3686

Problem

When kubectl apply timed out, the error message only reported the duration:

Killed kubectl. Hit timeout of 10s.

This gave no indication of which resource caused the timeout, making it hard to diagnose in deployments with many resources.

Additionally, the condition that triggered this error path was checking wgCtx.Err() for context.DeadlineExceeded, but wgCtx is an errgroup context that only ever emits context.Canceled — never context.DeadlineExceeded. This made the timeout error message completely unreachable.

Fix

  1. Fix the condition to check err instead of wgCtx.Err(), so the timeout error is actually returned when escalatingUpdate times out
  2. Include the entity's kind and name in the error message

The message now reads:

Killed kubectl. Hit timeout of 10s applying Deployment/my-app.

Test

Added TestTimeoutErrorMessage to verify the error message includes the timeout duration and the entity kind/name.

@breezy-devs breezy-devs force-pushed the improve-kubectl-timeout-error-message branch from 510c5b8 to 7e57d43 Compare May 9, 2026 04:51
Signed-off-by: Brent Hiranaka <brenthiranaka95@gmail.com>
@breezy-devs breezy-devs force-pushed the improve-kubectl-timeout-error-message branch from 7e57d43 to eeacdce Compare May 10, 2026 18:28
@breezy-devs breezy-devs changed the title k8s: include entity kind/name in kubectl timeout error message fix(k8s): include entity kind/name in kubectl timeout error message May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kubectl apply timeout error message needs more info

1 participant