acoustic-carpenter-78188
05/08/2026, 6:22 PMflyte start devbox, the merge-kubeconfig step calls kubectl config view --flatten via subprocess.run. When kubectl is not installed, subprocess raises FileNotFoundError — which is not in the existing (PermissionError, CalledProcessError) catch in _merge_kubeconfig, so it bubbles up as a raw stack trace and gets reported to Sentry.
• Add _ensure_kubectl_available() mirroring the existing _ensure_docker_available pattern, and call it at the top of _merge_kubeconfig. Users now see an actionable install hint instead of a FileNotFoundError.
Closes
• FLYTE-SDK-C — FileNotFoundError: [Errno 2] No such file or directory: 'kubectl'
Test plan
• New TestEnsureKubectlAvailable cases in tests/cli/test_devbox.py cover missing/present kubectl and verify _merge_kubeconfig raises ClickException instead of leaking FileNotFoundError.
• Existing devbox tests still pass.
🤖 Generated with Claude Code
flyteorg/flyte-sdkacoustic-carpenter-78188
05/11/2026, 7:40 PM