confluentinc / confluentinc/dbt-confluent
Surface debug logs when adding log-level devug.
- Dominant language
- Python
- Stars
- 8
- Forks
- 2
- Avg merge
- 1d 59m
- Merged PRs (30d)
- 18
Description
## Problem
When `confluent_sql.connect()` fails, users see only:
```
Runtime Error
Error running SQL 'select 1 as id': confluent_sql connection error
```
And no more detailed information shows if changing the debug level at the dbt adapter level.
## Example from a real incident
A user installed `dbt-confluent==0.1.0` from PyPI and saw:
```
Runtime Error
Error running SQL 'select 1 as id': confluent_sql connection error
```
The actual chained (but hidden) exception was:
```
TypeError: connect() got an unexpected keyword argument 'environment'
"confluent_sql connection error" isn't actionable. "TypeError: got an unexpected keyword argument 'environment'" immediately points to a version mismatch. This pattern generalizes: auth failures surface as
`httpx.HTTPStatusError 401`, wrong regions as DNS errors, etc. — all currently invisible in default output
```
## Desired behavior
1. Relevant information from traceback should be available from confluent-sql to dbt.
2. When running dbt with `--debug`, the effective connection settings should be visible so users can sanity check what the adapter is actually sending. Secrets (`flink_api_key`, `flink_api_secret`) should probably be redacted.
The same principle likely applies to query-time errors in the `exception_handler`, though that path already includes the exception message (it just omits the type).
## References
- `dbt/adapters/confluent/connections.py` - `open()` method is where the connect-time error is currently wrapped
- Related: PR #51 (the 0.1.0/0.3.0 kwarg mismatch that surfaced this gap)
Contributor guide
Research direction
Start in dbt/adapters/confluent/connections.py, especially the open() method where connect-time errors are wrapped, and inspect the exception_handler path for query-time errors. Trace how confluent_sql exceptions reach dbt, then verify that --debug exposes actionable traceback information and effective connection settings while redacting flink_api_key and flink_api_secret.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100