Repository navigation
Compress to one connection manager - #910
Merged
Merged
Conversation
benc-db
requested review from
andrefurlan-db and
rcypher-databricks
as code owners
January 21, 2025 23:31
benc-db
commented
Jan 21, 2025
| if conn and conn.name == conn_name and conn.state == ConnectionState.OPEN: | ||
| # Found a connection and nothing to do, so just return it | ||
| return conn | ||
| conn = self._get_if_exists_compute_connection(_get_compute_name(query_header_context) or "") |
Collaborator
Author
There was a problem hiding this comment.
Git is representing this as a bunch of changes here, but the code is not net new, just moved up into the parent class.
eric-wang-1990
pushed a commit
that referenced
this pull request
Jan 28, 2025
3 tasks done
sd-db
added a commit
that referenced
this pull request
Jun 23, 2026
### Description Removes internal logging-event classes that have had **no call sites** since the cursor-management (#910/#912) and pipeline (#849) refactors. They are dead code: zero consumers across source and tests, no `events/__init__.py` re-export, and no dynamic/string references. Git history confirms they were once used and their consumers were later deleted (orphaned, not never-wired). Removed: - `events/credential_events.py` — whole module (`CredentialLoadError`, `CredentialSaveError`, `CredentialShardEvent`) - `events/pipeline_events.py` — whole module (`PipelineEvent`, `PipelineRefresh`, `PipelineRefreshError`) - `events/connection_events.py` — `ConnectionReset`, `ConnectionReuse`, `ConnectionIdleClose`, `ConnectionCreated` Kept (still live or still a needed base): `ConnectionEvent`, `ConnectionCreateError`, the `ConnectionWrapperEvent` base, `ConnectionCreate`, and all of `events/base.py` / `events/other_events.py` / `logging.py`. Targeting `1.13.latest` rather than a patch: although these were never public API, they sit at importable paths, so the removal is scoped to the next minor as a safety margin. Full unit suite passes (1081 passed, 6 skipped); ruff/ruff-format/mypy clean. ### Checklist - [x] I have run this code in development and it appears to resolve the stated issue - [x] This PR includes tests, or tests are not required/relevant for this PR - [x] I have updated the `CHANGELOG.md` and added information about my change to the "dbt-databricks next" section.
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.
Description
For a long time we've had code that suggested that you could either reuse sessions or not by setting an env variable. This hasn't worked for a long time, and since I need to refactor some of this code to improve cancellation behavior, I want to first compress to a single ConnectionManager, so that I don't need to make changes against both. I eventually want to get rid of session reuse, but its too large to do as part of 1.9.x, where I want to improve cancellation behavior, so for now, let the code include only the paths that are actually reachable.
Note: no new code here, just collapsing into the parent class, and keeping the union of the code from the child and the parent. Each method comes either from the parent (if the previous child didn't override) or the child (if the child did override, or added a new method).
Checklist
CHANGELOG.mdand added information about my change to the "dbt-databricks next" section.