Repository navigation
fix: report an unreachable warehouse without a traceback - #383
Merged
Merged
Conversation
A refused connection or an unresolvable warehouse host now classifies as AdapterUnavailableError, and the CLI prints which command could not connect and what to check, exiting with status 1, instead of an unhandled AdapterWarehouseError traceback.
kvlonge
enabled auto-merge (squash)
November 11, 2026 08:16
Deploying sqltide with
|
| Latest commit: |
a34ba3b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://70791f4b.sqltide.pages.dev |
| Branch Preview URL: | https://wip-cli-warehouse-unavailabl-75op.sqltide.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When the ClickHouse warehouse refused the connection or its host could not be resolved,
sqt plan,build,testandauditended in an unhandledAdapterWarehouseErrortraceback instead of a CLI error.Changes
AdapterUnavailableError, a subclass ofAdapterWarehouseError. The ClickHouse driver error translation uses it when the error's cause chain contains a refused connection or a failed host lookup.receive_timeout. Like a traceback, the walk follows__context__only when no cause is set and the context is not suppressed.isinstance(…, AdapterWarehouseError), so it still catches the subclass.Verification
run_clidispatch with a translated refused-connection driver error and asserts the message, exit status 1 and no traceback.__cause__, a failed host lookup through__context__, a refusal whose URL names a timeout setting, a suppressed context and a reset connection. The last two stay genericAdapterWarehouseError.clickhouse_connectclient pointed at a closed port and at an unresolvable host, both errors translate toAdapterUnavailableError, andsqt plan/sqt buildon the example project print the message instead of a traceback.make check-ciand the full unit suite (1911 tests) pass.