Skip to content

Commit 7763212

Browse files
MichelleArkcolin-rogers-dbtpeterallenwebbVersusFacitjtcohen6
authored
Feature/decouple adapters from core (#8906)
* remove dbt.contracts.connection imports from adapter module * Move events to common (#8676) * Move events to common * More Type Annotations (#8536) * Extend use of type annotations in the events module. * Add return type of None to more __init__ definitions. * Still more type annotations adding -> None to __init__ * Tweak per review * Allow adapters to include python package logging in dbt logs (#8643) * add set_package_log_level functionality * set package handler * set package handler * add logging about stting up logging * test event log handler * add event log handler * add event log level * rename package and add unit tests * revert logfile config change * cleanup and add code comments * add changie * swap function for dict * add additional unit tests * fix unit test * update README and protos * fix formatting * update precommit --------- Co-authored-by: Peter Webb <[email protected]> * fix import * move types_pb2.py from events to common/events * move agate_helper into common * Add utils module (#8910) * moving types_pb2.py to common/events * split out utils into core/common/adapters * add changie * remove usage of dbt.config.PartialProject from dbt/adapters (#8909) * remove usage of dbt.config.PartialProject from dbt/adapters * add changie --------- Co-authored-by: Colin <[email protected]> * move agate_helper unit tests under tests/unit/common * move agate_helper into common (#8911) * move agate_helper into common * add changie --------- Co-authored-by: Colin <[email protected]> * remove dbt.flags.MP_CONTEXT usage in dbt/adapters (#8931) * remove dbt.flags.LOG_CACHE_EVENTS usage in dbt/adapters (#8933) * Refactor Base Exceptions (#8989) * moving types_pb2.py to common/events * Refactor Base Exceptions * update make_log_dir_if_missing to handle str * move remaining adapters exception imports to common/adapters --------- Co-authored-by: Michelle Ark <[email protected]> * Remove usage of dbt.deprecations in dbt/adapters, enable core & adapter-specific (#9051) * Decouple adapter constraints from core (#9054) * Move constraints to dbt.common * Move constraints to contracts folder, per review * Add a changelog entry. * move include/global_project to adapters (#8930) * remove adapter.get_compiler (#9134) * Move adapter logger to adapters (#9165) * moving types_pb2.py to common/events * Move AdapterLogger to adapter folder * add changie * delete accidentally merged types_pb2.py * Move the semver package to common and alter references. (#9166) * Move the semver package to common and alter references. * Alter leftover references to dbt.semver, this time using from syntax. --------- Co-authored-by: Mila Page <[email protected]> * Refactor EventManager setup and interaction (#9180) * moving types_pb2.py to common/events * move event manager setup back to core, remove ref to global EVENT_MANAGER and clean up event manager functions * move invocation_id from events to first class common concept * move lowercase utils to common * move lowercase utils to common * ref CAPTURE_STREAM through method * add changie * first pass: adapter migration script (#9160) * Decouple macro generator from adapters (#9149) * Remove usage of dbt.contracts.relation in dbt/adapters (#9207) * Remove ResultNode usage from connections (#9211) * Add RelationConfig Protocol for use in Relation.create_from (#9210) * move relation contract to dbt.adapters * changelog entry * first pass: clean up relation.create_from * type ignores * type ignore * changelog entry * update RelationConfig variable names * Merge main into feature/decouple-adapters-from-core (#9240) * moving types_pb2.py to common/events * Restore warning on unpinned git packages (#9157) * Support --empty flag for schema-only dry runs (#8971) * Fix ensuring we produce valid jsonschema artifacts for manifest, catalog, sources, and run-results (#9155) * Drop `all_refs=True` from jsonschema-ization build process Passing `all_refs=True` makes it so that Everything is a ref, even the top level schema. In jsonschema land, this essentially makes the produced artifact not a full schema, but a fractal object to be included in a schema. Thus when `$id` is passed in, jsonschema tools blow up because `$id` is for identifying a schema, which we explicitly weren't creating. The alternative was to drop the inclusion of `$id`. Howver, we're intending to create a schema, and having an `$id` is recommended best practice. Additionally since we were intending to create a schema, not a fractal, it seemed best to create to full schema. * Explicity produce jsonschemas using DRAFT_2020_12 dialect Previously were were implicitly using the `DRAFT_2020_12` dialect through mashumaro. It felt wise to begin explicitly specifying this. First, it is closest in available mashumaro provided dialects to what we produced pre 1.7. Secondly, if mashumaro changes its default for whatever reason (say a new dialect is added, and mashumaro moves to that), we don't want to automatically inherit that. * Bump manifest version to v12 Core 1.7 released with manifest v11, and we don't want to be overriding that with 1.8. It'd be weird for 1.7 and 1.8 to both have v11 manifests, but for them to be different, right? * Begin including schema dialect specification in produced jsonschema In jsonschema's documentation they state > It's not always easy to tell which draft a JSON Schema is using. > You can use the $schema keyword to declare which version of the JSON Schema specification the schema is written to. > It's generally good practice to include it, though it is not required. and > For brevity, the $schema keyword isn't included in most of the examples in this book, but it should always be used in the real world. Basically, to know how to parse a schema, it's important to include what schema dialect is being used for the schema specification. The change in this commit ensures we include that information. * Create manifest v12 jsonschema specification * Add change documentation for jsonschema schema production fix * Bump run-results version to v6 * Generate new v6 run-results jsonschema * Regenerate catalog v1 and sources v3 with fixed jsonschema production * Update tests to handle bumped versions of manifest and run-results --------- Co-authored-by: Jeremy Cohen <[email protected]> Co-authored-by: Michelle Ark <[email protected]> Co-authored-by: Quigley Malcolm <[email protected]> * Move BaseConfig to Common (#9224) * moving types_pb2.py to common/events * move BaseConfig and assorted dependencies to common * move ShowBehavior and OnConfigurationChange to common * add changie * Remove manifest from catalog and connection method signatures (#9242) * Add MacroResolverProtocol, remove lazy loading of manifest in adapter.execute_macro (#9243) * remove manifest from adapter.execute_macro, replace with MacroResolver + remove lazy loading * rename to MacroResolverProtocol * pass MacroResolverProtcol in adapter.calculate_freshness_from_metadata * changelog entry * fix adapter.calculate_freshness call * pass context to MacroQueryStringSetter (#9248) * moving types_pb2.py to common/events * remove manifest from adapter.execute_macro, replace with MacroResolver + remove lazy loading * rename to MacroResolverProtocol * pass MacroResolverProtcol in adapter.calculate_freshness_from_metadata * changelog entry * fix adapter.calculate_freshness call * pass context to MacroQueryStringSetter * changelog entry --------- Co-authored-by: Colin <[email protected]> * add macro_context_generator on adapter (#9251) * moving types_pb2.py to common/events * remove manifest from adapter.execute_macro, replace with MacroResolver + remove lazy loading * rename to MacroResolverProtocol * pass MacroResolverProtcol in adapter.calculate_freshness_from_metadata * changelog entry * fix adapter.calculate_freshness call * add macro_context_generator on adapter * fix adapter test setup * changelog entry * Update parser to support conversion metrics (#9173) * added ConversionTypeParams classes * updated parser for ConversionTypeParams * added step to populate input_measure for conversion metrics * version bump on DSI * comment back manifest generating line * updated v12 schemas * added tests * added changelog * Add typing for macro_context_generator, fix query_header_context --------- Co-authored-by: Colin <[email protected]> Co-authored-by: William Deng <[email protected]> * Pass mp_context to adapter factory (#9275) * moving types_pb2.py to common/events * require core to pass mp_context to adapter factory * add changie * fix SpawnContext annotation * Fix include for decoupling (#9286) * moving types_pb2.py to common/events * fix include path in MANIFEST.in * Fix include for decoupling (#9288) * moving types_pb2.py to common/events * fix include path in MANIFEST.in * add index.html to in MANIFEST.in * move system client to common (#9294) * moving types_pb2.py to common/events * move system.py to common * add changie update README * remove dbt.utils from semver.py * remove aliasing connection_exception_retry * Update materialized views to use RelationConfigs and remove refs to dbt.utils (#9291) * moving types_pb2.py to common/events * add AdapterRuntimeConfig protocol and clean up dbt-postgress core imports * add changie * remove AdapterRuntimeConfig * update changelog * Add config field to RelationConfig (#9300) * moving types_pb2.py to common/events * add config field to RelationConfig * merge main into feature/decouple-adapters-from-core (#9305) * moving types_pb2.py to common/events * Update parser to support conversion metrics (#9173) * added ConversionTypeParams classes * updated parser for ConversionTypeParams * added step to populate input_measure for conversion metrics * version bump on DSI * comment back manifest generating line * updated v12 schemas * added tests * added changelog * Remove `--dry-run` flag from `dbt deps` (#9169) * Rm --dry-run flag for dbt deps * Add changelog entry * Update test * PR feedback * adding clean_up methods to basic and unique_id tests (#9195) * init attempt of adding clean_up methods to basic and unique_id tests * swapping cleanup method drop of test_schema to unique_schema to test breakage on docs_generate test * moving the clean_up method down into class BaseDocsGenerate * remove drop relation for unique_schema * manually define alternate_schema for clean_up as not being seen as part of project_config * add changelog * remove unneeded changelog * uncomment line that generates new manifest and delete manifest our changes created * make sure the manifest test is deleted and readd older version of manifest.json to appease test * manually revert file to previous commit * Revert "manually revert file to previous commit" This reverts commit a755419. --------- Co-authored-by: William Deng <[email protected]> Co-authored-by: Jeremy Cohen <[email protected]> Co-authored-by: Matthew McKnight <[email protected]> * resolve merge conflict on unparsed.py (#9309) * moving types_pb2.py to common/events * Update parser to support conversion metrics (#9173) * added ConversionTypeParams classes * updated parser for ConversionTypeParams * added step to populate input_measure for conversion metrics * version bump on DSI * comment back manifest generating line * updated v12 schemas * added tests * added changelog * Remove `--dry-run` flag from `dbt deps` (#9169) * Rm --dry-run flag for dbt deps * Add changelog entry * Update test * PR feedback * adding clean_up methods to basic and unique_id tests (#9195) * init attempt of adding clean_up methods to basic and unique_id tests * swapping cleanup method drop of test_schema to unique_schema to test breakage on docs_generate test * moving the clean_up method down into class BaseDocsGenerate * remove drop relation for unique_schema * manually define alternate_schema for clean_up as not being seen as part of project_config * add changelog * remove unneeded changelog * uncomment line that generates new manifest and delete manifest our changes created * make sure the manifest test is deleted and readd older version of manifest.json to appease test * manually revert file to previous commit * Revert "manually revert file to previous commit" This reverts commit a755419. --------- Co-authored-by: William Deng <[email protected]> Co-authored-by: Jeremy Cohen <[email protected]> Co-authored-by: Matthew McKnight <[email protected]> * Resolve unparsed.py conflict (#9311) * Update parser to support conversion metrics (#9173) * added ConversionTypeParams classes * updated parser for ConversionTypeParams * added step to populate input_measure for conversion metrics * version bump on DSI * comment back manifest generating line * updated v12 schemas * added tests * added changelog * Remove `--dry-run` flag from `dbt deps` (#9169) * Rm --dry-run flag for dbt deps * Add changelog entry * Update test * PR feedback * adding clean_up methods to basic and unique_id tests (#9195) * init attempt of adding clean_up methods to basic and unique_id tests * swapping cleanup method drop of test_schema to unique_schema to test breakage on docs_generate test * moving the clean_up method down into class BaseDocsGenerate * remove drop relation for unique_schema * manually define alternate_schema for clean_up as not being seen as part of project_config * add changelog * remove unneeded changelog * uncomment line that generates new manifest and delete manifest our changes created * make sure the manifest test is deleted and readd older version of manifest.json to appease test * manually revert file to previous commit * Revert "manually revert file to previous commit" This reverts commit a755419. --------- Co-authored-by: William Deng <[email protected]> Co-authored-by: Jeremy Cohen <[email protected]> Co-authored-by: Matthew McKnight <[email protected]> --------- Co-authored-by: colin-rogers-dbt <[email protected]> Co-authored-by: Peter Webb <[email protected]> Co-authored-by: Colin <[email protected]> Co-authored-by: Mila Page <[email protected]> Co-authored-by: Mila Page <[email protected]> Co-authored-by: Jeremy Cohen <[email protected]> Co-authored-by: Quigley Malcolm <[email protected]> Co-authored-by: William Deng <[email protected]> Co-authored-by: Matthew McKnight <[email protected]> Co-authored-by: Chenyu Li <[email protected]>
1 parent c2bc2f0 commit 7763212

File tree

411 files changed

+9347
-8246
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+9347
-8246
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Breaking Changes
2+
body: Remove adapter.get_compiler interface
3+
time: 2023-11-27T11:47:57.443202-05:00
4+
custom:
5+
Author: michelleark
6+
Issue: "9148"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Breaking Changes
2+
body: Move AdapterLogger to adapters folder
3+
time: 2023-11-28T13:43:56.853925-08:00
4+
custom:
5+
Author: colin-rogers-dbt
6+
Issue: "9151"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: Breaking Changes
2+
body: move event manager setup back to core, remove ref to global EVENT_MANAGER and
3+
clean up event manager functions
4+
time: 2023-11-30T13:53:48.645192-08:00
5+
custom:
6+
Author: colin-rogers-dbt
7+
Issue: "9150"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Features
2+
body: 'Allow adapters to include package logs in dbt standard logging '
3+
time: 2023-09-15T12:37:33.862862-07:00
4+
custom:
5+
Author: colin-rogers-dbt
6+
Issue: "7859"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Features
2+
body: migrate utils to common and adapters folders
3+
time: 2023-10-26T11:08:21.458709-07:00
4+
custom:
5+
Author: colin-rogers-dbt
6+
Issue: "8924"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Features
2+
body: Move Agate helper client into common
3+
time: 2023-10-26T12:35:56.538587-07:00
4+
custom:
5+
Author: MichelleArk
6+
Issue: "8926"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Features
2+
body: remove usage of dbt.config.PartialProject from dbt/adapters
3+
time: 2023-10-26T12:39:13.904116-07:00
4+
custom:
5+
Author: MichelleArk
6+
Issue: "8928"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Features
2+
body: Remove legacy logger
3+
time: 2023-11-07T13:56:35.186648-08:00
4+
custom:
5+
Author: colin-rogers-dbt
6+
Issue: "8027"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Added more type annotations.
3+
time: 2023-08-31T16:44:35.737954-04:00
4+
custom:
5+
Author: peterallenwebb
6+
Issue: "8537"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Remove usage of dbt.include.global_project in dbt/adapters
3+
time: 2023-10-26T18:49:53.36449-04:00
4+
custom:
5+
Author: michelleark
6+
Issue: "8925"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: remove dbt.flags.MP_CONTEXT usage in dbt/adapters
3+
time: 2023-11-01T10:27:58.790153-04:00
4+
custom:
5+
Author: michelleark
6+
Issue: "8967"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: 'Remove usage of dbt.flags.LOG_CACHE_EVENTS in dbt/adapters'
3+
time: 2023-11-01T17:31:24.974093-04:00
4+
custom:
5+
Author: michelleark
6+
Issue: "8969"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Remove use of dbt/core exceptions in dbt/adapter
3+
time: 2023-11-07T13:57:28.683727-08:00
4+
custom:
5+
Author: colin-rogers-dbt MichelleArk
6+
Issue: "8920"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: Under the Hood
2+
body: Remove usage of dbt.deprecations in dbt/adapters, enable core & adapter-specific
3+
event types and protos
4+
time: 2023-11-16T17:42:51.005023-05:00
5+
custom:
6+
Author: michelleark
7+
Issue: 8927 8918
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: Under the Hood
2+
body: Move column constraints into common/contracts, removing another dependency of
3+
adapters on core.
4+
time: 2023-11-20T18:32:14.859503-05:00
5+
custom:
6+
Author: peterallenwebb
7+
Issue: "9024"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Move dbt.semver to dbt.common.semver and update references.
3+
time: 2023-11-28T17:07:32.172421-08:00
4+
custom:
5+
Author: versusfacit
6+
Issue: "9039"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Move lowercase utils method to common
3+
time: 2023-11-30T13:54:32.561673-08:00
4+
custom:
5+
Author: colin-rogers-dbt
6+
Issue: "9180"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Remove usages of dbt.clients.jinja in dbt/adapters
3+
time: 2023-12-05T09:35:44.845352+09:00
4+
custom:
5+
Author: michelleark
6+
Issue: "9205"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Remove usage of dbt.contracts in dbt/adapters
3+
time: 2023-12-05T12:05:59.936775+09:00
4+
custom:
5+
Author: michelleark
6+
Issue: "9208"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Remove usage of dbt.contracts.graph.nodes.ResultNode in dbt/adapters
3+
time: 2023-12-05T16:58:12.932172+09:00
4+
custom:
5+
Author: michelleark
6+
Issue: "9214"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Introduce RelationConfig Protocol, consolidate Relation.create_from
3+
time: 2023-12-05T17:07:25.33861+09:00
4+
custom:
5+
Author: michelleark
6+
Issue: "9215"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: Under the Hood
2+
body: Move BaseConfig, Metadata and various other contract classes from model_config
3+
to common/contracts/config
4+
time: 2023-12-05T18:50:22.321229-08:00
5+
custom:
6+
Author: colin-rorgers-dbt
7+
Issue: "8919"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: remove manifest from adapter.set_relations_cache signature
3+
time: 2023-12-05T23:58:30.920144+09:00
4+
custom:
5+
Author: michelleark
6+
Issue: "9217"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: ' remove manifest from adapter catalog method signatures'
3+
time: 2023-12-06T00:03:43.824252+09:00
4+
custom:
5+
Author: michelleark
6+
Issue: "9218"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: Add MacroResolverProtocol, remove lazy loading of manifest in adapter.execute_macro
3+
time: 2023-12-07T11:15:54.427818+09:00
4+
custom:
5+
Author: michelleark
6+
Issue: "9244"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: pass query header context to MacroQueryStringSetter
3+
time: 2023-12-07T22:41:39.498024+09:00
4+
custom:
5+
Author: michelleark
6+
Issue: 9249 9250
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: add macro_context_generator on adapter
3+
time: 2023-12-08T00:48:54.506911+09:00
4+
custom:
5+
Author: michelleark
6+
Issue: "9247"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: pass mp_context to adapter factory as argument instead of import
3+
time: 2023-12-12T15:48:42.866175-08:00
4+
custom:
5+
Author: colin-rogers-dbt
6+
Issue: "9025"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: have dbt-postgres use RelationConfig protocol for materialized views'
3+
time: 2023-12-14T12:21:34.756973-08:00
4+
custom:
5+
Author: colin-rogers-dbt
6+
Issue: "9292"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Under the Hood
2+
body: move system.py to common as dbt-bigquery relies on it to call gcloud
3+
time: 2023-12-14T16:41:07.539814-08:00
4+
custom:
5+
Author: colin-rogers-dbt
6+
Issue: "9293"

.flake8

+2
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ ignore =
1010
E741
1111
E501 # long line checking is done in black
1212
exclude = test/
13+
per-file-ignores =
14+
*/__init__.py: F401

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
core/dbt/include/index.html binary
1+
core/dbt/task/docs/index.html binary
22
tests/functional/artifacts/data/state/*/manifest.json binary
33
core/dbt/docs/build/html/searchindex.js binary
44
core/dbt/docs/build/html/index.html binary

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Configuration for pre-commit hooks (see https://pre-commit.com/).
22
# Eventually the hooks described here will be run as tests before merging each PR.
33

4-
exclude: ^(core/dbt/docs/build/|core/dbt/events/types_pb2.py)
4+
exclude: ^(core/dbt/docs/build/|core/dbt/common/events/types_pb2.py|core/dbt/events/core_types_pb2.py|core/dbt/adapters/events/adapter_types_pb2.py)
55

66
# Force all unspecified python hooks to run python 3.8
77
default_language_version:

ARCHITECTURE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Legacy tests are found in the 'test' directory:
2626

2727
The "tasks" map to top-level dbt commands. So `dbt run` => task.run.RunTask, etc. Some are more like abstract base classes (GraphRunnableTask, for example) but all the concrete types outside of task should map to tasks. Currently one executes at a time. The tasks kick off their “Runners” and those do execute in parallel. The parallelism is managed via a thread pool, in GraphRunnableTask.
2828

29-
core/dbt/include/index.html
29+
core/dbt/task/docs/index.html
3030
This is the docs website code. It comes from the dbt-docs repository, and is generated when a release is packaged.
3131

3232
## Adapters

Makefile

+10-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,16 @@ dev: dev_req ## Installs dbt-* packages in develop mode along with development d
4040

4141
.PHONY: proto_types
4242
proto_types: ## generates google protobuf python file from types.proto
43-
protoc -I=./core/dbt/events --python_out=./core/dbt/events ./core/dbt/events/types.proto
43+
protoc -I=./core/dbt/common/events --python_out=./core/dbt/common/events ./core/dbt/common/events/types.proto
44+
45+
.PHONY: core_proto_types
46+
core_proto_types: ## generates google protobuf python file from core_types.proto
47+
protoc -I=./core/dbt/events --python_out=./core/dbt/events ./core/dbt/events/core_types.proto
48+
49+
.PHONY: adapter_proto_types
50+
adapter_proto_types: ## generates google protobuf python file from core_types.proto
51+
protoc -I=./core/dbt/adapters/events --python_out=./core/dbt/adapters/events ./core/dbt/adapters/events/adapter_types.proto
52+
4453

4554
.PHONY: mypy
4655
mypy: .env ## Runs mypy against staged changes for static type checking.

core/MANIFEST.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
recursive-include dbt/include *.py *.sql *.yml *.html *.md .gitkeep .gitignore
1+
recursive-include dbt/adapters/include *.py *.sql *.yml *.html *.md .gitkeep .gitignore
22
include dbt/py.typed
3+
recursive-include dbt/task/docs *.html

core/dbt/adapters/base/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# these are all just exports, #noqa them so flake8 will be happy
22

33
# TODO: Should we still include this in the `adapters` namespace?
4-
from dbt.contracts.connection import Credentials # noqa: F401
4+
from dbt.adapters.contracts.connection import Credentials # noqa: F401
55
from dbt.adapters.base.meta import available # noqa: F401
66
from dbt.adapters.base.connections import BaseConnectionManager # noqa: F401
77
from dbt.adapters.base.relation import ( # noqa: F401

core/dbt/adapters/base/column.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import re
33
from typing import Dict, ClassVar, Any, Optional
44

5-
from dbt.exceptions import DbtRuntimeError
5+
from dbt.common.exceptions import DbtRuntimeError
66

77

88
@dataclass

0 commit comments

Comments
 (0)