Skip to content

chore: remove unused internal logging-event classes - #1547

Merged
sd-db merged 2 commits into
1.13.latestfrom
sd-db/chore/remove-unused-event-classes
Jun 23, 2026
Merged

sd-db merged 2 commits into
1.13.latestfrom
sd-db/chore/remove-unused-event-classes

Conversation

@sd-db

@sd-db sd-db commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

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

  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-databricks next" section.

Remove logging-event classes that have had no call sites since the
cursor-management (#910/#912) and pipeline (#849) refactors:

- credential_events.py: CredentialLoadError, CredentialSaveError,
  CredentialShardEvent (whole module)
- pipeline_events.py: PipelineEvent, PipelineRefresh,
  PipelineRefreshError (whole module)
- connection_events.py: ConnectionReset, ConnectionReuse,
  ConnectionIdleClose, ConnectionCreated

Verified zero consumers across source and tests; ConnectionCreate,
ConnectionCreateError, and the ConnectionWrapperEvent base remain.
@github-actions

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  dbt/adapters/databricks/events
  connection_events.py
Project Total  

This report was generated by python-coverage-comment-action

@sd-db
sd-db merged commit c3f58fa into 1.13.latest Jun 23, 2026
7 checks passed
@sd-db
sd-db deleted the sd-db/chore/remove-unused-event-classes branch June 23, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants