Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tech Debt] Create connections subpackage #1390

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

mikealfare
Copy link
Contributor

Problem

The connections module has outgrown its container. There are many things in this module, and it makes it difficult to troubleshoot issues. Scope of impact for methods is not clear. As a result, we have created more connections-related functionality, but spread out across other modules and even subpackages. This led to things like multiple retry methods and treating python models and sql models as completely independent workflows.

Solution

"Upgrade" the connections.py module to a connections subpackage and pull in other connections-related files to properly identify these features as connections features. This will allow us to much better encapsulate each feature and remove redundancy, thereby improving troubleshooting and ultimately decreasing bugs.

This PR serves as the first iteration in that goal. The changes in this PR are largely structural and syntactic in nature:

  • move several files into /connections/ and mark them all as private
  • create /connections/__init__.py and raise all members that are used outside of /connections/
  • fix all imports to make it easier to see the "level" of each module relative to others
  • in some cases, remove things that are not called anywhere

Checklist

  • I have read the contributing guide and understand what's expected of me
  • 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
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@mikealfare mikealfare self-assigned this Oct 30, 2024
@cla-bot cla-bot bot added the cla:yes label Oct 30, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-bigquery contributing guide.

@mikealfare mikealfare added the Skip Changelog Skips GHA to check for changelog file label Oct 30, 2024
@mikealfare mikealfare marked this pull request as ready for review October 30, 2024 01:53
@mikealfare mikealfare requested a review from a team as a code owner October 30, 2024 01:53
@mikealfare mikealfare marked this pull request as draft November 1, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant