<#1137 fix: filter ConnectError(UNAVAILABLE/DEADLI...
# flyte-github
a
#1137 fix: filter ConnectError(UNAVAILABLE/DEADLINE_EXCEEDED) from Sentry Pull request opened by EngHabu Summary SelectCluster failures land in Sentry as SDK crashes even though they are transient infra problems — DNS lookup failed, TCP connect refused, connection reset, deadline exceeded. The chain is:
Copy code
ConnectError(UNAVAILABLE | DEADLINE_EXCEEDED)
  -> RuntimeError("SelectCluster failed for operation=...")        # _select_and_build
  -> RuntimeSystemError("Failed to get signed url for /tmp/...")   # _upload_single_file
The SDK cannot recover from these; they belong in the same user-error bucket the CLI's
InvokeBaseMixin
(in
src/flyte/cli/_common.py
) already routes to
ClickException
. Change Extends
_USER_ACTIONABLE_CONNECT_CODES
in
src/flyte/_sentry.py
to include: •
UNAVAILABLE
— connection refused/reset, DNS lookup failure, backend down. •
DEADLINE_EXCEEDED
— request timed out.
INTERNAL
is intentionally not added — that code can indicate a real backend/SDK bug worth a crash report. Docstring on
_is_user_actionable_connect_error
is updated to spell out the two-flavor (user-config + transient-infra) scope. Closes • FLYTE-SDK-29 — SelectCluster
Request timed out
(DEADLINE_EXCEEDED) • FLYTE-SDK-47 — SelectCluster
Connection refused
(UNAVAILABLE) • FLYTE-SDK-48 — SelectCluster transient failure (UNAVAILABLE) • FLYTE-SDK-3W — SelectCluster
Connection reset
(UNAVAILABLE)
fixes FLYTE-SDK-29
fixes FLYTE-SDK-47
fixes FLYTE-SDK-48
fixes FLYTE-SDK-3W
Test plan • New:
ConnectError(UNAVAILABLE)
wrapped through RuntimeError + RuntimeSystemError — filtered. • New:
ConnectError(DEADLINE_EXCEEDED)
wrapped variant — filtered. • Existing
test_capture_exception_still_reports_connect_error_internal
—
INTERNAL
still reported (regression guard). • All 22 tests in
tests/flyte/test_sentry.py
pass. •
make fmt
clean. 🤖 Generated with Claude Code flyteorg/flyte-sdk