-
Notifications
You must be signed in to change notification settings - Fork 155
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
Break out credentials as a separate module #1391
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of things moving around, but nothing actually changed. All changes are one of:
- moved an object from
.connections
to.credentials
- fixed import order
- imported object directly from the module in which it's defined to avoid circular imports
- updated imports due to an object moving from
.connections
to.credentials
- updated mocks in unit tests due to an object moving from
.connections
to.credentials
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same imports, order fixed, moved BigQueryCredentials
to .credentials
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same imports, order fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same imports, order fixed, moved DataprocBatchConfig
to .credentials
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same imports, order fixed.
dbt/adapters/bigquery/gcloud.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same imports, order fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same imports, order fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved get_bigquery_defaults
to .credentials
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved get_bigquery_defaults
to .credentials
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved BigQueryCredentials
, Priority
, BigqueryConnectionMethod
, DataprocBatchConfig
, and get_bigquery_defaults
from .connections
to .credentials
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved gcloud
contents here to avoid circular import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved BigQueryCredentials
, Priority
, BigqueryConnectionMethod
, DataprocBatchConfig
, and get_bigquery_defaults
from .connections
to .credentials
.
Imported __version__
directly instead of from .bigquery
to avoid circular import.
Fixed import order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved gcloud
into credentials
to avoid circular import.
…g a sync with main, fix more circular imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved into credentials
to avoid circular import.
Problem
This supports the retries fix. We need to reference BigQueryCredentials in multiple places. The current structure would create circular references.
Solution
Put
BigQueryCredentials
in its own module. Move over other dependent objects as needed. Take this time to also fix all the imports. The last change became necessary due to already existing import issues that were uncovered by making this a new module.Checklist