mirror of
https://github.com/dbt-labs/dbt-core
synced 2025-12-21 16:51:28 +00:00
Compare commits
271 Commits
jerco/gran
...
adding-sem
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2da925aa25 | ||
|
|
43e24c5ae6 | ||
|
|
89d111a5f6 | ||
|
|
e1b5e68904 | ||
|
|
065ab2ebc2 | ||
|
|
20c95a4993 | ||
|
|
c40b488cb4 | ||
|
|
585e7c59e8 | ||
|
|
7077c47551 | ||
|
|
f789b2535a | ||
|
|
2bfc6917e2 | ||
|
|
d74ae19523 | ||
|
|
1c7c23ac73 | ||
|
|
86e8722cd8 | ||
|
|
7a61602738 | ||
|
|
dd4b47d8b1 | ||
|
|
eb200b4687 | ||
|
|
0fc080d222 | ||
|
|
5da63602b3 | ||
|
|
457ff3ef48 | ||
|
|
0dbdecef10 | ||
|
|
b13b0e9492 | ||
|
|
b9fdfd9e36 | ||
|
|
4d6352db14 | ||
|
|
9eb82c6497 | ||
|
|
89cc89dfdf | ||
|
|
2b0f6597a4 | ||
|
|
294def205f | ||
|
|
34fa703466 | ||
|
|
ab3f8dcbfd | ||
|
|
02c20477b9 | ||
|
|
d9a4ee126a | ||
|
|
94d6d19fb4 | ||
|
|
d43c070007 | ||
|
|
9ef236601b | ||
|
|
9d6f961d2b | ||
|
|
5453840950 | ||
|
|
d453964546 | ||
|
|
748a932811 | ||
|
|
8217ad4722 | ||
|
|
6ef3fbbf76 | ||
|
|
76fd12c7cd | ||
|
|
9ecb6e50e4 | ||
|
|
ce9d0afb8a | ||
|
|
c39ea807e8 | ||
|
|
1e35339389 | ||
|
|
304797b099 | ||
|
|
b9bdb775ab | ||
|
|
df93858b4b | ||
|
|
e8da84fb9e | ||
|
|
7e90e067af | ||
|
|
5e4e917de5 | ||
|
|
05dc0212e7 | ||
|
|
c00052cbfb | ||
|
|
3d54a83822 | ||
|
|
fafd5edbda | ||
|
|
8478262580 | ||
|
|
83b1fee062 | ||
|
|
0fbbc896b2 | ||
|
|
0544b08543 | ||
|
|
bef6edb942 | ||
|
|
99f27de934 | ||
|
|
9c91f3a7bd | ||
|
|
1b6fed2ffd | ||
|
|
0721f2c1b7 | ||
|
|
b9a35da118 | ||
|
|
60f80056b1 | ||
|
|
540c3b79aa | ||
|
|
16f529e1d4 | ||
|
|
ebfcf2a9ef | ||
|
|
67a8138b65 | ||
|
|
85d0b5afc7 | ||
|
|
1fbcaa4484 | ||
|
|
481235a943 | ||
|
|
2289e45571 | ||
|
|
b5d303f12a | ||
|
|
c3be975783 | ||
|
|
47c2edb42a | ||
|
|
b3440417ad | ||
|
|
020f639c7a | ||
|
|
55db15aba8 | ||
|
|
bce0e7c096 | ||
|
|
7d7066466d | ||
|
|
517576c088 | ||
|
|
987764858b | ||
|
|
a235abd176 | ||
|
|
9297e4d55c | ||
|
|
eae98677b9 | ||
|
|
66ac107409 | ||
|
|
39c5c42215 | ||
|
|
9f280a8469 | ||
|
|
73116fb816 | ||
|
|
f02243506d | ||
|
|
d5e9ce1797 | ||
|
|
4e786184d2 | ||
|
|
930bd3541e | ||
|
|
6c76137da4 | ||
|
|
68d06d8a9c | ||
|
|
d0543c9242 | ||
|
|
cfad27f963 | ||
|
|
c3ccbe3357 | ||
|
|
8e28f5906e | ||
|
|
d23285b4ba | ||
|
|
a42748433d | ||
|
|
be4a91a0fe | ||
|
|
8145eed603 | ||
|
|
fc00239f36 | ||
|
|
77dfec7214 | ||
|
|
7b73264ec8 | ||
|
|
1916784287 | ||
|
|
c2856017a1 | ||
|
|
17b82661d2 | ||
|
|
6c8609499a | ||
|
|
53ae325576 | ||
|
|
a7670a3ab9 | ||
|
|
ff2f1f42c3 | ||
|
|
35f7975d8f | ||
|
|
a9c8bc0e0a | ||
|
|
73aebd8159 | ||
|
|
9b84b6e2e8 | ||
|
|
095997913e | ||
|
|
6de1d29cf9 | ||
|
|
87db12d05b | ||
|
|
dcc70f314f | ||
|
|
dcd6ef733b | ||
|
|
85e415f50f | ||
|
|
2c684247e9 | ||
|
|
3d09531cda | ||
|
|
fc1227e0b1 | ||
|
|
dc96352493 | ||
|
|
725cf81af6 | ||
|
|
558468e854 | ||
|
|
95ad1ca4f8 | ||
|
|
02a69c8f4f | ||
|
|
7dbdfc88e0 | ||
|
|
2002791ec1 | ||
|
|
29d96bd6bf | ||
|
|
d01245133a | ||
|
|
23c8ac230c | ||
|
|
43d9ee3470 | ||
|
|
50fe25d230 | ||
|
|
a79960fa64 | ||
|
|
fa4f9d3d97 | ||
|
|
73385720b4 | ||
|
|
c2ab2971b0 | ||
|
|
0e60fc1078 | ||
|
|
4f2fef1ece | ||
|
|
3562637984 | ||
|
|
17aca39e1c | ||
|
|
59744f18bb | ||
|
|
f1326f526c | ||
|
|
834ac716fd | ||
|
|
0487b96098 | ||
|
|
dbd36f06e4 | ||
|
|
38ada8a68e | ||
|
|
e58edaab2d | ||
|
|
c202e005cd | ||
|
|
8129862b3c | ||
|
|
4e8aa007cf | ||
|
|
fe88bfabbf | ||
|
|
5328a64df2 | ||
|
|
87c9974be1 | ||
|
|
f3f509da92 | ||
|
|
5e8dcec2c5 | ||
|
|
56783446db | ||
|
|
207cc0383d | ||
|
|
49ecd6a6a4 | ||
|
|
c109f39d82 | ||
|
|
fd778dceb5 | ||
|
|
e402241e0e | ||
|
|
a6c37c948d | ||
|
|
fd886cb7dd | ||
|
|
b089a471b7 | ||
|
|
ae294b643b | ||
|
|
0bd6df0d1b | ||
|
|
7b1d61c956 | ||
|
|
646a0c704f | ||
|
|
bbf4fc30a5 | ||
|
|
6baaa2bcb0 | ||
|
|
13a595722a | ||
|
|
3680b6ad0e | ||
|
|
4c29d48d1c | ||
|
|
e00eb9aa3a | ||
|
|
f5a94fc774 | ||
|
|
b98af4ce17 | ||
|
|
b0f8d3d2f1 | ||
|
|
6c4577f44e | ||
|
|
89ee5962f5 | ||
|
|
a096202b28 | ||
|
|
7da7c2d692 | ||
|
|
1db48b3cca | ||
|
|
567847a5b0 | ||
|
|
9894c04d38 | ||
|
|
b26280d1cf | ||
|
|
cfece2cf51 | ||
|
|
79da002c3c | ||
|
|
e3f827513f | ||
|
|
10b2a7e7ff | ||
|
|
82c8d6a7a8 | ||
|
|
c994717cbc | ||
|
|
e3452b9a8f | ||
|
|
e95e36d63b | ||
|
|
74f7416144 | ||
|
|
1feeb804f4 | ||
|
|
0f6e4f0e32 | ||
|
|
2b44c2b456 | ||
|
|
2bb31ade39 | ||
|
|
0ce12405c0 | ||
|
|
b8c13e05db | ||
|
|
64268d2f9b | ||
|
|
8c8be68701 | ||
|
|
1df713fee9 | ||
|
|
758afd4071 | ||
|
|
0f9200d356 | ||
|
|
5f59ff1254 | ||
|
|
49e7bdbef9 | ||
|
|
5466fa5575 | ||
|
|
f8f21ee707 | ||
|
|
436737dde5 | ||
|
|
7f8d9a7af9 | ||
|
|
d80de82316 | ||
|
|
0d02446e07 | ||
|
|
a9e71b3907 | ||
|
|
739fb98d0e | ||
|
|
348769fa80 | ||
|
|
7efb6ab62d | ||
|
|
a3b018fd3b | ||
|
|
4d6208be64 | ||
|
|
3aab9befcf | ||
|
|
e5ac9df069 | ||
|
|
34960d8d61 | ||
|
|
94a7cfa58d | ||
|
|
eb72dbf32a | ||
|
|
9eb411f7b7 | ||
|
|
32415e3659 | ||
|
|
7886924c07 | ||
|
|
40b55ed65a | ||
|
|
4f5b9e686c | ||
|
|
95284aff68 | ||
|
|
063ff9c254 | ||
|
|
26b33e668d | ||
|
|
26ac9d57d0 | ||
|
|
7bd861a351 | ||
|
|
15c97f009a | ||
|
|
5153023100 | ||
|
|
c879083bc9 | ||
|
|
05bf27c958 | ||
|
|
a7ff003d4f | ||
|
|
2547e4f55e | ||
|
|
b43fc76701 | ||
|
|
48464a22a4 | ||
|
|
c3891d78e4 | ||
|
|
69ce6779e1 | ||
|
|
a206cfce65 | ||
|
|
3f54f30349 | ||
|
|
1071a4681d | ||
|
|
2548ba9936 | ||
|
|
999ed0b74c | ||
|
|
eef7bca005 | ||
|
|
5686cab5a0 | ||
|
|
99bc292588 | ||
|
|
a1ee348a6f | ||
|
|
2048a1af6f | ||
|
|
71223dc253 | ||
|
|
e03d35a9fc | ||
|
|
f988f76fcc | ||
|
|
0cacfd0f88 | ||
|
|
c25260e5dd | ||
|
|
c521fa6b74 | ||
|
|
f304b4b2da | ||
|
|
064d890172 |
@@ -1,5 +1,5 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 1.2.0b1
|
current_version = 1.5.0a1
|
||||||
parse = (?P<major>\d+)
|
parse = (?P<major>\d+)
|
||||||
\.(?P<minor>\d+)
|
\.(?P<minor>\d+)
|
||||||
\.(?P<patch>\d+)
|
\.(?P<patch>\d+)
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
For information on prior major and minor releases, see their changelogs:
|
For information on prior major and minor releases, see their changelogs:
|
||||||
|
|
||||||
|
|
||||||
|
* [1.4](https://github.com/dbt-labs/dbt-core/blob/1.4.latest/CHANGELOG.md)
|
||||||
|
* [1.3](https://github.com/dbt-labs/dbt-core/blob/1.3.latest/CHANGELOG.md)
|
||||||
|
* [1.2](https://github.com/dbt-labs/dbt-core/blob/1.2.latest/CHANGELOG.md)
|
||||||
* [1.1](https://github.com/dbt-labs/dbt-core/blob/1.1.latest/CHANGELOG.md)
|
* [1.1](https://github.com/dbt-labs/dbt-core/blob/1.1.latest/CHANGELOG.md)
|
||||||
* [1.0](https://github.com/dbt-labs/dbt-core/blob/1.0.latest/CHANGELOG.md)
|
* [1.0](https://github.com/dbt-labs/dbt-core/blob/1.0.latest/CHANGELOG.md)
|
||||||
* [0.21](https://github.com/dbt-labs/dbt-core/blob/0.21.latest/CHANGELOG.md)
|
* [0.21](https://github.com/dbt-labs/dbt-core/blob/0.21.latest/CHANGELOG.md)
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
## dbt-core 1.2.0-b1 - June 24, 2022
|
|
||||||
### Features
|
|
||||||
- Add selector method when reading selector definitions ([#4821](https://github.com/dbt-labs/dbt-core/issues/4821), [#4827](https://github.com/dbt-labs/dbt-core/pull/4827))
|
|
||||||
- Add set and zip function to contexts ([#2345](https://github.com/dbt-labs/dbt-core/issues/2345), [#5107](https://github.com/dbt-labs/dbt-core/pull/5107))
|
|
||||||
- Adds itertools to modules Jinja namespace ([#5130](https://github.com/dbt-labs/dbt-core/issues/5130), [#5140](https://github.com/dbt-labs/dbt-core/pull/5140))
|
|
||||||
- allow target as an option in profile_template.yml ([#5179](https://github.com/dbt-labs/dbt-core/issues/5179), [#5184](https://github.com/dbt-labs/dbt-core/pull/5184))
|
|
||||||
- seed: Add new macro get_csv_sql ([#5206](https://github.com/dbt-labs/dbt-core/issues/5206), [#5207](https://github.com/dbt-labs/dbt-core/pull/5207))
|
|
||||||
- Grants as Node Configs ([#5189](https://github.com/dbt-labs/dbt-core/issues/5189), [#5230](https://github.com/dbt-labs/dbt-core/pull/5230))
|
|
||||||
- Adds file selectors and support for file selectors in the default method selector ([#5240](https://github.com/dbt-labs/dbt-core/issues/5240), [#5241](https://github.com/dbt-labs/dbt-core/pull/5241))
|
|
||||||
- Move cross-db macros from dbt-utils into dbt-core global project ([#4813](https://github.com/dbt-labs/dbt-core/issues/4813), [#5265](https://github.com/dbt-labs/dbt-core/pull/5265))
|
|
||||||
- Prettify duration message at the end of execution ([#5253](https://github.com/dbt-labs/dbt-core/issues/5253), [#5364](https://github.com/dbt-labs/dbt-core/pull/5364))
|
|
||||||
- Early return from dbt init if no available adapters ([#5365](https://github.com/dbt-labs/dbt-core/issues/5365), [#5366](https://github.com/dbt-labs/dbt-core/pull/5366))
|
|
||||||
### Fixes
|
|
||||||
- Adding new cols to check_cols in snapshots ([#3146](https://github.com/dbt-labs/dbt-core/issues/3146), [#4893](https://github.com/dbt-labs/dbt-core/pull/4893))
|
|
||||||
- Truncate relation names when appending a suffix that will result in len > 63 characters using make_temp_relation and make_backup_relation macros ([#2869](https://github.com/dbt-labs/dbt-core/issues/2869), [#4921](https://github.com/dbt-labs/dbt-core/pull/4921))
|
|
||||||
- Restore ability to utilize `updated_at` for check_cols snapshots ([#5076](https://github.com/dbt-labs/dbt-core/issues/5076), [#5077](https://github.com/dbt-labs/dbt-core/pull/5077))
|
|
||||||
- Use yaml renderer (with target context) for rendering selectors ([#5131](https://github.com/dbt-labs/dbt-core/issues/5131), [#5136](https://github.com/dbt-labs/dbt-core/pull/5136))
|
|
||||||
- Fix retry logic to return values after initial try ([#5023](https://github.com/dbt-labs/dbt-core/issues/5023), [#5137](https://github.com/dbt-labs/dbt-core/pull/5137))
|
|
||||||
- Scrub secret env vars from CommandError in exception stacktrace ([#5151](https://github.com/dbt-labs/dbt-core/issues/5151), [#5152](https://github.com/dbt-labs/dbt-core/pull/5152))
|
|
||||||
- Ensure the metric name does not contain spaces ([#4572](https://github.com/dbt-labs/dbt-core/issues/4572), [#5173](https://github.com/dbt-labs/dbt-core/pull/5173))
|
|
||||||
- When parsing 'all_sources' should be a list of unique dirs ([#5120](https://github.com/dbt-labs/dbt-core/issues/5120), [#5176](https://github.com/dbt-labs/dbt-core/pull/5176))
|
|
||||||
- Add warning if yaml contains duplicate keys ([#5114](https://github.com/dbt-labs/dbt-core/issues/5114), [#5146](https://github.com/dbt-labs/dbt-core/pull/5146))
|
|
||||||
- Modifying the drop_test_schema to work better with Redshift issues around locked tables and current transactions ([#5200](https://github.com/dbt-labs/dbt-core/issues/5200), [#5198](https://github.com/dbt-labs/dbt-core/pull/5198))
|
|
||||||
- Fix column comparison in snapshot_check_all_get_existing_columns for check-strategy snapshots with explicit check_cols defined ([#5222](https://github.com/dbt-labs/dbt-core/issues/5222), [#5223](https://github.com/dbt-labs/dbt-core/pull/5223))
|
|
||||||
- Changed how `--select state:modified` detects changes for macros nodes depend on ([#5202](https://github.com/dbt-labs/dbt-core/issues/5202), [#5224](https://github.com/dbt-labs/dbt-core/pull/5224))
|
|
||||||
- Fix column comparison in snapshot_check_all_get_existing_columns to use adapter.get_columns_in_relation ([#5222](https://github.com/dbt-labs/dbt-core/issues/5222), [#5232](https://github.com/dbt-labs/dbt-core/pull/5232))
|
|
||||||
- Remove docs file from manifest when removing doc node ([#4146](https://github.com/dbt-labs/dbt-core/issues/4146), [#5270](https://github.com/dbt-labs/dbt-core/pull/5270))
|
|
||||||
- Remove duplicate dbt script entry ([#5314](https://github.com/dbt-labs/dbt-core/issues/5314), [#5304](https://github.com/dbt-labs/dbt-core/pull/5304))
|
|
||||||
- Change node ancestor/descendant algo, fixes issue where downstream models aren't run when using networkx >= 2.8.1 ([#5286](https://github.com/dbt-labs/dbt-core/issues/5286), [#5326](https://github.com/dbt-labs/dbt-core/pull/5326))
|
|
||||||
- Fixing Windows color regression ([#5191](https://github.com/dbt-labs/dbt-core/issues/5191), [#5327](https://github.com/dbt-labs/dbt-core/pull/5327))
|
|
||||||
- Define compatibility for older manifest versions when using state: selection methods ([#5213](https://github.com/dbt-labs/dbt-core/issues/5213), [#5346](https://github.com/dbt-labs/dbt-core/pull/5346))
|
|
||||||
- Remove duplicate key checking introduced in 1.2.0a1 ([#5331](https://github.com/dbt-labs/dbt-core/issues/5331), [#5403](https://github.com/dbt-labs/dbt-core/pull/5403))
|
|
||||||
### Under the Hood
|
|
||||||
- Migrating 005_simple_seed to the new test framework. ([#200](https://github.com/dbt-labs/dbt-core/issues/200), [#5013](https://github.com/dbt-labs/dbt-core/pull/5013))
|
|
||||||
- Convert 029_docs_generate tests to new framework ([#5035](https://github.com/dbt-labs/dbt-core/issues/5035), [#5058](https://github.com/dbt-labs/dbt-core/pull/5058))
|
|
||||||
- Move package deprecation check outside of package cache ([#5068](https://github.com/dbt-labs/dbt-core/issues/5068), [#5069](https://github.com/dbt-labs/dbt-core/pull/5069))
|
|
||||||
- removal of scaffold first attempt and create_adapter_plugin.py as they are deprecated new scaffold can be found https://github.com/dbt-labs/dbt-database-adapter-scaffold ([#4980](https://github.com/dbt-labs/dbt-core/issues/4980), [#5117](https://github.com/dbt-labs/dbt-core/pull/5117))
|
|
||||||
- Mypy -> 0.942 + fixed import logic to allow for full mypy coverage ([#4805](https://github.com/dbt-labs/dbt-core/issues/4805), [#5171](https://github.com/dbt-labs/dbt-core/pull/5171))
|
|
||||||
- Converted dbt list tests to pytest ([#5049](https://github.com/dbt-labs/dbt-core/issues/5049), [#5178](https://github.com/dbt-labs/dbt-core/pull/5178))
|
|
||||||
- Fix: Call str and repr for UnsetProfileConfig without a RuntimeException ([#5081](https://github.com/dbt-labs/dbt-core/issues/5081), [#5209](https://github.com/dbt-labs/dbt-core/pull/5209))
|
|
||||||
- Improve tracking error logging message ([#5197](https://github.com/dbt-labs/dbt-core/issues/5197), [#5211](https://github.com/dbt-labs/dbt-core/pull/5211))
|
|
||||||
- Clean up materialization logic: more consistent relation names, loading from cache ([#2869](https://github.com/dbt-labs/dbt-core/issues/2869), [#4921](https://github.com/dbt-labs/dbt-core/pull/4921))
|
|
||||||
- Use the default Python version for local dev and test instead of requiring Python 3.8 ([#5257](https://github.com/dbt-labs/dbt-core/issues/5257), [#5269](https://github.com/dbt-labs/dbt-core/pull/5269))
|
|
||||||
- Fix test for context set function ([#5266](https://github.com/dbt-labs/dbt-core/issues/5266), [#5272](https://github.com/dbt-labs/dbt-core/pull/5272))
|
|
||||||
- Fix pip upgrade step in CI for Windows ([#5321](https://github.com/dbt-labs/dbt-core/issues/5321), [#5320](https://github.com/dbt-labs/dbt-core/pull/5320))
|
|
||||||
- Fix unit test test_graph_selection ([#5323](https://github.com/dbt-labs/dbt-core/issues/5323), [#5324](https://github.com/dbt-labs/dbt-core/pull/5324))
|
|
||||||
- Update context readme + clean up context code" ([#4796](https://github.com/dbt-labs/dbt-core/issues/4796), [#5334](https://github.com/dbt-labs/dbt-core/pull/5334))
|
|
||||||
- removed script meant for snowflake to snowflake ([#5361](https://github.com/dbt-labs/dbt-core/issues/5361), [#5362](https://github.com/dbt-labs/dbt-core/pull/5362))
|
|
||||||
### Dependencies
|
|
||||||
- Bump ubuntu from 20.04 to 22.04 ([#4904](https://github.com/dbt-labs/dbt-core/issues/4904), [#5141](https://github.com/dbt-labs/dbt-core/pull/5141))
|
|
||||||
- Bumping hologram version ([#5219](https://github.com/dbt-labs/dbt-core/issues/5219), [#5218](https://github.com/dbt-labs/dbt-core/pull/5218))
|
|
||||||
- Bump python from 3.10.3-slim-bullseye to 3.10.5-slim-bullseye in /docker ([#4904](https://github.com/dbt-labs/dbt-core/issues/4904), [#5367](https://github.com/dbt-labs/dbt-core/pull/5367))
|
|
||||||
|
|
||||||
### Contributors
|
|
||||||
- [@GtheSheep](https://github.com/GtheSheep) ([#4893](https://github.com/dbt-labs/dbt-core/pull/4893))
|
|
||||||
- [@NicolasPA](https://github.com/NicolasPA) ([#5211](https://github.com/dbt-labs/dbt-core/pull/5211))
|
|
||||||
- [@adamantike](https://github.com/adamantike) ([#5207](https://github.com/dbt-labs/dbt-core/pull/5207))
|
|
||||||
- [@alexrosenfeld10](https://github.com/alexrosenfeld10) ([#5184](https://github.com/dbt-labs/dbt-core/pull/5184))
|
|
||||||
- [@bd3dowling](https://github.com/bd3dowling) ([#5140](https://github.com/dbt-labs/dbt-core/pull/5140))
|
|
||||||
- [@danieldiamond](https://github.com/danieldiamond) ([#4827](https://github.com/dbt-labs/dbt-core/pull/4827))
|
|
||||||
- [@dbeatty10](https://github.com/dbeatty10) ([#5265](https://github.com/dbt-labs/dbt-core/pull/5265), [#5077](https://github.com/dbt-labs/dbt-core/pull/5077))
|
|
||||||
- [@dependabot[bot]](https://github.com/dependabot[bot]) ([#5141](https://github.com/dbt-labs/dbt-core/pull/5141), [#5367](https://github.com/dbt-labs/dbt-core/pull/5367))
|
|
||||||
- [@epapineau](https://github.com/epapineau) ([#4921](https://github.com/dbt-labs/dbt-core/pull/4921))
|
|
||||||
- [@groodt](https://github.com/groodt) ([#5304](https://github.com/dbt-labs/dbt-core/pull/5304))
|
|
||||||
- [@jared-rimmer](https://github.com/jared-rimmer) ([#5364](https://github.com/dbt-labs/dbt-core/pull/5364))
|
|
||||||
- [@jeremyyeo](https://github.com/jeremyyeo) ([#5107](https://github.com/dbt-labs/dbt-core/pull/5107), [#5146](https://github.com/dbt-labs/dbt-core/pull/5146), [#5403](https://github.com/dbt-labs/dbt-core/pull/5403))
|
|
||||||
- [@jwills](https://github.com/jwills) ([#5241](https://github.com/dbt-labs/dbt-core/pull/5241), [#5269](https://github.com/dbt-labs/dbt-core/pull/5269))
|
|
||||||
- [@tomasfarias](https://github.com/tomasfarias) ([#5209](https://github.com/dbt-labs/dbt-core/pull/5209))
|
|
||||||
- [@ulisesojeda](https://github.com/ulisesojeda) ([#5366](https://github.com/dbt-labs/dbt-core/pull/5366))
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Dependencies
|
|
||||||
body: "Bump ubuntu from 20.04 to 22.04"
|
|
||||||
time: 2022-04-27T19:51:28.000000-05:00
|
|
||||||
custom:
|
|
||||||
Author: dependabot[bot]
|
|
||||||
Issue: "4904"
|
|
||||||
PR: "5141"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Dependencies
|
|
||||||
body: "Bumping hologram version"
|
|
||||||
time: 2022-05-06T16:09:07.000000-05:00
|
|
||||||
custom:
|
|
||||||
Author: leahwicz
|
|
||||||
Issue: "5219"
|
|
||||||
PR: "5218"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Dependencies
|
|
||||||
body: "Bump python from 3.10.3-slim-bullseye to 3.10.5-slim-bullseye in /docker"
|
|
||||||
time: 2022-06-13T00:14:56.000000-05:00
|
|
||||||
custom:
|
|
||||||
Author: dependabot[bot]
|
|
||||||
Issue: "4904"
|
|
||||||
PR: "5367"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Add selector method when reading selector definitions
|
|
||||||
time: 2022-04-08T11:26:10.713088+10:00
|
|
||||||
custom:
|
|
||||||
Author: danieldiamond
|
|
||||||
Issue: "4821"
|
|
||||||
PR: "4827"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Add set and zip function to contexts
|
|
||||||
time: 2022-04-23T23:17:56.851793+12:00
|
|
||||||
custom:
|
|
||||||
Author: jeremyyeo
|
|
||||||
Issue: "2345"
|
|
||||||
PR: "5107"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Adds itertools to modules Jinja namespace
|
|
||||||
time: 2022-04-24T13:26:55.008246+01:00
|
|
||||||
custom:
|
|
||||||
Author: bd3dowling
|
|
||||||
Issue: "5130"
|
|
||||||
PR: "5140"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: allow target as an option in profile_template.yml
|
|
||||||
time: 2022-04-28T06:56:44.511519-04:00
|
|
||||||
custom:
|
|
||||||
Author: alexrosenfeld10
|
|
||||||
Issue: "5179"
|
|
||||||
PR: "5184"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: 'seed: Add new macro get_csv_sql'
|
|
||||||
time: 2022-05-03T14:29:34.847959075Z
|
|
||||||
custom:
|
|
||||||
Author: adamantike
|
|
||||||
Issue: "5206"
|
|
||||||
PR: "5207"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Grants as Node Configs
|
|
||||||
time: 2022-05-10T20:49:49.197999-04:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "5189"
|
|
||||||
PR: "5230"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Adds file selectors and support for file selectors in the default method selector
|
|
||||||
time: 2022-05-12T21:57:48.289674-07:00
|
|
||||||
custom:
|
|
||||||
Author: jwills
|
|
||||||
Issue: "5240"
|
|
||||||
PR: "5241"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Move cross-db macros from dbt-utils into dbt-core global project
|
|
||||||
time: 2022-05-18T11:46:04.557104+02:00
|
|
||||||
custom:
|
|
||||||
Author: jtcohen6 dbeatty10
|
|
||||||
Issue: "4813"
|
|
||||||
PR: "5265"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Prettify duration message at the end of execution
|
|
||||||
time: 2022-06-11T16:39:31.725960083+01:00
|
|
||||||
custom:
|
|
||||||
Author: jared-rimmer
|
|
||||||
Issue: "5253"
|
|
||||||
PR: "5364"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Early return from dbt init if no available adapters
|
|
||||||
time: 2022-06-14T08:20:51.096872718+02:00
|
|
||||||
custom:
|
|
||||||
Author: ulisesojeda
|
|
||||||
Issue: "5365"
|
|
||||||
PR: "5366"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Adding new cols to check_cols in snapshots
|
|
||||||
time: 2022-03-17T21:09:16.977086+01:00
|
|
||||||
custom:
|
|
||||||
Author: GtheSheep
|
|
||||||
Issue: "3146"
|
|
||||||
PR: "4893"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Truncate relation names when appending a suffix that will result in len > 63
|
|
||||||
characters using make_temp_relation and make_backup_relation macros
|
|
||||||
time: 2022-03-22T17:37:53.320082-07:00
|
|
||||||
custom:
|
|
||||||
Author: epapineau
|
|
||||||
Issue: "2869"
|
|
||||||
PR: "4921"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Restore ability to utilize `updated_at` for check_cols snapshots
|
|
||||||
time: 2022-04-15T11:29:27.063462-06:00
|
|
||||||
custom:
|
|
||||||
Author: dbeatty10
|
|
||||||
Issue: "5076"
|
|
||||||
PR: "5077"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Fix retry logic to return values after initial try
|
|
||||||
time: 2022-04-22T13:12:27.239055-05:00
|
|
||||||
custom:
|
|
||||||
Author: emmyoop
|
|
||||||
Issue: "5023"
|
|
||||||
PR: "5137"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Use yaml renderer (with target context) for rendering selectors
|
|
||||||
time: 2022-04-22T13:56:45.147893-04:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "5131"
|
|
||||||
PR: "5136"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Scrub secret env vars from CommandError in exception stacktrace
|
|
||||||
time: 2022-04-25T20:39:24.365495+02:00
|
|
||||||
custom:
|
|
||||||
Author: jtcohen6
|
|
||||||
Issue: "5151"
|
|
||||||
PR: "5152"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Ensure the metric name does not contain spaces
|
|
||||||
time: 2022-04-26T20:21:04.360693-04:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "4572"
|
|
||||||
PR: "5173"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: When parsing 'all_sources' should be a list of unique dirs
|
|
||||||
time: 2022-04-27T10:26:48.648388-04:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "5120"
|
|
||||||
PR: "5176"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Add warning if yaml contains duplicate keys
|
|
||||||
time: 2022-04-28T10:01:57.893956+12:00
|
|
||||||
custom:
|
|
||||||
Author: jeremyyeo
|
|
||||||
Issue: "5114"
|
|
||||||
PR: "5146"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Modifying the drop_test_schema to work better with Redshift issues around locked
|
|
||||||
tables and current transactions
|
|
||||||
time: 2022-04-29T16:07:42.750046-05:00
|
|
||||||
custom:
|
|
||||||
Author: Mcknight-42
|
|
||||||
Issue: "5200"
|
|
||||||
PR: "5198"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Fix column comparison in snapshot_check_all_get_existing_columns for check-strategy
|
|
||||||
snapshots with explicit check_cols defined
|
|
||||||
time: 2022-05-09T13:00:21.649028+02:00
|
|
||||||
custom:
|
|
||||||
Author: jtcohen6
|
|
||||||
Issue: "5222"
|
|
||||||
PR: "5223"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Changed how `--select state:modified` detects changes for macros nodes depend
|
|
||||||
on
|
|
||||||
time: 2022-05-09T13:13:12.889074-05:00
|
|
||||||
custom:
|
|
||||||
Author: stu-k
|
|
||||||
Issue: "5202"
|
|
||||||
PR: "5224"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Fix column comparison in snapshot_check_all_get_existing_columns to use adapter.get_columns_in_relation
|
|
||||||
time: 2022-05-11T12:32:38.313321+02:00
|
|
||||||
custom:
|
|
||||||
Author: jtcohen6
|
|
||||||
Issue: "5222"
|
|
||||||
PR: "5232"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Remove docs file from manifest when removing doc node
|
|
||||||
time: 2022-05-18T13:46:10.167143-04:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "4146"
|
|
||||||
PR: "5270"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Remove duplicate dbt script entry
|
|
||||||
time: 2022-06-01T08:13:14.067001+10:00
|
|
||||||
custom:
|
|
||||||
Author: groodt
|
|
||||||
Issue: "5314"
|
|
||||||
PR: "5304"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Change node ancestor/descendant algo, fixes issue where downstream models aren't
|
|
||||||
run when using networkx >= 2.8.1
|
|
||||||
time: 2022-06-01T13:59:08.886215-05:00
|
|
||||||
custom:
|
|
||||||
Author: iknox-fa
|
|
||||||
Issue: "5286"
|
|
||||||
PR: "5326"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Fixing Windows color regression
|
|
||||||
time: 2022-06-01T19:42:34.263009-04:00
|
|
||||||
custom:
|
|
||||||
Author: leahwicz
|
|
||||||
Issue: "5191"
|
|
||||||
PR: "5327"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: 'Define compatibility for older manifest versions when using state: selection
|
|
||||||
methods'
|
|
||||||
time: 2022-06-08T08:09:14.321735+02:00
|
|
||||||
custom:
|
|
||||||
Author: jtcohen6
|
|
||||||
Issue: "5213"
|
|
||||||
PR: "5346"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Remove duplicate key checking introduced in 1.2.0a1
|
|
||||||
time: 2022-06-23T08:24:31.900647+12:00
|
|
||||||
custom:
|
|
||||||
Author: jeremyyeo
|
|
||||||
Issue: "5331"
|
|
||||||
PR: "5403"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Migrating 005_simple_seed to the new test framework.
|
|
||||||
time: 2022-04-09T04:05:39.20045-07:00
|
|
||||||
custom:
|
|
||||||
Author: versusfacit
|
|
||||||
Issue: "200"
|
|
||||||
PR: "5013"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Convert 029_docs_generate tests to new framework
|
|
||||||
time: 2022-04-13T18:30:14.706391-04:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "5035"
|
|
||||||
PR: "5058"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Move package deprecation check outside of package cache
|
|
||||||
time: 2022-04-14T13:22:06.157579-05:00
|
|
||||||
custom:
|
|
||||||
Author: emmyoop
|
|
||||||
Issue: "5068"
|
|
||||||
PR: "5069"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: removal of scaffold first attempt and create_adapter_plugin.py as they are deprecated new scaffold can be found https://github.com/dbt-labs/dbt-database-adapter-scaffold
|
|
||||||
time: 2022-04-20T12:00:25.171923-05:00
|
|
||||||
custom:
|
|
||||||
Author: McKnight-42
|
|
||||||
Issue: "4980"
|
|
||||||
PR: "5117"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Mypy -> 0.942 + fixed import logic to allow for full mypy coverage
|
|
||||||
time: 2022-04-27T11:21:27.499359-05:00
|
|
||||||
custom:
|
|
||||||
Author: iknox-fa
|
|
||||||
Issue: "4805"
|
|
||||||
PR: "5171"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Converted dbt list tests to pytest
|
|
||||||
time: 2022-04-27T14:06:28.882908-05:00
|
|
||||||
custom:
|
|
||||||
Author: stu-k
|
|
||||||
Issue: "5049"
|
|
||||||
PR: "5178"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: 'Fix: Call str and repr for UnsetProfileConfig without a RuntimeException'
|
|
||||||
time: 2022-05-03T19:52:12.793729384+02:00
|
|
||||||
custom:
|
|
||||||
Author: tomasfarias
|
|
||||||
Issue: "5081"
|
|
||||||
PR: "5209"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Improve tracking error logging message
|
|
||||||
time: 2022-05-04T01:00:31.60387036+02:00
|
|
||||||
custom:
|
|
||||||
Author: NicolasPA
|
|
||||||
Issue: "5197"
|
|
||||||
PR: "5211"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: 'Clean up materialization logic: more consistent relation names, loading from
|
|
||||||
cache'
|
|
||||||
time: 2022-05-09T09:26:28.551068+02:00
|
|
||||||
custom:
|
|
||||||
Author: jtcohen6
|
|
||||||
Issue: "2869"
|
|
||||||
PR: "4921"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Use the default Python version for local dev and test instead of requiring Python
|
|
||||||
3.8
|
|
||||||
time: 2022-05-18T09:51:44.603193-07:00
|
|
||||||
custom:
|
|
||||||
Author: jwills
|
|
||||||
Issue: "5257"
|
|
||||||
PR: "5269"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Fix test for context set function
|
|
||||||
time: 2022-05-18T14:55:22.554316-04:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "5266"
|
|
||||||
PR: "5272"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Fix pip upgrade step in CI for Windows
|
|
||||||
time: 2022-06-01T10:52:45.872931-04:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "5321"
|
|
||||||
PR: "5320"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Fix unit test test_graph_selection
|
|
||||||
time: 2022-06-01T11:26:48.725831-04:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "5323"
|
|
||||||
PR: "5324"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Update context readme + clean up context code"
|
|
||||||
time: 2022-06-06T23:03:53.022568+02:00
|
|
||||||
custom:
|
|
||||||
Author: jtcohen6
|
|
||||||
Issue: "4796"
|
|
||||||
PR: "5334"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: removed script meant for snowflake to snowflake
|
|
||||||
time: 2022-06-10T11:10:56.080236-05:00
|
|
||||||
custom:
|
|
||||||
Author: McKnight-42
|
|
||||||
Issue: "5361"
|
|
||||||
PR: "5362"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Dependencies
|
|
||||||
body: "Bump mypy from 0.942 to 0.961"
|
|
||||||
time: 2022-06-07T00:09:25.000000-05:00
|
|
||||||
custom:
|
|
||||||
Author: dependabot[bot]
|
|
||||||
Issue: "4904"
|
|
||||||
PR: "5337"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Dependencies
|
|
||||||
body: "Update colorama requirement from <0.4.5,>=0.3.9 to >=0.3.9,<0.4.6 in /core"
|
|
||||||
time: 2022-06-17T00:18:49.000000-05:00
|
|
||||||
custom:
|
|
||||||
Author: dependabot[bot]
|
|
||||||
Issue: "4904"
|
|
||||||
PR: "5388"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Dependencies
|
|
||||||
body: "Bump black from 22.3.0 to 22.6.0"
|
|
||||||
time: 2022-06-29T00:08:31.000000-05:00
|
|
||||||
custom:
|
|
||||||
Author: dependabot[bot]
|
|
||||||
Issue: "4904"
|
|
||||||
PR: "5420"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Move type_* macros from dbt-utils into dbt-core, with tests
|
|
||||||
time: 2022-06-30T13:54:52.165139+02:00
|
|
||||||
custom:
|
|
||||||
Author: jtcohen6
|
|
||||||
Issue: "5317"
|
|
||||||
PR: "5428"
|
|
||||||
6
.changes/unreleased/Features-20230118-134804.yaml
Normal file
6
.changes/unreleased/Features-20230118-134804.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Features
|
||||||
|
body: Adding the entity node
|
||||||
|
time: 2023-01-18T13:48:04.487817-06:00
|
||||||
|
custom:
|
||||||
|
Author: callum-mcdata
|
||||||
|
Issue: "6627"
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Add inheritance to materialization macro resolution
|
|
||||||
time: 2022-06-08T10:42:51.839945-04:00
|
|
||||||
custom:
|
|
||||||
Author: volkangurel
|
|
||||||
Issue: "4646"
|
|
||||||
PR: "5348"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Improve pluralizations for Documentation and SqlOperation NodeTypes
|
|
||||||
time: 2022-06-09T11:52:46.578469-05:00
|
|
||||||
custom:
|
|
||||||
Author: pdebelak
|
|
||||||
Issue: "5352"
|
|
||||||
PR: "5356"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Properly use quotes for Snowflake snapshots when checking all columns
|
|
||||||
time: 2022-06-17T11:44:43.978834+02:00
|
|
||||||
custom:
|
|
||||||
Author: pquadri
|
|
||||||
Issue: "2975"
|
|
||||||
PR: "5389"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: fixes handling of RESET color code with USE_COLORS=False
|
|
||||||
time: 2022-06-17T16:00:27.038058-04:00
|
|
||||||
custom:
|
|
||||||
Author: darin-reify
|
|
||||||
Issue: "5288"
|
|
||||||
PR: "5394"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Security
|
|
||||||
body: Move string interpolation of "secret" env vars outside of Jinja context. Update "contexts" README
|
|
||||||
time: 2022-06-06T23:03:53.022568+02:00
|
|
||||||
custom:
|
|
||||||
Author: jtcohen6
|
|
||||||
Issue: "4796"
|
|
||||||
PR: "5334"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Added the suggested RegEx to check the SemVer string within a package dependency
|
|
||||||
and improved invalid version error handling.
|
|
||||||
time: 2022-06-13T17:07:03.773668-05:00
|
|
||||||
custom:
|
|
||||||
Author: fivetran-joemarkiewicz
|
|
||||||
Issue: "5201"
|
|
||||||
PR: "5370"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: 'Add annotation to render_value method reimplemented in #5334'
|
|
||||||
time: 2022-06-16T12:05:16.474078+02:00
|
|
||||||
custom:
|
|
||||||
Author: jtcohen6
|
|
||||||
Issue: "4796"
|
|
||||||
PR: "5382"
|
|
||||||
6
.changes/unreleased/Under the Hood-20230113-132513.yaml
Normal file
6
.changes/unreleased/Under the Hood-20230113-132513.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Under the Hood
|
||||||
|
body: Fix use of ConnectionReused logging event
|
||||||
|
time: 2023-01-13T13:25:13.023168-05:00
|
||||||
|
custom:
|
||||||
|
Author: gshank
|
||||||
|
Issue: "6168"
|
||||||
6
.changes/unreleased/Under the Hood-20230117-111737.yaml
Normal file
6
.changes/unreleased/Under the Hood-20230117-111737.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Under the Hood
|
||||||
|
body: Update deprecated github action command
|
||||||
|
time: 2023-01-17T11:17:37.046095-06:00
|
||||||
|
custom:
|
||||||
|
Author: davidbloss
|
||||||
|
Issue: "6153"
|
||||||
124
.changie.yaml
Executable file → Normal file
124
.changie.yaml
Executable file → Normal file
@@ -6,56 +6,122 @@ changelogPath: CHANGELOG.md
|
|||||||
versionExt: md
|
versionExt: md
|
||||||
versionFormat: '## dbt-core {{.Version}} - {{.Time.Format "January 02, 2006"}}'
|
versionFormat: '## dbt-core {{.Version}} - {{.Time.Format "January 02, 2006"}}'
|
||||||
kindFormat: '### {{.Kind}}'
|
kindFormat: '### {{.Kind}}'
|
||||||
changeFormat: '- {{.Body}} ([#{{.Custom.Issue}}](https://github.com/dbt-labs/dbt-core/issues/{{.Custom.Issue}}), [#{{.Custom.PR}}](https://github.com/dbt-labs/dbt-core/pull/{{.Custom.PR}}))'
|
changeFormat: |-
|
||||||
|
{{- $IssueList := list }}
|
||||||
|
{{- $changes := splitList " " $.Custom.Issue }}
|
||||||
|
{{- range $issueNbr := $changes }}
|
||||||
|
{{- $changeLink := "[#nbr](https://github.com/dbt-labs/dbt-core/issues/nbr)" | replace "nbr" $issueNbr }}
|
||||||
|
{{- $IssueList = append $IssueList $changeLink }}
|
||||||
|
{{- end -}}
|
||||||
|
- {{.Body}} ({{ range $index, $element := $IssueList }}{{if $index}}, {{end}}{{$element}}{{end}})
|
||||||
|
|
||||||
kinds:
|
kinds:
|
||||||
- label: Breaking Changes
|
- label: Breaking Changes
|
||||||
- label: Features
|
- label: Features
|
||||||
- label: Fixes
|
- label: Fixes
|
||||||
- label: Docs
|
- label: Docs
|
||||||
- label: Under the Hood
|
changeFormat: |-
|
||||||
- label: Dependencies
|
{{- $IssueList := list }}
|
||||||
- label: Security
|
{{- $changes := splitList " " $.Custom.Issue }}
|
||||||
|
{{- range $issueNbr := $changes }}
|
||||||
|
{{- $changeLink := "[dbt-docs/#nbr](https://github.com/dbt-labs/dbt-docs/issues/nbr)" | replace "nbr" $issueNbr }}
|
||||||
|
{{- $IssueList = append $IssueList $changeLink }}
|
||||||
|
{{- end -}}
|
||||||
|
- {{.Body}} ({{ range $index, $element := $IssueList }}{{if $index}}, {{end}}{{$element}}{{end}})
|
||||||
|
- label: Under the Hood
|
||||||
|
- label: Dependencies
|
||||||
|
changeFormat: |-
|
||||||
|
{{- $PRList := list }}
|
||||||
|
{{- $changes := splitList " " $.Custom.PR }}
|
||||||
|
{{- range $pullrequest := $changes }}
|
||||||
|
{{- $changeLink := "[#nbr](https://github.com/dbt-labs/dbt-core/pull/nbr)" | replace "nbr" $pullrequest }}
|
||||||
|
{{- $PRList = append $PRList $changeLink }}
|
||||||
|
{{- end -}}
|
||||||
|
- {{.Body}} ({{ range $index, $element := $PRList }}{{if $index}}, {{end}}{{$element}}{{end}})
|
||||||
|
skipGlobalChoices: true
|
||||||
|
additionalChoices:
|
||||||
|
- key: Author
|
||||||
|
label: GitHub Username(s) (separated by a single space if multiple)
|
||||||
|
type: string
|
||||||
|
minLength: 3
|
||||||
|
- key: PR
|
||||||
|
label: GitHub Pull Request Number (separated by a single space if multiple)
|
||||||
|
type: string
|
||||||
|
minLength: 1
|
||||||
|
- label: Security
|
||||||
|
changeFormat: |-
|
||||||
|
{{- $PRList := list }}
|
||||||
|
{{- $changes := splitList " " $.Custom.PR }}
|
||||||
|
{{- range $pullrequest := $changes }}
|
||||||
|
{{- $changeLink := "[#nbr](https://github.com/dbt-labs/dbt-core/pull/nbr)" | replace "nbr" $pullrequest }}
|
||||||
|
{{- $PRList = append $PRList $changeLink }}
|
||||||
|
{{- end -}}
|
||||||
|
- {{.Body}} ({{ range $index, $element := $PRList }}{{if $index}}, {{end}}{{$element}}{{end}})
|
||||||
|
skipGlobalChoices: true
|
||||||
|
additionalChoices:
|
||||||
|
- key: Author
|
||||||
|
label: GitHub Username(s) (separated by a single space if multiple)
|
||||||
|
type: string
|
||||||
|
minLength: 3
|
||||||
|
- key: PR
|
||||||
|
label: GitHub Pull Request Number (separated by a single space if multiple)
|
||||||
|
type: string
|
||||||
|
minLength: 1
|
||||||
|
|
||||||
|
newlines:
|
||||||
|
afterChangelogHeader: 1
|
||||||
|
afterKind: 1
|
||||||
|
afterChangelogVersion: 1
|
||||||
|
beforeKind: 1
|
||||||
|
endOfVersion: 1
|
||||||
|
|
||||||
custom:
|
custom:
|
||||||
- key: Author
|
- key: Author
|
||||||
label: GitHub Username(s) (separated by a single space if multiple)
|
label: GitHub Username(s) (separated by a single space if multiple)
|
||||||
type: string
|
type: string
|
||||||
minLength: 3
|
minLength: 3
|
||||||
- key: Issue
|
- key: Issue
|
||||||
label: GitHub Issue Number
|
label: GitHub Issue Number (separated by a single space if multiple)
|
||||||
type: int
|
type: string
|
||||||
minLength: 4
|
minLength: 1
|
||||||
- key: PR
|
|
||||||
label: GitHub Pull Request Number
|
|
||||||
type: int
|
|
||||||
minLength: 4
|
|
||||||
footerFormat: |
|
footerFormat: |
|
||||||
{{- $contributorDict := dict }}
|
{{- $contributorDict := dict }}
|
||||||
{{- /* any names added to this list should be all lowercase for later matching purposes */}}
|
{{- /* any names added to this list should be all lowercase for later matching purposes */}}
|
||||||
{{- $core_team := list "emmyoop" "nathaniel-may" "gshank" "leahwicz" "chenyulinx" "stu-k" "iknox-fa" "versusfacit" "mcknight-42" "jtcohen6" "dependabot" }}
|
{{- $core_team := list "michelleark" "peterallenwebb" "emmyoop" "nathaniel-may" "gshank" "leahwicz" "chenyulinx" "stu-k" "iknox-fa" "versusfacit" "mcknight-42" "jtcohen6" "aranke" "dependabot[bot]" "snyk-bot" "colin-rogers-dbt" }}
|
||||||
{{- range $change := .Changes }}
|
{{- range $change := .Changes }}
|
||||||
{{- $authorList := splitList " " $change.Custom.Author }}
|
{{- $authorList := splitList " " $change.Custom.Author }}
|
||||||
{{- /* loop through all authors for a PR */}}
|
{{- /* loop through all authors for a single changelog */}}
|
||||||
{{- range $author := $authorList }}
|
{{- range $author := $authorList }}
|
||||||
{{- $authorLower := lower $author }}
|
{{- $authorLower := lower $author }}
|
||||||
{{- /* we only want to include non-core team contributors */}}
|
{{- /* we only want to include non-core team contributors */}}
|
||||||
{{- if not (has $authorLower $core_team)}}
|
{{- if not (has $authorLower $core_team)}}
|
||||||
{{- $pr := $change.Custom.PR }}
|
{{- $changeList := splitList " " $change.Custom.Author }}
|
||||||
{{- /* check if this contributor has other PRs associated with them already */}}
|
{{- /* Docs kind link back to dbt-docs instead of dbt-core issues */}}
|
||||||
{{- if hasKey $contributorDict $author }}
|
{{- $changeLink := $change.Kind }}
|
||||||
{{- $prList := get $contributorDict $author }}
|
{{- if or (eq $change.Kind "Dependencies") (eq $change.Kind "Security") }}
|
||||||
{{- $prList = append $prList $pr }}
|
{{- $changeLink = "[#nbr](https://github.com/dbt-labs/dbt-core/pull/nbr)" | replace "nbr" $change.Custom.PR }}
|
||||||
{{- $contributorDict := set $contributorDict $author $prList }}
|
{{- else if eq $change.Kind "Docs"}}
|
||||||
{{- else }}
|
{{- $changeLink = "[dbt-docs/#nbr](https://github.com/dbt-labs/dbt-docs/issues/nbr)" | replace "nbr" $change.Custom.Issue }}
|
||||||
{{- $prList := list $change.Custom.PR }}
|
{{- else }}
|
||||||
{{- $contributorDict := set $contributorDict $author $prList }}
|
{{- $changeLink = "[#nbr](https://github.com/dbt-labs/dbt-core/issues/nbr)" | replace "nbr" $change.Custom.Issue }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end}}
|
{{- /* check if this contributor has other changes associated with them already */}}
|
||||||
|
{{- if hasKey $contributorDict $author }}
|
||||||
|
{{- $contributionList := get $contributorDict $author }}
|
||||||
|
{{- $contributionList = append $contributionList $changeLink }}
|
||||||
|
{{- $contributorDict := set $contributorDict $author $contributionList }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $contributionList := list $changeLink }}
|
||||||
|
{{- $contributorDict := set $contributorDict $author $contributionList }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end}}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- /* no indentation here for formatting so the final markdown doesn't have unneeded indentations */}}
|
{{- /* no indentation here for formatting so the final markdown doesn't have unneeded indentations */}}
|
||||||
{{- if $contributorDict}}
|
{{- if $contributorDict}}
|
||||||
### Contributors
|
### Contributors
|
||||||
{{- range $k,$v := $contributorDict }}
|
{{- range $k,$v := $contributorDict }}
|
||||||
- [@{{$k}}](https://github.com/{{$k}}) ({{ range $index, $element := $v }}{{if $index}}, {{end}}[#{{$element}}](https://github.com/dbt-labs/dbt-core/pull/{{$element}}){{end}})
|
- [@{{$k}}](https://github.com/{{$k}}) ({{ range $index, $element := $v }}{{if $index}}, {{end}}{{$element}}{{end}})
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
2
.flake8
2
.flake8
@@ -9,4 +9,4 @@ ignore =
|
|||||||
E203 # makes Flake8 work like black
|
E203 # makes Flake8 work like black
|
||||||
E741
|
E741
|
||||||
E501 # long line checking is done in black
|
E501 # long line checking is done in black
|
||||||
exclude = test
|
exclude = test/
|
||||||
|
|||||||
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
core/dbt/include/index.html binary
|
||||||
|
tests/functional/artifacts/data/state/*/manifest.json binary
|
||||||
60
.github/CODEOWNERS
vendored
60
.github/CODEOWNERS
vendored
@@ -16,25 +16,57 @@
|
|||||||
# Changes to GitHub configurations including Actions
|
# Changes to GitHub configurations including Actions
|
||||||
/.github/ @leahwicz
|
/.github/ @leahwicz
|
||||||
|
|
||||||
|
### LANGUAGE
|
||||||
|
|
||||||
# Language core modules
|
# Language core modules
|
||||||
/core/dbt/config/ @dbt-labs/core-language
|
/core/dbt/config/ @dbt-labs/core-language
|
||||||
/core/dbt/context/ @dbt-labs/core-language
|
/core/dbt/context/ @dbt-labs/core-language
|
||||||
/core/dbt/contracts/ @dbt-labs/core-language
|
/core/dbt/contracts/ @dbt-labs/core-language
|
||||||
/core/dbt/deps/ @dbt-labs/core-language
|
/core/dbt/deps/ @dbt-labs/core-language
|
||||||
/core/dbt/parser/ @dbt-labs/core-language
|
/core/dbt/events/ @dbt-labs/core-language # structured logging
|
||||||
|
/core/dbt/parser/ @dbt-labs/core-language
|
||||||
|
|
||||||
|
# Language misc files
|
||||||
|
/core/dbt/dataclass_schema.py @dbt-labs/core-language
|
||||||
|
/core/dbt/hooks.py @dbt-labs/core-language
|
||||||
|
/core/dbt/node_types.py @dbt-labs/core-language
|
||||||
|
/core/dbt/semver.py @dbt-labs/core-language
|
||||||
|
|
||||||
|
|
||||||
|
### EXECUTION
|
||||||
|
|
||||||
# Execution core modules
|
# Execution core modules
|
||||||
/core/dbt/events/ @dbt-labs/core-execution @dbt-labs/core-language # eventually remove language but they have knowledge here now
|
/core/dbt/graph/ @dbt-labs/core-execution
|
||||||
/core/dbt/graph/ @dbt-labs/core-execution
|
/core/dbt/task/ @dbt-labs/core-execution
|
||||||
/core/dbt/task/ @dbt-labs/core-execution
|
|
||||||
|
|
||||||
# Adapter interface, scaffold, Postgres plugin
|
# Execution misc files
|
||||||
/core/dbt/adapters @dbt-labs/core-adapters
|
/core/dbt/compilation.py @dbt-labs/core-execution
|
||||||
/core/scripts/create_adapter_plugin.py @dbt-labs/core-adapters
|
/core/dbt/flags.py @dbt-labs/core-execution
|
||||||
/plugins/ @dbt-labs/core-adapters
|
/core/dbt/lib.py @dbt-labs/core-execution
|
||||||
|
/core/dbt/main.py @dbt-labs/core-execution
|
||||||
|
/core/dbt/profiler.py @dbt-labs/core-execution
|
||||||
|
/core/dbt/selected_resources.py @dbt-labs/core-execution
|
||||||
|
/core/dbt/tracking.py @dbt-labs/core-execution
|
||||||
|
/core/dbt/version.py @dbt-labs/core-execution
|
||||||
|
|
||||||
# Global project: default macros, including generic tests + materializations
|
|
||||||
/core/dbt/include/global_project @dbt-labs/core-execution @dbt-labs/core-adapters
|
### ADAPTERS
|
||||||
|
|
||||||
|
# Adapter interface ("base" + "sql" adapter defaults, cache)
|
||||||
|
/core/dbt/adapters @dbt-labs/core-adapters
|
||||||
|
|
||||||
|
# Global project (default macros + materializations), starter project
|
||||||
|
/core/dbt/include @dbt-labs/core-adapters
|
||||||
|
|
||||||
|
# Postgres plugin
|
||||||
|
/plugins/ @dbt-labs/core-adapters
|
||||||
|
|
||||||
|
# Functional tests for adapter plugins
|
||||||
|
/tests/adapter @dbt-labs/core-adapters
|
||||||
|
|
||||||
|
### TESTS
|
||||||
|
|
||||||
|
# Overlapping ownership for vast majority of unit + functional tests
|
||||||
|
|
||||||
# Perf regression testing framework
|
# Perf regression testing framework
|
||||||
# This excludes the test project files itself since those aren't specific
|
# This excludes the test project files itself since those aren't specific
|
||||||
|
|||||||
30
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
30
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -9,23 +9,33 @@ body:
|
|||||||
Thanks for taking the time to fill out this bug report!
|
Thanks for taking the time to fill out this bug report!
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
attributes:
|
attributes:
|
||||||
label: Is there an existing issue for this?
|
label: Is this a new bug in dbt-core?
|
||||||
description: Please search to see if an issue already exists for the bug you encountered.
|
description: >
|
||||||
|
In other words, is this an error, flaw, failure or fault in our software?
|
||||||
|
|
||||||
|
If this is a bug that broke existing functionality that used to work, please open a regression issue.
|
||||||
|
If this is a bug in an adapter plugin, please open an issue in the adapter's repository.
|
||||||
|
If this is a bug experienced while using dbt Cloud, please report to [support](mailto:support@getdbt.com).
|
||||||
|
If this is a request for help or troubleshooting code in your own dbt project, please join our [dbt Community Slack](https://www.getdbt.com/community/join-the-community/) or open a [Discussion question](https://github.com/dbt-labs/docs.getdbt.com/discussions).
|
||||||
|
|
||||||
|
Please search to see if an issue already exists for the bug you encountered.
|
||||||
options:
|
options:
|
||||||
- label: I have searched the existing issues
|
- label: I believe this is a new bug in dbt-core
|
||||||
|
required: true
|
||||||
|
- label: I have searched the existing issues, and I could not find an existing issue for this bug
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Current Behavior
|
label: Current Behavior
|
||||||
description: A concise description of what you're experiencing.
|
description: A concise description of what you're experiencing.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Expected Behavior
|
label: Expected Behavior
|
||||||
description: A concise description of what you expected to happen.
|
description: A concise description of what you expected to happen.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Steps To Reproduce
|
label: Steps To Reproduce
|
||||||
@@ -36,7 +46,7 @@ body:
|
|||||||
3. Run '...'
|
3. Run '...'
|
||||||
4. See error...
|
4. See error...
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: logs
|
id: logs
|
||||||
attributes:
|
attributes:
|
||||||
@@ -52,8 +62,8 @@ body:
|
|||||||
description: |
|
description: |
|
||||||
examples:
|
examples:
|
||||||
- **OS**: Ubuntu 20.04
|
- **OS**: Ubuntu 20.04
|
||||||
- **Python**: 3.7.2 (`python --version`)
|
- **Python**: 3.9.12 (`python3 --version`)
|
||||||
- **dbt**: 0.21.0 (`dbt --version`)
|
- **dbt-core**: 1.1.1 (`dbt --version`)
|
||||||
value: |
|
value: |
|
||||||
- OS:
|
- OS:
|
||||||
- Python:
|
- Python:
|
||||||
@@ -64,13 +74,15 @@ body:
|
|||||||
- type: dropdown
|
- type: dropdown
|
||||||
id: database
|
id: database
|
||||||
attributes:
|
attributes:
|
||||||
label: What database are you using dbt with?
|
label: Which database adapter are you using with dbt?
|
||||||
|
description: If the bug is specific to the database or adapter, please open the issue in that adapter's repository instead
|
||||||
multiple: true
|
multiple: true
|
||||||
options:
|
options:
|
||||||
- postgres
|
- postgres
|
||||||
- redshift
|
- redshift
|
||||||
- snowflake
|
- snowflake
|
||||||
- bigquery
|
- bigquery
|
||||||
|
- spark
|
||||||
- other (mention it in "Additional Context")
|
- other (mention it in "Additional Context")
|
||||||
validations:
|
validations:
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
19
.github/ISSUE_TEMPLATE/config.yml
vendored
19
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,4 +1,14 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
|
- name: Ask the community for help
|
||||||
|
url: https://github.com/dbt-labs/docs.getdbt.com/discussions
|
||||||
|
about: Need help troubleshooting? Check out our guide on how to ask
|
||||||
|
- name: Contact dbt Cloud support
|
||||||
|
url: mailto:support@getdbt.com
|
||||||
|
about: Are you using dbt Cloud? Contact our support team for help!
|
||||||
|
- name: Participate in Discussions
|
||||||
|
url: https://github.com/dbt-labs/dbt-core/discussions
|
||||||
|
about: Do you have a Big Idea for dbt? Read open discussions, or start a new one
|
||||||
- name: Create an issue for dbt-redshift
|
- name: Create an issue for dbt-redshift
|
||||||
url: https://github.com/dbt-labs/dbt-redshift/issues/new/choose
|
url: https://github.com/dbt-labs/dbt-redshift/issues/new/choose
|
||||||
about: Report a bug or request a feature for dbt-redshift
|
about: Report a bug or request a feature for dbt-redshift
|
||||||
@@ -8,9 +18,6 @@ contact_links:
|
|||||||
- name: Create an issue for dbt-snowflake
|
- name: Create an issue for dbt-snowflake
|
||||||
url: https://github.com/dbt-labs/dbt-snowflake/issues/new/choose
|
url: https://github.com/dbt-labs/dbt-snowflake/issues/new/choose
|
||||||
about: Report a bug or request a feature for dbt-snowflake
|
about: Report a bug or request a feature for dbt-snowflake
|
||||||
- name: Ask a question or get support
|
- name: Create an issue for dbt-spark
|
||||||
url: https://docs.getdbt.com/docs/guides/getting-help
|
url: https://github.com/dbt-labs/dbt-spark/issues/new/choose
|
||||||
about: Ask a question or request support
|
about: Report a bug or request a feature for dbt-spark
|
||||||
- name: Questions on Stack Overflow
|
|
||||||
url: https://stackoverflow.com/questions/tagged/dbt
|
|
||||||
about: Look at questions/answers at Stack Overflow
|
|
||||||
|
|||||||
22
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
22
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
@@ -1,5 +1,5 @@
|
|||||||
name: ✨ Feature
|
name: ✨ Feature
|
||||||
description: Suggest an idea for dbt
|
description: Propose a straightforward extension of dbt functionality
|
||||||
title: "[Feature] <title>"
|
title: "[Feature] <title>"
|
||||||
labels: ["enhancement", "triage"]
|
labels: ["enhancement", "triage"]
|
||||||
body:
|
body:
|
||||||
@@ -9,18 +9,24 @@ body:
|
|||||||
Thanks for taking the time to fill out this feature request!
|
Thanks for taking the time to fill out this feature request!
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
attributes:
|
attributes:
|
||||||
label: Is there an existing feature request for this?
|
label: Is this your first time submitting a feature request?
|
||||||
description: Please search to see if an issue already exists for the feature you would like.
|
description: >
|
||||||
options:
|
We want to make sure that features are distinct and discoverable,
|
||||||
- label: I have searched the existing issues
|
so that other members of the community can find them and offer their thoughts.
|
||||||
required: true
|
|
||||||
label: Is this your first time opening an issue?
|
Issues are the right place to request straightforward extensions of existing dbt functionality.
|
||||||
|
For "big ideas" about future capabilities of dbt, we ask that you open a
|
||||||
|
[discussion](https://github.com/dbt-labs/dbt-core/discussions) in the "Ideas" category instead.
|
||||||
options:
|
options:
|
||||||
- label: I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
|
- label: I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations)
|
||||||
required: true
|
required: true
|
||||||
|
- label: I have searched the existing issues, and I could not find an existing issue for this feature
|
||||||
|
required: true
|
||||||
|
- label: I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion
|
||||||
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Describe the Feature
|
label: Describe the feature
|
||||||
description: A clear and concise description of what you want to happen.
|
description: A clear and concise description of what you want to happen.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
93
.github/ISSUE_TEMPLATE/regression-report.yml
vendored
Normal file
93
.github/ISSUE_TEMPLATE/regression-report.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
name: ☣️ Regression
|
||||||
|
description: Report a regression you've observed in a newer version of dbt
|
||||||
|
title: "[Regression] <title>"
|
||||||
|
labels: ["bug", "regression", "triage"]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to fill out this regression report!
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Is this a regression in a recent version of dbt-core?
|
||||||
|
description: >
|
||||||
|
A regression is when documented functionality works as expected in an older version of dbt-core,
|
||||||
|
and no longer works after upgrading to a newer version of dbt-core
|
||||||
|
options:
|
||||||
|
- label: I believe this is a regression in dbt-core functionality
|
||||||
|
required: true
|
||||||
|
- label: I have searched the existing issues, and I could not find an existing issue for this regression
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Current Behavior
|
||||||
|
description: A concise description of what you're experiencing.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Expected/Previous Behavior
|
||||||
|
description: A concise description of what you expected to happen.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Steps To Reproduce
|
||||||
|
description: Steps to reproduce the behavior.
|
||||||
|
placeholder: |
|
||||||
|
1. In this environment...
|
||||||
|
2. With this config...
|
||||||
|
3. Run '...'
|
||||||
|
4. See error...
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: logs
|
||||||
|
attributes:
|
||||||
|
label: Relevant log output
|
||||||
|
description: |
|
||||||
|
If applicable, log output to help explain your problem.
|
||||||
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Environment
|
||||||
|
description: |
|
||||||
|
examples:
|
||||||
|
- **OS**: Ubuntu 20.04
|
||||||
|
- **Python**: 3.9.12 (`python3 --version`)
|
||||||
|
- **dbt-core (working version)**: 1.1.1 (`dbt --version`)
|
||||||
|
- **dbt-core (regression version)**: 1.2.0 (`dbt --version`)
|
||||||
|
value: |
|
||||||
|
- OS:
|
||||||
|
- Python:
|
||||||
|
- dbt (working version):
|
||||||
|
- dbt (regression version):
|
||||||
|
render: markdown
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
id: database
|
||||||
|
attributes:
|
||||||
|
label: Which database adapter are you using with dbt?
|
||||||
|
description: If the regression is specific to the database or adapter, please open the issue in that adapter's repository instead
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- postgres
|
||||||
|
- redshift
|
||||||
|
- snowflake
|
||||||
|
- bigquery
|
||||||
|
- spark
|
||||||
|
- other (mention it in "Additional Context")
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional Context
|
||||||
|
description: |
|
||||||
|
Links? References? Anything that will give us more context about the issue you are encountering!
|
||||||
|
|
||||||
|
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
216
.github/_README.md
vendored
Normal file
216
.github/_README.md
vendored
Normal file
@@ -0,0 +1,216 @@
|
|||||||
|
<!-- GitHub will publish this readme on the main repo page if the name is `README.md` so we've added the leading underscore to prevent this -->
|
||||||
|
<!-- Do not rename this file `README.md` -->
|
||||||
|
<!-- See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes -->
|
||||||
|
|
||||||
|
## What are GitHub Actions?
|
||||||
|
|
||||||
|
GitHub Actions are used for many different purposes. We use them to run tests in CI, validate PRs are in an expected state, and automate processes.
|
||||||
|
|
||||||
|
- [Overview of GitHub Actions](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions)
|
||||||
|
- [What's a workflow?](https://docs.github.com/en/actions/using-workflows/about-workflows)
|
||||||
|
- [GitHub Actions guides](https://docs.github.com/en/actions/guides)
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
## Where do actions and workflows live
|
||||||
|
|
||||||
|
We try to maintain actions that are shared across repositories in a single place so that necesary changes can be made in a single place.
|
||||||
|
|
||||||
|
[dbt-labs/actions](https://github.com/dbt-labs/actions/) is the central repository of actions and workflows we use across repositories.
|
||||||
|
|
||||||
|
GitHub Actions also live locally within a repository. The workflows can be found at `.github/workflows` from the root of the repository. These should be specific to that code base.
|
||||||
|
|
||||||
|
Note: We are actively moving actions into the central Action repository so there is currently some duplication across repositories.
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
## Basics of Using Actions
|
||||||
|
|
||||||
|
### Viewing Output
|
||||||
|
|
||||||
|
- View the detailed action output for your PR in the **Checks** tab of the PR. This only shows the most recent run. You can also view high level **Checks** output at the bottom on the PR.
|
||||||
|
|
||||||
|
- View _all_ action output for a repository from the [**Actions**](https://github.com/dbt-labs/dbt-core/actions) tab. Workflow results last 1 year. Artifacts last 90 days, unless specified otherwise in individual workflows.
|
||||||
|
|
||||||
|
This view often shows what seem like duplicates of the same workflow. This occurs when files are renamed but the workflow name has not changed. These are in fact _not_ duplicates.
|
||||||
|
|
||||||
|
You can see the branch the workflow runs from in this view. It is listed in the table between the workflow name and the time/duration of the run. When blank, the workflow is running in the context of the `main` branch.
|
||||||
|
|
||||||
|
### How to view what workflow file is being referenced from a run
|
||||||
|
|
||||||
|
- When viewing the output of a specific workflow run, click the 3 dots at the top right of the display. There will be an option to `View workflow file`.
|
||||||
|
|
||||||
|
### How to manually run a workflow
|
||||||
|
|
||||||
|
- If a workflow has the `on: workflow_dispatch` trigger, it can be manually triggered
|
||||||
|
- From the [**Actions**](https://github.com/dbt-labs/dbt-core/actions) tab, find the workflow you want to run, select it and fill in any inputs requied. That's it!
|
||||||
|
|
||||||
|
### How to re-run jobs
|
||||||
|
|
||||||
|
- Some actions cannot be rerun in the GitHub UI. Namely the snyk checks and the cla check. Snyk checks are rerun by closing and reopening the PR. You can retrigger the cla check by commenting on the PR with `@cla-bot check`
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
## General Standards
|
||||||
|
|
||||||
|
### Permissions
|
||||||
|
- By default, workflows have read permissions in the repository for the contents scope only when no permissions are explicitly set.
|
||||||
|
- It is best practice to always define the permissions explicitly. This will allow actions to continue to work when the default permissions on the repository are changed. It also allows explicit grants of the least permissions possible.
|
||||||
|
- There are a lot of permissions available. [Read up on them](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs) if you're unsure what to use.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
```
|
||||||
|
|
||||||
|
### Secrets
|
||||||
|
- When to use a [Personal Access Token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) vs the [GITHUB_TOKEN](https://docs.github.com/en/actions/security-guides/automatic-token-authentication) generated for the action?
|
||||||
|
|
||||||
|
The `GITHUB_TOKEN` is used by default. In most cases it is sufficient for what you need.
|
||||||
|
|
||||||
|
If you expect the workflow to result in a commit to that should retrigger workflows, you will need to use a Personal Access Token for the bot to commit the file. When using the GITHUB_TOKEN, the resulting commit will not trigger another GitHub Actions Workflow run. This is due to limitations set by GitHub. See [the docs](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow) for a more detailed explanation.
|
||||||
|
|
||||||
|
For example, we must use a PAT in our workflow to commit a new changelog yaml file for bot PRs. Once the file has been committed to the branch, it should retrigger the check to validate that a changelog exists on the PR. Otherwise, it would stay in a failed state since the check would never retrigger.
|
||||||
|
|
||||||
|
### Triggers
|
||||||
|
You can configure your workflows to run when specific activity on GitHub happens, at a scheduled time, or when an event outside of GitHub occurs. Read more details in the [GitHub docs](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows).
|
||||||
|
|
||||||
|
These triggers are under the `on` key of the workflow and more than one can be listed.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
- "*.latest"
|
||||||
|
- "releases/*"
|
||||||
|
pull_request:
|
||||||
|
# catch when the PR is opened with the label or when the label is added
|
||||||
|
types: [opened, labeled]
|
||||||
|
workflow_dispatch:
|
||||||
|
```
|
||||||
|
|
||||||
|
Some triggers of note that we use:
|
||||||
|
|
||||||
|
- `push` - Runs your workflow when you push a commit or tag.
|
||||||
|
- `pull_request` - Runs your workflow when activity on a pull request in the workflow's repository occurs. Takes in a list of activity types (opened, labeled, etc) if appropriate.
|
||||||
|
- `pull_request_target` - Same as `pull_request` but runs in the context of the PR target branch.
|
||||||
|
- `workflow_call` - used with reusable workflows. Triggered by another workflow calling it.
|
||||||
|
- `workflow_dispatch` - Gives the ability to manually trigger a workflow from the GitHub API, GitHub CLI, or GitHub browser interface.
|
||||||
|
|
||||||
|
|
||||||
|
### Basic Formatting
|
||||||
|
- Add a description of what your workflow does at the top in this format
|
||||||
|
|
||||||
|
```
|
||||||
|
# **what?**
|
||||||
|
# Describe what the action does.
|
||||||
|
|
||||||
|
# **why?**
|
||||||
|
# Why does this action exist?
|
||||||
|
|
||||||
|
# **when?**
|
||||||
|
# How/when will it be triggered?
|
||||||
|
```
|
||||||
|
|
||||||
|
- Leave blank lines between steps and jobs
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
jobs:
|
||||||
|
dependency_changelog:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Get File Name Timestamp
|
||||||
|
id: filename_time
|
||||||
|
uses: nanzm/get-time-action@v1.1
|
||||||
|
with:
|
||||||
|
format: 'YYYYMMDD-HHmmss'
|
||||||
|
|
||||||
|
- name: Get File Content Timestamp
|
||||||
|
id: file_content_time
|
||||||
|
uses: nanzm/get-time-action@v1.1
|
||||||
|
with:
|
||||||
|
format: 'YYYY-MM-DDTHH:mm:ss.000000-05:00'
|
||||||
|
|
||||||
|
- name: Generate Filepath
|
||||||
|
id: fp
|
||||||
|
run: |
|
||||||
|
FILEPATH=.changes/unreleased/Dependencies-${{ steps.filename_time.outputs.time }}.yaml
|
||||||
|
echo "FILEPATH=$FILEPATH" >> $GITHUB_OUTPUT
|
||||||
|
```
|
||||||
|
|
||||||
|
- Print out all variables you will reference as the first step of a job. This allows for easier debugging. The first job should log all inputs. Subsequent jobs should reference outputs of other jobs, if present.
|
||||||
|
|
||||||
|
When possible, generate variables at the top of your workflow in a single place to reference later. This is not always strictly possible since you may generate a value to be used later mid-workflow.
|
||||||
|
|
||||||
|
Be sure to use quotes around these logs so special characters are not interpreted.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
job1:
|
||||||
|
- name: "[DEBUG] Print Variables"
|
||||||
|
run: |
|
||||||
|
echo "all variables defined as inputs"
|
||||||
|
echo "The last commit sha in the release: ${{ inputs.sha }}"
|
||||||
|
echo "The release version number: ${{ inputs.version_number }}"
|
||||||
|
echo "The changelog_path: ${{ inputs.changelog_path }}"
|
||||||
|
echo "The build_script_path: ${{ inputs.build_script_path }}"
|
||||||
|
echo "The s3_bucket_name: ${{ inputs.s3_bucket_name }}"
|
||||||
|
echo "The package_test_command: ${{ inputs.package_test_command }}"
|
||||||
|
|
||||||
|
# collect all the variables that need to be used in subsequent jobs
|
||||||
|
- name: Set Variables
|
||||||
|
id: variables
|
||||||
|
run: |
|
||||||
|
echo "important_path='performance/runner/Cargo.toml'" >> $GITHUB_OUTPUT
|
||||||
|
echo "release_id=${{github.event.inputs.release_id}}" >> $GITHUB_OUTPUT
|
||||||
|
echo "open_prs=${{github.event.inputs.open_prs}}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
job2:
|
||||||
|
needs: [job1]
|
||||||
|
- name: "[DEBUG] Print Variables"
|
||||||
|
run: |
|
||||||
|
echo "all variables defined in job1 > Set Variables > outputs"
|
||||||
|
echo "important_path: ${{ needs.job1.outputs.important_path }}"
|
||||||
|
echo "release_id: ${{ needs.job1.outputs.release_id }}"
|
||||||
|
echo "open_prs: ${{ needs.job1.outputs.open_prs }}"
|
||||||
|
```
|
||||||
|
|
||||||
|
- When it's not obvious what something does, add a comment!
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
|
||||||
|
### Context
|
||||||
|
- The [GitHub CLI](https://cli.github.com/) is available in the default runners
|
||||||
|
- Actions run in your context. ie, using an action from the marketplace that uses the GITHUB_TOKEN uses the GITHUB_TOKEN generated by your workflow run.
|
||||||
|
|
||||||
|
### Actions from the Marketplace
|
||||||
|
- Don’t use external actions for things that can easily be accomplished manually.
|
||||||
|
- Always read through what an external action does before using it! Often an action in the GitHub Actions Marketplace can be replaced with a few lines in bash. This is much more maintainable (and won’t change under us) and clear as to what’s actually happening. It also prevents any
|
||||||
|
- Pin actions _we don't control_ to tags.
|
||||||
|
|
||||||
|
### Connecting to AWS
|
||||||
|
- Authenticate with the aws managed workflow
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Configure AWS credentials from Test account
|
||||||
|
uses: aws-actions/configure-aws-credentials@v1
|
||||||
|
with:
|
||||||
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
aws-region: us-east-1
|
||||||
|
```
|
||||||
|
|
||||||
|
- Then access with the aws command that comes installed on the action runner machines
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Copy Artifacts from S3 via CLI
|
||||||
|
run: aws s3 cp ${{ env.s3_bucket }} . --recursive
|
||||||
|
```
|
||||||
|
|
||||||
|
### Testing
|
||||||
|
|
||||||
|
- Depending on what your action does, you may be able to use [`act`](https://github.com/nektos/act) to test the action locally. Some features of GitHub Actions do not work with `act`, among those are reusable workflows. If you can't use `act`, you'll have to push your changes up before being able to test. This can be slow.
|
||||||
17
.github/actions/latest-wrangler/main.py
vendored
17
.github/actions/latest-wrangler/main.py
vendored
@@ -28,11 +28,12 @@ if __name__ == "__main__":
|
|||||||
if package_request.status_code == 404:
|
if package_request.status_code == 404:
|
||||||
if halt_on_missing:
|
if halt_on_missing:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
# everything is the latest if the package doesn't exist
|
||||||
# everything is the latest if the package doesn't exist
|
github_output = os.environ.get("GITHUB_OUTPUT")
|
||||||
print(f"::set-output name=latest::{True}")
|
with open(github_output, "at", encoding="utf-8") as gh_output:
|
||||||
print(f"::set-output name=minor_latest::{True}")
|
gh_output.write("latest=True")
|
||||||
sys.exit(0)
|
gh_output.write("minor_latest=True")
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
# TODO: verify package meta is "correct"
|
# TODO: verify package meta is "correct"
|
||||||
# https://github.com/dbt-labs/dbt-core/issues/4640
|
# https://github.com/dbt-labs/dbt-core/issues/4640
|
||||||
@@ -91,5 +92,7 @@ if __name__ == "__main__":
|
|||||||
latest = is_latest(pre_rel, new_version, current_latest)
|
latest = is_latest(pre_rel, new_version, current_latest)
|
||||||
minor_latest = is_latest(pre_rel, new_version, current_minor_latest)
|
minor_latest = is_latest(pre_rel, new_version, current_minor_latest)
|
||||||
|
|
||||||
print(f"::set-output name=latest::{latest}")
|
github_output = os.environ.get("GITHUB_OUTPUT")
|
||||||
print(f"::set-output name=minor_latest::{minor_latest}")
|
with open(github_output, "at", encoding="utf-8") as gh_output:
|
||||||
|
gh_output.write(f"latest={latest}")
|
||||||
|
gh_output.write(f"minor_latest={minor_latest}")
|
||||||
|
|||||||
2
.github/pull_request_template.md
vendored
2
.github/pull_request_template.md
vendored
@@ -20,4 +20,4 @@ resolves #
|
|||||||
- [ ] I have run this code in development and it appears to resolve the stated issue
|
- [ ] 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 includes tests, or tests are not required/relevant for this PR
|
||||||
- [ ] I have [opened an issue to add/update docs](https://github.com/dbt-labs/docs.getdbt.com/issues/new/choose), or docs changes are not required/relevant for this PR
|
- [ ] I have [opened an issue to add/update docs](https://github.com/dbt-labs/docs.getdbt.com/issues/new/choose), or docs changes are not required/relevant for this PR
|
||||||
- [ ] I have run `changie new` to [create a changelog entry](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#Adding-CHANGELOG-Entry)
|
- [ ] I have run `changie new` to [create a changelog entry](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-a-changelog-entry)
|
||||||
|
|||||||
61
.github/workflows/bot-changelog.yml
vendored
Normal file
61
.github/workflows/bot-changelog.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# **what?**
|
||||||
|
# When bots create a PR, this action will add a corresponding changie yaml file to that
|
||||||
|
# PR when a specific label is added.
|
||||||
|
#
|
||||||
|
# The file is created off a template:
|
||||||
|
#
|
||||||
|
# kind: <per action matrix>
|
||||||
|
# body: <PR title>
|
||||||
|
# time: <current timestamp>
|
||||||
|
# custom:
|
||||||
|
# Author: <PR User Login (generally the bot)>
|
||||||
|
# Issue: 4904
|
||||||
|
# PR: <PR number>
|
||||||
|
#
|
||||||
|
# **why?**
|
||||||
|
# Automate changelog generation for more visability with automated bot PRs.
|
||||||
|
#
|
||||||
|
# **when?**
|
||||||
|
# Once a PR is created, label should be added to PR before or after creation. You can also
|
||||||
|
# manually trigger this by adding the appropriate label at any time.
|
||||||
|
#
|
||||||
|
# **how to add another bot?**
|
||||||
|
# Add the label and changie kind to the include matrix. That's it!
|
||||||
|
#
|
||||||
|
|
||||||
|
name: Bot Changelog
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
# catch when the PR is opened with the label or when the label is added
|
||||||
|
types: [labeled]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generate_changelog:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- label: "dependencies"
|
||||||
|
changie_kind: "Dependencies"
|
||||||
|
- label: "snyk"
|
||||||
|
changie_kind: "Security"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Create and commit changelog on bot PR
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, matrix.label) }}
|
||||||
|
id: bot_changelog
|
||||||
|
uses: emmyoop/changie_bot@v1.0.1
|
||||||
|
with:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.FISHTOWN_BOT_PAT }}
|
||||||
|
commit_author_name: "Github Build Bot"
|
||||||
|
commit_author_email: "<buildbot@fishtownanalytics.com>"
|
||||||
|
commit_message: "Add automated changelog yaml from template for bot PR"
|
||||||
|
changie_kind: ${{ matrix.changie_kind }}
|
||||||
|
label: ${{ matrix.label }}
|
||||||
|
custom_changelog_string: "custom:\n Author: ${{ github.event.pull_request.user.login }}\n PR: ${{ github.event.pull_request.number }}"
|
||||||
78
.github/workflows/changelog-check.yml
vendored
78
.github/workflows/changelog-check.yml
vendored
@@ -1,78 +0,0 @@
|
|||||||
# **what?**
|
|
||||||
# Checks that a file has been committed under the /.changes directory
|
|
||||||
# as a new CHANGELOG entry. Cannot check for a specific filename as
|
|
||||||
# it is dynamically generated by change type and timestamp.
|
|
||||||
# This workflow should not require any secrets since it runs for PRs
|
|
||||||
# from forked repos.
|
|
||||||
# By default, secrets are not passed to workflows running from
|
|
||||||
# a forked repo.
|
|
||||||
|
|
||||||
# **why?**
|
|
||||||
# Ensure code change gets reflected in the CHANGELOG.
|
|
||||||
|
|
||||||
# **when?**
|
|
||||||
# This will run for all PRs going into main and *.latest. It will
|
|
||||||
# run when they are opened, reopened, when any label is added or removed
|
|
||||||
# and when new code is pushed to the branch. The action will then get
|
|
||||||
# skipped if the 'Skip Changelog' label is present is any of the labels.
|
|
||||||
|
|
||||||
name: Check Changelog Entry
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [opened, reopened, labeled, unlabeled, synchronize]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
env:
|
|
||||||
changelog_comment: '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 contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry).'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
changelog:
|
|
||||||
name: changelog
|
|
||||||
if: "!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')"
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Check if changelog file was added
|
|
||||||
# https://github.com/marketplace/actions/paths-changes-filter
|
|
||||||
# For each filter, it sets output variable named by the filter to the text:
|
|
||||||
# 'true' - if any of changed files matches any of filter rules
|
|
||||||
# 'false' - if none of changed files matches any of filter rules
|
|
||||||
# also, returns:
|
|
||||||
# `changes` - JSON array with names of all filters matching any of the changed files
|
|
||||||
uses: dorny/paths-filter@v2
|
|
||||||
id: filter
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
filters: |
|
|
||||||
changelog:
|
|
||||||
- added: '.changes/unreleased/**.yaml'
|
|
||||||
- name: Check if comment already exists
|
|
||||||
uses: peter-evans/find-comment@v1
|
|
||||||
id: changelog_comment
|
|
||||||
with:
|
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
|
||||||
comment-author: 'github-actions[bot]'
|
|
||||||
body-includes: ${{ env.changelog_comment }}
|
|
||||||
- name: Create PR comment if changelog entry is missing, required, and does not exist
|
|
||||||
if: |
|
|
||||||
steps.filter.outputs.changelog == 'false' &&
|
|
||||||
steps.changelog_comment.outputs.comment-body == ''
|
|
||||||
uses: peter-evans/create-or-update-comment@v1
|
|
||||||
with:
|
|
||||||
issue-number: ${{ github.event.pull_request.number }}
|
|
||||||
body: ${{ env.changelog_comment }}
|
|
||||||
- name: Fail job if changelog entry is missing and required
|
|
||||||
if: steps.filter.outputs.changelog == 'false'
|
|
||||||
uses: actions/github-script@v6
|
|
||||||
with:
|
|
||||||
script: core.setFailed('Changelog entry required to merge.')
|
|
||||||
40
.github/workflows/changelog-existence.yml
vendored
Normal file
40
.github/workflows/changelog-existence.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# **what?**
|
||||||
|
# Checks that a file has been committed under the /.changes directory
|
||||||
|
# as a new CHANGELOG entry. Cannot check for a specific filename as
|
||||||
|
# it is dynamically generated by change type and timestamp.
|
||||||
|
# This workflow should not require any secrets since it runs for PRs
|
||||||
|
# from forked repos.
|
||||||
|
# By default, secrets are not passed to workflows running from
|
||||||
|
# a forked repo.
|
||||||
|
|
||||||
|
# **why?**
|
||||||
|
# Ensure code change gets reflected in the CHANGELOG.
|
||||||
|
|
||||||
|
# **when?**
|
||||||
|
# This will run for all PRs going into main and *.latest. It will
|
||||||
|
# run when they are opened, reopened, when any label is added or removed
|
||||||
|
# and when new code is pushed to the branch. The action will then get
|
||||||
|
# skipped if the 'Skip Changelog' label is present is any of the labels.
|
||||||
|
|
||||||
|
name: Check Changelog Entry
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, reopened, labeled, unlabeled, synchronize]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
changelog:
|
||||||
|
uses: dbt-labs/actions/.github/workflows/changelog-existence.yml@main
|
||||||
|
with:
|
||||||
|
changelog_comment: '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 contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry).'
|
||||||
|
skip_label: 'Skip Changelog'
|
||||||
|
secrets: inherit
|
||||||
114
.github/workflows/dependency-changelog.yml
vendored
114
.github/workflows/dependency-changelog.yml
vendored
@@ -1,114 +0,0 @@
|
|||||||
# **what?**
|
|
||||||
# When dependabot create a PR, it always adds the `dependencies` label. This
|
|
||||||
# action will add a corresponding changie yaml file to that PR when that label is added.
|
|
||||||
# The file is created off a template:
|
|
||||||
#
|
|
||||||
# kind: Dependencies
|
|
||||||
# body: <PR title>
|
|
||||||
# time: <current timestamp>
|
|
||||||
# custom:
|
|
||||||
# Author: dependabot
|
|
||||||
# Issue: 4904
|
|
||||||
# PR: <PR number>
|
|
||||||
#
|
|
||||||
# **why?**
|
|
||||||
# Automate changelog generation for more visability with automated dependency updates via dependabot.
|
|
||||||
|
|
||||||
# **when?**
|
|
||||||
# Once a PR is created and it has been correctly labeled with `dependencies`. The intended use
|
|
||||||
# is for the PRs created by dependabot. You can also manually trigger this by adding the
|
|
||||||
# `dependencies` label at any time.
|
|
||||||
|
|
||||||
name: Dependency Changelog
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
# catch when the PR is opened with the label or when the label is added
|
|
||||||
types: [opened, labeled]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
dependency_changelog:
|
|
||||||
if: "contains(github.event.pull_request.labels.*.name, 'dependencies')"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# timestamp changes the order the changelog entries are listed in the final Changelog.md file. Precision is not
|
|
||||||
# important here.
|
|
||||||
# The timestamp on the filename and the timestamp in the contents of the file have different expected formats.
|
|
||||||
- name: Get File Name Timestamp
|
|
||||||
id: filename_time
|
|
||||||
uses: nanzm/get-time-action@v1.1
|
|
||||||
with:
|
|
||||||
format: 'YYYYMMDD-HHmmss'
|
|
||||||
|
|
||||||
- name: Get File Content Timestamp
|
|
||||||
id: file_content_time
|
|
||||||
uses: nanzm/get-time-action@v1.1
|
|
||||||
with:
|
|
||||||
format: 'YYYY-MM-DDTHH:mm:ss.000000-05:00'
|
|
||||||
|
|
||||||
# changie expects files to be named in a specific pattern.
|
|
||||||
- name: Generate Filepath
|
|
||||||
id: fp
|
|
||||||
run: |
|
|
||||||
FILEPATH=.changes/unreleased/Dependencies-${{ steps.filename_time.outputs.time }}.yaml
|
|
||||||
echo "::set-output name=FILEPATH::$FILEPATH"
|
|
||||||
|
|
||||||
- name: Check if changelog file exists already
|
|
||||||
# if there's already a changelog entry, don't add another one!
|
|
||||||
# https://github.com/marketplace/actions/paths-changes-filter
|
|
||||||
# For each filter, it sets output variable named by the filter to the text:
|
|
||||||
# 'true' - if any of changed files matches any of filter rules
|
|
||||||
# 'false' - if none of changed files matches any of filter rules
|
|
||||||
# also, returns:
|
|
||||||
# `changes` - JSON array with names of all filters matching any of the changed files
|
|
||||||
uses: dorny/paths-filter@v2
|
|
||||||
id: changelog_check
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
filters: |
|
|
||||||
exists:
|
|
||||||
- added: '.changes/unreleased/**.yaml'
|
|
||||||
|
|
||||||
- name: Checkout Branch
|
|
||||||
if: steps.changelog_check.outputs.exists == 'false'
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
# specifying the ref avoids checking out the repository in a detached state
|
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
|
||||||
# If this is not set to false, Git push is performed with github.token and not the token
|
|
||||||
# configured using the env: GITHUB_TOKEN in commit step
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Create file from template
|
|
||||||
if: steps.changelog_check.outputs.exists == 'false'
|
|
||||||
run: |
|
|
||||||
echo kind: Dependencies > "${{ steps.fp.outputs.FILEPATH }}"
|
|
||||||
echo 'body: "${{ github.event.pull_request.title }}"' >> "${{ steps.fp.outputs.FILEPATH }}"
|
|
||||||
echo time: "${{ steps.file_content_time.outputs.time }}" >> "${{ steps.fp.outputs.FILEPATH }}"
|
|
||||||
echo custom: >> "${{ steps.fp.outputs.FILEPATH }}"
|
|
||||||
echo ' Author: ${{ github.event.pull_request.user.login }}' >> "${{ steps.fp.outputs.FILEPATH }}"
|
|
||||||
echo ' Issue: "4904"' >> "${{ steps.fp.outputs.FILEPATH }}" # github.event.pull_request.issue for auto id?
|
|
||||||
echo ' PR: "${{ github.event.pull_request.number }}"' >> "${{ steps.fp.outputs.FILEPATH }}"
|
|
||||||
|
|
||||||
- name: Commit Changelog File
|
|
||||||
if: steps.changelog_check.outputs.exists == 'false'
|
|
||||||
uses: gr2m/create-or-update-pull-request-action@v1
|
|
||||||
env:
|
|
||||||
# When using the GITHUB_TOKEN, the resulting commit will not trigger another GitHub Actions
|
|
||||||
# Workflow run. This is due to limitations set by GitHub.
|
|
||||||
# See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
|
|
||||||
# When you use the repository's GITHUB_TOKEN to perform tasks on behalf of the GitHub Actions
|
|
||||||
# app, events triggered by the GITHUB_TOKEN will not create a new workflow run. This prevents
|
|
||||||
# you from accidentally creating recursive workflow runs. To get around this, use a Personal
|
|
||||||
# Access Token to commit changes.
|
|
||||||
GITHUB_TOKEN: ${{ secrets.FISHTOWN_BOT_PAT }}
|
|
||||||
with:
|
|
||||||
branch: ${{ github.event.pull_request.head.ref }}
|
|
||||||
# author expected in the format "Lorem J. Ipsum <lorem@example.com>"
|
|
||||||
author: "Github Build Bot <buildbot@fishtownanalytics.com>"
|
|
||||||
commit-message: "Add automated changelog yaml from template"
|
|
||||||
165
.github/workflows/generate-cli-api-docs.yml
vendored
Normal file
165
.github/workflows/generate-cli-api-docs.yml
vendored
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
# **what?**
|
||||||
|
# On push, if anything in core/dbt/docs or core/dbt/cli has been
|
||||||
|
# created or modified, regenerate the CLI API docs using sphinx.
|
||||||
|
|
||||||
|
# **why?**
|
||||||
|
# We watch for changes in core/dbt/cli because the CLI API docs rely on click
|
||||||
|
# and all supporting flags/params to be generated. We watch for changes in
|
||||||
|
# core/dbt/docs since any changes to sphinx configuration or any of the
|
||||||
|
# .rst files there could result in a differently build final index.html file.
|
||||||
|
|
||||||
|
# **when?**
|
||||||
|
# Whenever a change has been pushed to a branch, and only if there is a diff
|
||||||
|
# between the PR branch and main's core/dbt/cli and or core/dbt/docs dirs.
|
||||||
|
|
||||||
|
# TODO: add bot comment to PR informing contributor that the docs have been committed
|
||||||
|
# TODO: figure out why github action triggered pushes cause github to fail to report
|
||||||
|
# the status of jobs
|
||||||
|
|
||||||
|
name: Generate CLI API docs
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
CLI_DIR: ${{ github.workspace }}/core/dbt/cli
|
||||||
|
DOCS_DIR: ${{ github.workspace }}/core/dbt/docs
|
||||||
|
DOCS_BUILD_DIR: ${{ github.workspace }}/core/dbt/docs/build
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check_gen:
|
||||||
|
name: check if generation needed
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.pull_request.head.repo.fork == false }}
|
||||||
|
outputs:
|
||||||
|
cli_dir_changed: ${{ steps.check_cli.outputs.cli_dir_changed }}
|
||||||
|
docs_dir_changed: ${{ steps.check_docs.outputs.docs_dir_changed }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "[DEBUG] print variables"
|
||||||
|
run: |
|
||||||
|
echo "env.CLI_DIR: ${{ env.CLI_DIR }}"
|
||||||
|
echo "env.DOCS_BUILD_DIR: ${{ env.DOCS_BUILD_DIR }}"
|
||||||
|
echo "env.DOCS_DIR: ${{ env.DOCS_DIR }}"
|
||||||
|
|
||||||
|
- name: git checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
|
- name: set shas
|
||||||
|
id: set_shas
|
||||||
|
run: |
|
||||||
|
THIS_SHA=$(git rev-parse @)
|
||||||
|
LAST_SHA=$(git rev-parse @~1)
|
||||||
|
|
||||||
|
echo "this sha: $THIS_SHA"
|
||||||
|
echo "last sha: $LAST_SHA"
|
||||||
|
|
||||||
|
echo "this_sha=$THIS_SHA" >> $GITHUB_OUTPUT
|
||||||
|
echo "last_sha=$LAST_SHA" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: check for changes in core/dbt/cli
|
||||||
|
id: check_cli
|
||||||
|
run: |
|
||||||
|
CLI_DIR_CHANGES=$(git diff \
|
||||||
|
${{ steps.set_shas.outputs.last_sha }} \
|
||||||
|
${{ steps.set_shas.outputs.this_sha }} \
|
||||||
|
-- ${{ env.CLI_DIR }})
|
||||||
|
|
||||||
|
if [ -n "$CLI_DIR_CHANGES" ]; then
|
||||||
|
echo "changes found"
|
||||||
|
echo $CLI_DIR_CHANGES
|
||||||
|
echo "cli_dir_changed=true" >> $GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "cli_dir_changed=false" >> $GITHUB_OUTPUT
|
||||||
|
echo "no changes found"
|
||||||
|
|
||||||
|
- name: check for changes in core/dbt/docs
|
||||||
|
id: check_docs
|
||||||
|
if: steps.check_cli.outputs.cli_dir_changed == 'false'
|
||||||
|
run: |
|
||||||
|
DOCS_DIR_CHANGES=$(git diff --name-only \
|
||||||
|
${{ steps.set_shas.outputs.last_sha }} \
|
||||||
|
${{ steps.set_shas.outputs.this_sha }} \
|
||||||
|
-- ${{ env.DOCS_DIR }} ':!${{ env.DOCS_BUILD_DIR }}')
|
||||||
|
|
||||||
|
DOCS_BUILD_DIR_CHANGES=$(git diff --name-only \
|
||||||
|
${{ steps.set_shas.outputs.last_sha }} \
|
||||||
|
${{ steps.set_shas.outputs.this_sha }} \
|
||||||
|
-- ${{ env.DOCS_BUILD_DIR }})
|
||||||
|
|
||||||
|
if [ -n "$DOCS_DIR_CHANGES" ] && [ -z "$DOCS_BUILD_DIR_CHANGES" ]; then
|
||||||
|
echo "changes found"
|
||||||
|
echo $DOCS_DIR_CHANGES
|
||||||
|
echo "docs_dir_changed=true" >> $GITHUB_OUTPUT
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "docs_dir_changed=false" >> $GITHUB_OUTPUT
|
||||||
|
echo "no changes found"
|
||||||
|
|
||||||
|
gen_docs:
|
||||||
|
name: generate docs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [check_gen]
|
||||||
|
if: |
|
||||||
|
needs.check_gen.outputs.cli_dir_changed == 'true'
|
||||||
|
|| needs.check_gen.outputs.docs_dir_changed == 'true'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "[DEBUG] print variables"
|
||||||
|
run: |
|
||||||
|
echo "env.DOCS_DIR: ${{ env.DOCS_DIR }}"
|
||||||
|
echo "github head_ref: ${{ github.head_ref }}"
|
||||||
|
|
||||||
|
- name: git checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
|
- name: install python
|
||||||
|
uses: actions/setup-python@v4.3.0
|
||||||
|
with:
|
||||||
|
python-version: 3.8
|
||||||
|
|
||||||
|
- name: install dev requirements
|
||||||
|
run: |
|
||||||
|
python3 -m venv env
|
||||||
|
source env/bin/activate
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -r requirements.txt -r dev-requirements.txt
|
||||||
|
|
||||||
|
- name: generate docs
|
||||||
|
run: |
|
||||||
|
source env/bin/activate
|
||||||
|
cd ${{ env.DOCS_DIR }}
|
||||||
|
|
||||||
|
echo "cleaning existing docs"
|
||||||
|
make clean
|
||||||
|
|
||||||
|
echo "creating docs"
|
||||||
|
make html
|
||||||
|
|
||||||
|
- name: debug
|
||||||
|
run: |
|
||||||
|
echo ">>>>> status"
|
||||||
|
git status
|
||||||
|
echo ">>>>> remotes"
|
||||||
|
git remote -v
|
||||||
|
echo ">>>>> branch"
|
||||||
|
git branch -v
|
||||||
|
echo ">>>>> log"
|
||||||
|
git log --pretty=oneline | head -5
|
||||||
|
|
||||||
|
- name: commit docs
|
||||||
|
run: |
|
||||||
|
git config user.name 'Github Build Bot'
|
||||||
|
git config user.email 'buildbot@fishtownanalytics.com'
|
||||||
|
git commit -am "Add generated CLI API docs"
|
||||||
|
git push -u origin ${{ github.head_ref }}
|
||||||
3
.github/workflows/jira-transition.yml
vendored
3
.github/workflows/jira-transition.yml
vendored
@@ -15,6 +15,9 @@ on:
|
|||||||
issues:
|
issues:
|
||||||
types: [closed, deleted, reopened]
|
types: [closed, deleted, reopened]
|
||||||
|
|
||||||
|
# no special access is needed
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call-label-action:
|
call-label-action:
|
||||||
uses: dbt-labs/jira-actions/.github/workflows/jira-transition.yml@main
|
uses: dbt-labs/jira-actions/.github/workflows/jira-transition.yml@main
|
||||||
|
|||||||
32
.github/workflows/main.yml
vendored
32
.github/workflows/main.yml
vendored
@@ -38,13 +38,16 @@ jobs:
|
|||||||
name: code-quality
|
name: code-quality
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repository
|
- name: Check out the repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4.3.0
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
|
||||||
- name: Install python dependencies
|
- name: Install python dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -65,11 +68,12 @@ jobs:
|
|||||||
name: unit test / python ${{ matrix.python-version }}
|
name: unit test / python ${{ matrix.python-version }}
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.7", "3.8", "3.9", "3.10"]
|
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TOXENV: "unit"
|
TOXENV: "unit"
|
||||||
@@ -80,7 +84,7 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4.3.0
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
@@ -97,7 +101,9 @@ jobs:
|
|||||||
- name: Get current date
|
- name: Get current date
|
||||||
if: always()
|
if: always()
|
||||||
id: date
|
id: date
|
||||||
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H_%M_%S')" #no colons allowed for artifacts
|
run: |
|
||||||
|
CURRENT_DATE=$(date +'%Y-%m-%dT%H_%M_%S') # no colons allowed for artifacts
|
||||||
|
echo "date=$CURRENT_DATE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
@@ -109,12 +115,13 @@ jobs:
|
|||||||
name: integration test / python ${{ matrix.python-version }} / ${{ matrix.os }}
|
name: integration test / python ${{ matrix.python-version }} / ${{ matrix.os }}
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
timeout-minutes: 45
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.7", "3.8", "3.9", "3.10"]
|
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-20.04]
|
||||||
include:
|
include:
|
||||||
- python-version: 3.8
|
- python-version: 3.8
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
@@ -125,13 +132,16 @@ jobs:
|
|||||||
TOXENV: integration
|
TOXENV: integration
|
||||||
PYTEST_ADDOPTS: "-v --color=yes -n4 --csv integration_results.csv"
|
PYTEST_ADDOPTS: "-v --color=yes -n4 --csv integration_results.csv"
|
||||||
DBT_INVOCATION_ENV: github-actions
|
DBT_INVOCATION_ENV: github-actions
|
||||||
|
DBT_TEST_USER_1: dbt_test_user_1
|
||||||
|
DBT_TEST_USER_2: dbt_test_user_2
|
||||||
|
DBT_TEST_USER_3: dbt_test_user_3
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repository
|
- name: Check out the repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4.3.0
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
@@ -160,7 +170,9 @@ jobs:
|
|||||||
- name: Get current date
|
- name: Get current date
|
||||||
if: always()
|
if: always()
|
||||||
id: date
|
id: date
|
||||||
run: echo "::set-output name=date::$(date +'%Y_%m_%dT%H_%M_%S')" #no colons allowed for artifacts
|
run: |
|
||||||
|
CURRENT_DATE=$(date +'%Y-%m-%dT%H_%M_%S') # no colons allowed for artifacts
|
||||||
|
echo "date=$CURRENT_DATE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
@@ -184,9 +196,9 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4.3.0
|
||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: '3.8'
|
||||||
|
|
||||||
- name: Install python dependencies
|
- name: Install python dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
2
.github/workflows/release-branch-tests.yml
vendored
2
.github/workflows/release-branch-tests.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
max-parallel: 1
|
max-parallel: 1
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
branch: [1.0.latest, 1.1.latest, main]
|
branch: [1.0.latest, 1.1.latest, 1.2.latest, 1.3.latest, main]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Call CI workflow for ${{ matrix.branch }} branch
|
- name: Call CI workflow for ${{ matrix.branch }} branch
|
||||||
|
|||||||
12
.github/workflows/release-docker.yml
vendored
12
.github/workflows/release-docker.yml
vendored
@@ -41,9 +41,9 @@ jobs:
|
|||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
IFS="." read -r MAJOR MINOR PATCH <<< ${{ github.event.inputs.version_number }}
|
IFS="." read -r MAJOR MINOR PATCH <<< ${{ github.event.inputs.version_number }}
|
||||||
echo "::set-output name=major::$MAJOR"
|
echo "major=$MAJOR" >> $GITHUB_OUTPUT
|
||||||
echo "::set-output name=minor::$MINOR"
|
echo "minor=$MINOR" >> $GITHUB_OUTPUT
|
||||||
echo "::set-output name=patch::$PATCH"
|
echo "patch=$PATCH" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Is pkg 'latest'
|
- name: Is pkg 'latest'
|
||||||
id: latest
|
id: latest
|
||||||
@@ -70,8 +70,10 @@ jobs:
|
|||||||
- name: Get docker build arg
|
- name: Get docker build arg
|
||||||
id: build_arg
|
id: build_arg
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=build_arg_name::"$(echo ${{ github.event.inputs.package }} | sed 's/\-/_/g')
|
BUILD_ARG_NAME=$(echo ${{ github.event.inputs.package }} | sed 's/\-/_/g')
|
||||||
echo "::set-output name=build_arg_value::"$(echo ${{ github.event.inputs.package }} | sed 's/postgres/core/g')
|
BUILD_ARG_VALUE=$(echo ${{ github.event.inputs.package }} | sed 's/postgres/core/g')
|
||||||
|
echo "build_arg_name=$BUILD_ARG_NAME" >> $GITHUB_OUTPUT
|
||||||
|
echo "build_arg_value=$BUILD_ARG_VALUE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Log in to the GHCR
|
- name: Log in to the GHCR
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
|
|||||||
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -20,6 +20,9 @@ on:
|
|||||||
description: 'The release version number (i.e. 1.0.0b1)'
|
description: 'The release version number (i.e. 1.0.0b1)'
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write # this is the permission that allows creating a new release
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -162,7 +165,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
IS_PRERELEASE: ${{ contains(github.event.inputs.version_number, 'rc') || contains(github.event.inputs.version_number, 'b') }}
|
IS_PRERELEASE: ${{ contains(github.event.inputs.version_number, 'rc') || contains(github.event.inputs.version_number, 'b') }}
|
||||||
run: |
|
run: |
|
||||||
echo ::set-output name=isPrerelease::$IS_PRERELEASE
|
echo "isPrerelease=$IS_PRERELEASE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Creating GitHub Release
|
- name: Creating GitHub Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
|||||||
3
.github/workflows/schema-check.yml
vendored
3
.github/workflows/schema-check.yml
vendored
@@ -21,6 +21,9 @@ on:
|
|||||||
- "*.latest"
|
- "*.latest"
|
||||||
- "releases/*"
|
- "releases/*"
|
||||||
|
|
||||||
|
# no special access is needed
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
env:
|
env:
|
||||||
LATEST_SCHEMA_PATH: ${{ github.workspace }}/new_schemas
|
LATEST_SCHEMA_PATH: ${{ github.workspace }}/new_schemas
|
||||||
SCHEMA_DIFF_ARTIFACT: ${{ github.workspace }}//schema_schanges.txt
|
SCHEMA_DIFF_ARTIFACT: ${{ github.workspace }}//schema_schanges.txt
|
||||||
|
|||||||
15
.github/workflows/stale.yml
vendored
15
.github/workflows/stale.yml
vendored
@@ -3,15 +3,10 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: "30 1 * * *"
|
- cron: "30 1 * * *"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
uses: dbt-labs/actions/.github/workflows/stale-bot-matrix.yml@main
|
||||||
steps:
|
|
||||||
# pinned at v4 (https://github.com/actions/stale/releases/tag/v4.0.0)
|
|
||||||
- uses: actions/stale@cdf15f641adb27a71842045a94023bef6945e3aa
|
|
||||||
with:
|
|
||||||
stale-issue-message: "This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days."
|
|
||||||
stale-pr-message: "This PR has been marked as Stale because it has been open for 180 days with no activity. If you would like the PR to remain open, please remove the stale label or comment on the PR, or it will be closed in 7 days."
|
|
||||||
close-issue-message: "Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest; add a comment to notify the maintainers."
|
|
||||||
# mark issues/PRs stale when they haven't seen activity in 180 days
|
|
||||||
days-before-stale: 180
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
# run the performance measurements on the current or default branch
|
# run the performance measurements on the current or default branch
|
||||||
test-schema:
|
test-schema:
|
||||||
name: Test Log Schema
|
name: Test Log Schema
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
env:
|
env:
|
||||||
# turns warnings into errors
|
# turns warnings into errors
|
||||||
RUSTFLAGS: "-D warnings"
|
RUSTFLAGS: "-D warnings"
|
||||||
@@ -30,6 +30,11 @@ jobs:
|
|||||||
LOG_DIR: "/home/runner/work/dbt-core/dbt-core/logs"
|
LOG_DIR: "/home/runner/work/dbt-core/dbt-core/logs"
|
||||||
# tells integration tests to output into json format
|
# tells integration tests to output into json format
|
||||||
DBT_LOG_FORMAT: "json"
|
DBT_LOG_FORMAT: "json"
|
||||||
|
# Additional test users
|
||||||
|
DBT_TEST_USER_1: dbt_test_user_1
|
||||||
|
DBT_TEST_USER_2: dbt_test_user_2
|
||||||
|
DBT_TEST_USER_3: dbt_test_user_3
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout dev
|
- name: checkout dev
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@@ -41,12 +46,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "3.8"
|
python-version: "3.8"
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Install python dependencies
|
- name: Install python dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install --user --upgrade pip
|
pip install --user --upgrade pip
|
||||||
@@ -64,10 +63,3 @@ jobs:
|
|||||||
# we actually care if these pass, because the normal test run doesn't usually include many json log outputs
|
# we actually care if these pass, because the normal test run doesn't usually include many json log outputs
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
run: tox -e integration -- -nauto
|
run: tox -e integration -- -nauto
|
||||||
|
|
||||||
# apply our schema tests to every log event from the previous step
|
|
||||||
# skips any output that isn't valid json
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: run
|
|
||||||
args: --manifest-path test/interop/log_parsing/Cargo.toml
|
|
||||||
|
|||||||
124
.github/workflows/version-bump.yml
vendored
124
.github/workflows/version-bump.yml
vendored
@@ -1,18 +1,15 @@
|
|||||||
# **what?**
|
# **what?**
|
||||||
# This workflow will take a version number and a dry run flag. With that
|
# This workflow will take the new version number to bump to. With that
|
||||||
# it will run versionbump to update the version number everywhere in the
|
# it will run versionbump to update the version number everywhere in the
|
||||||
# code base and then generate an update Docker requirements file. If this
|
# code base and then run changie to create the corresponding changelog.
|
||||||
# is a dry run, a draft PR will open with the changes. If this isn't a dry
|
# A PR will be created with the changes that can be reviewed before committing.
|
||||||
# run, the changes will be committed to the branch this is run on.
|
|
||||||
|
|
||||||
# **why?**
|
# **why?**
|
||||||
# This is to aid in releasing dbt and making sure we have updated
|
# This is to aid in releasing dbt and making sure we have updated
|
||||||
# the versions and Docker requirements in all places.
|
# the version in all places and generated the changelog.
|
||||||
|
|
||||||
# **when?**
|
# **when?**
|
||||||
# This is triggered either manually OR
|
# This is triggered manually
|
||||||
# from the repository_dispatch event "version-bump" which is sent from
|
|
||||||
# the dbt-release repo Action
|
|
||||||
|
|
||||||
name: Version Bump
|
name: Version Bump
|
||||||
|
|
||||||
@@ -20,35 +17,25 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version_number:
|
version_number:
|
||||||
description: 'The version number to bump to'
|
description: 'The version number to bump to (ex. 1.2.0, 1.3.0b1)'
|
||||||
required: true
|
required: true
|
||||||
is_dry_run:
|
|
||||||
description: 'Creates a draft PR to allow testing instead of committing to a branch'
|
permissions:
|
||||||
required: true
|
contents: write
|
||||||
default: 'true'
|
pull-requests: write
|
||||||
repository_dispatch:
|
|
||||||
types: [version-bump]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
bump:
|
bump:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: "[DEBUG] Print Variables"
|
||||||
|
run: |
|
||||||
|
echo "all variables defined as inputs"
|
||||||
|
echo The version_number: ${{ github.event.inputs.version_number }}
|
||||||
|
|
||||||
- name: Check out the repository
|
- name: Check out the repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set version and dry run values
|
|
||||||
id: variables
|
|
||||||
env:
|
|
||||||
VERSION_NUMBER: "${{ github.event.client_payload.version_number == '' && github.event.inputs.version_number || github.event.client_payload.version_number }}"
|
|
||||||
IS_DRY_RUN: "${{ github.event.client_payload.is_dry_run == '' && github.event.inputs.is_dry_run || github.event.client_payload.is_dry_run }}"
|
|
||||||
run: |
|
|
||||||
echo Repository dispatch event version: ${{ github.event.client_payload.version_number }}
|
|
||||||
echo Repository dispatch event dry run: ${{ github.event.client_payload.is_dry_run }}
|
|
||||||
echo Workflow dispatch event version: ${{ github.event.inputs.version_number }}
|
|
||||||
echo Workflow dispatch event dry run: ${{ github.event.inputs.is_dry_run }}
|
|
||||||
echo ::set-output name=VERSION_NUMBER::$VERSION_NUMBER
|
|
||||||
echo ::set-output name=IS_DRY_RUN::$IS_DRY_RUN
|
|
||||||
|
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: "3.8"
|
python-version: "3.8"
|
||||||
@@ -59,53 +46,80 @@ jobs:
|
|||||||
source env/bin/activate
|
source env/bin/activate
|
||||||
pip install --upgrade pip
|
pip install --upgrade pip
|
||||||
|
|
||||||
- name: Create PR branch
|
- name: Add Homebrew to PATH
|
||||||
if: ${{ steps.variables.outputs.IS_DRY_RUN == 'true' }}
|
|
||||||
run: |
|
run: |
|
||||||
git checkout -b bumping-version/${{steps.variables.outputs.VERSION_NUMBER}}_$GITHUB_RUN_ID
|
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
|
||||||
git push origin bumping-version/${{steps.variables.outputs.VERSION_NUMBER}}_$GITHUB_RUN_ID
|
|
||||||
git branch --set-upstream-to=origin/bumping-version/${{steps.variables.outputs.VERSION_NUMBER}}_$GITHUB_RUN_ID bumping-version/${{steps.variables.outputs.VERSION_NUMBER}}_$GITHUB_RUN_ID
|
|
||||||
|
|
||||||
# - name: Generate Docker requirements
|
- name: Install Homebrew packages
|
||||||
# run: |
|
run: |
|
||||||
# source env/bin/activate
|
brew install pre-commit
|
||||||
# pip install -r requirements.txt
|
brew tap miniscruff/changie https://github.com/miniscruff/changie
|
||||||
# pip freeze -l > docker/requirements/requirements.txt
|
brew install changie
|
||||||
# git status
|
|
||||||
|
- name: Audit Version and Parse Into Parts
|
||||||
|
id: semver
|
||||||
|
uses: dbt-labs/actions/parse-semver@v1
|
||||||
|
with:
|
||||||
|
version: ${{ github.event.inputs.version_number }}
|
||||||
|
|
||||||
|
- name: Set branch value
|
||||||
|
id: variables
|
||||||
|
run: |
|
||||||
|
echo "BRANCH_NAME=prep-release/${{ github.event.inputs.version_number }}_$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Create PR branch
|
||||||
|
run: |
|
||||||
|
git checkout -b ${{ steps.variables.outputs.BRANCH_NAME }}
|
||||||
|
git push origin ${{ steps.variables.outputs.BRANCH_NAME }}
|
||||||
|
git branch --set-upstream-to=origin/${{ steps.variables.outputs.BRANCH_NAME }} ${{ steps.variables.outputs.BRANCH_NAME }}
|
||||||
|
|
||||||
- name: Bump version
|
- name: Bump version
|
||||||
run: |
|
run: |
|
||||||
source env/bin/activate
|
source env/bin/activate
|
||||||
pip install -r dev-requirements.txt
|
pip install -r dev-requirements.txt
|
||||||
env/bin/bumpversion --allow-dirty --new-version ${{steps.variables.outputs.VERSION_NUMBER}} major
|
env/bin/bumpversion --allow-dirty --new-version ${{ github.event.inputs.version_number }} major
|
||||||
git status
|
git status
|
||||||
|
|
||||||
- name: Commit version bump directly
|
- name: Run changie
|
||||||
uses: EndBug/add-and-commit@v7
|
run: |
|
||||||
if: ${{ steps.variables.outputs.IS_DRY_RUN == 'false' }}
|
if [[ ${{ steps.semver.outputs.is-pre-release }} -eq 1 ]]
|
||||||
with:
|
then
|
||||||
author_name: 'Github Build Bot'
|
changie batch ${{ steps.semver.outputs.base-version }} --move-dir '${{ steps.semver.outputs.base-version }}' --prerelease '${{ steps.semver.outputs.pre-release }}'
|
||||||
author_email: 'buildbot@fishtownanalytics.com'
|
else
|
||||||
message: 'Bumping version to ${{steps.variables.outputs.VERSION_NUMBER}}'
|
changie batch ${{ steps.semver.outputs.base-version }} --include '${{ steps.semver.outputs.base-version }}' --remove-prereleases
|
||||||
|
fi
|
||||||
|
changie merge
|
||||||
|
git status
|
||||||
|
|
||||||
|
# this step will fail on whitespace errors but also correct them
|
||||||
|
- name: Remove trailing whitespace
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
pre-commit run trailing-whitespace --files .bumpversion.cfg CHANGELOG.md .changes/*
|
||||||
|
git status
|
||||||
|
|
||||||
|
# this step will fail on newline errors but also correct them
|
||||||
|
- name: Removing extra newlines
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
pre-commit run end-of-file-fixer --files .bumpversion.cfg CHANGELOG.md .changes/*
|
||||||
|
git status
|
||||||
|
|
||||||
- name: Commit version bump to branch
|
- name: Commit version bump to branch
|
||||||
uses: EndBug/add-and-commit@v7
|
uses: EndBug/add-and-commit@v7
|
||||||
if: ${{ steps.variables.outputs.IS_DRY_RUN == 'true' }}
|
|
||||||
with:
|
with:
|
||||||
author_name: 'Github Build Bot'
|
author_name: 'Github Build Bot'
|
||||||
author_email: 'buildbot@fishtownanalytics.com'
|
author_email: 'buildbot@fishtownanalytics.com'
|
||||||
message: 'Bumping version to ${{steps.variables.outputs.VERSION_NUMBER}}'
|
message: 'Bumping version to ${{ github.event.inputs.version_number }} and generate CHANGELOG'
|
||||||
branch: 'bumping-version/${{steps.variables.outputs.VERSION_NUMBER}}_${{GITHUB.RUN_ID}}'
|
branch: '${{ steps.variables.outputs.BRANCH_NAME }}'
|
||||||
push: 'origin origin/bumping-version/${{steps.variables.outputs.VERSION_NUMBER}}_${{GITHUB.RUN_ID}}'
|
push: 'origin origin/${{ steps.variables.outputs.BRANCH_NAME }}'
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
if: ${{ steps.variables.outputs.IS_DRY_RUN == 'true' }}
|
|
||||||
with:
|
with:
|
||||||
author: 'Github Build Bot <buildbot@fishtownanalytics.com>'
|
author: 'Github Build Bot <buildbot@fishtownanalytics.com>'
|
||||||
draft: true
|
|
||||||
base: ${{github.ref}}
|
base: ${{github.ref}}
|
||||||
title: 'Bumping version to ${{steps.variables.outputs.VERSION_NUMBER}}'
|
title: 'Bumping version to ${{ github.event.inputs.version_number }} and generate changelog'
|
||||||
branch: 'bumping-version/${{steps.variables.outputs.VERSION_NUMBER}}_${{GITHUB.RUN_ID}}'
|
branch: '${{ steps.variables.outputs.BRANCH_NAME }}'
|
||||||
labels: |
|
labels: |
|
||||||
Skip Changelog
|
Skip Changelog
|
||||||
|
|||||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -11,6 +11,7 @@ __pycache__/
|
|||||||
env*/
|
env*/
|
||||||
dbt_env/
|
dbt_env/
|
||||||
build/
|
build/
|
||||||
|
!core/dbt/docs/build
|
||||||
develop-eggs/
|
develop-eggs/
|
||||||
dist/
|
dist/
|
||||||
downloads/
|
downloads/
|
||||||
@@ -24,7 +25,8 @@ var/
|
|||||||
*.egg-info/
|
*.egg-info/
|
||||||
.installed.cfg
|
.installed.cfg
|
||||||
*.egg
|
*.egg
|
||||||
*.mypy_cache/
|
.mypy_cache/
|
||||||
|
.dmypy.json
|
||||||
logs/
|
logs/
|
||||||
|
|
||||||
# PyInstaller
|
# PyInstaller
|
||||||
@@ -95,3 +97,7 @@ venv/
|
|||||||
|
|
||||||
# vscode
|
# vscode
|
||||||
.vscode/
|
.vscode/
|
||||||
|
*.code-workspace
|
||||||
|
|
||||||
|
# poetry
|
||||||
|
poetry.lock
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
# Eventually the hooks described here will be run as tests before merging each PR.
|
# Eventually the hooks described here will be run as tests before merging each PR.
|
||||||
|
|
||||||
# TODO: remove global exclusion of tests when testing overhaul is complete
|
# TODO: remove global exclusion of tests when testing overhaul is complete
|
||||||
exclude: ^test/
|
exclude: ^(test/|core/dbt/docs/build/)
|
||||||
|
|
||||||
# Force all unspecified python hooks to run python 3.8
|
# Force all unspecified python hooks to run python 3.8
|
||||||
default_language_version:
|
default_language_version:
|
||||||
python: python3.8
|
python: python3
|
||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
@@ -24,18 +24,13 @@ repos:
|
|||||||
rev: 22.3.0
|
rev: 22.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
args:
|
|
||||||
- "--line-length=99"
|
|
||||||
- "--target-version=py38"
|
|
||||||
- id: black
|
- id: black
|
||||||
alias: black-check
|
alias: black-check
|
||||||
stages: [manual]
|
stages: [manual]
|
||||||
args:
|
args:
|
||||||
- "--line-length=99"
|
|
||||||
- "--target-version=py38"
|
|
||||||
- "--check"
|
- "--check"
|
||||||
- "--diff"
|
- "--diff"
|
||||||
- repo: https://gitlab.com/pycqa/flake8
|
- repo: https://github.com/pycqa/flake8
|
||||||
rev: 4.0.1
|
rev: 4.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
|
|||||||
76
CHANGELOG.md
76
CHANGELOG.md
@@ -5,82 +5,14 @@
|
|||||||
- "Breaking changes" listed under a version may require action from end users or external maintainers when upgrading to that version.
|
- "Breaking changes" listed under a version may require action from end users or external maintainers when upgrading to that version.
|
||||||
- Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie). For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry)
|
- Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie). For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md#adding-changelog-entry)
|
||||||
|
|
||||||
|
|
||||||
## dbt-core 1.2.0-b1 - June 24, 2022
|
|
||||||
### Features
|
|
||||||
- Add selector method when reading selector definitions ([#4821](https://github.com/dbt-labs/dbt-core/issues/4821), [#4827](https://github.com/dbt-labs/dbt-core/pull/4827))
|
|
||||||
- Add set and zip function to contexts ([#2345](https://github.com/dbt-labs/dbt-core/issues/2345), [#5107](https://github.com/dbt-labs/dbt-core/pull/5107))
|
|
||||||
- Adds itertools to modules Jinja namespace ([#5130](https://github.com/dbt-labs/dbt-core/issues/5130), [#5140](https://github.com/dbt-labs/dbt-core/pull/5140))
|
|
||||||
- allow target as an option in profile_template.yml ([#5179](https://github.com/dbt-labs/dbt-core/issues/5179), [#5184](https://github.com/dbt-labs/dbt-core/pull/5184))
|
|
||||||
- seed: Add new macro get_csv_sql ([#5206](https://github.com/dbt-labs/dbt-core/issues/5206), [#5207](https://github.com/dbt-labs/dbt-core/pull/5207))
|
|
||||||
- Grants as Node Configs ([#5189](https://github.com/dbt-labs/dbt-core/issues/5189), [#5230](https://github.com/dbt-labs/dbt-core/pull/5230))
|
|
||||||
- Adds file selectors and support for file selectors in the default method selector ([#5240](https://github.com/dbt-labs/dbt-core/issues/5240), [#5241](https://github.com/dbt-labs/dbt-core/pull/5241))
|
|
||||||
- Move cross-db macros from dbt-utils into dbt-core global project ([#4813](https://github.com/dbt-labs/dbt-core/issues/4813), [#5265](https://github.com/dbt-labs/dbt-core/pull/5265))
|
|
||||||
- Prettify duration message at the end of execution ([#5253](https://github.com/dbt-labs/dbt-core/issues/5253), [#5364](https://github.com/dbt-labs/dbt-core/pull/5364))
|
|
||||||
- Early return from dbt init if no available adapters ([#5365](https://github.com/dbt-labs/dbt-core/issues/5365), [#5366](https://github.com/dbt-labs/dbt-core/pull/5366))
|
|
||||||
### Fixes
|
|
||||||
- Adding new cols to check_cols in snapshots ([#3146](https://github.com/dbt-labs/dbt-core/issues/3146), [#4893](https://github.com/dbt-labs/dbt-core/pull/4893))
|
|
||||||
- Truncate relation names when appending a suffix that will result in len > 63 characters using make_temp_relation and make_backup_relation macros ([#2869](https://github.com/dbt-labs/dbt-core/issues/2869), [#4921](https://github.com/dbt-labs/dbt-core/pull/4921))
|
|
||||||
- Restore ability to utilize `updated_at` for check_cols snapshots ([#5076](https://github.com/dbt-labs/dbt-core/issues/5076), [#5077](https://github.com/dbt-labs/dbt-core/pull/5077))
|
|
||||||
- Use yaml renderer (with target context) for rendering selectors ([#5131](https://github.com/dbt-labs/dbt-core/issues/5131), [#5136](https://github.com/dbt-labs/dbt-core/pull/5136))
|
|
||||||
- Fix retry logic to return values after initial try ([#5023](https://github.com/dbt-labs/dbt-core/issues/5023), [#5137](https://github.com/dbt-labs/dbt-core/pull/5137))
|
|
||||||
- Scrub secret env vars from CommandError in exception stacktrace ([#5151](https://github.com/dbt-labs/dbt-core/issues/5151), [#5152](https://github.com/dbt-labs/dbt-core/pull/5152))
|
|
||||||
- Ensure the metric name does not contain spaces ([#4572](https://github.com/dbt-labs/dbt-core/issues/4572), [#5173](https://github.com/dbt-labs/dbt-core/pull/5173))
|
|
||||||
- When parsing 'all_sources' should be a list of unique dirs ([#5120](https://github.com/dbt-labs/dbt-core/issues/5120), [#5176](https://github.com/dbt-labs/dbt-core/pull/5176))
|
|
||||||
- Add warning if yaml contains duplicate keys ([#5114](https://github.com/dbt-labs/dbt-core/issues/5114), [#5146](https://github.com/dbt-labs/dbt-core/pull/5146))
|
|
||||||
- Modifying the drop_test_schema to work better with Redshift issues around locked tables and current transactions ([#5200](https://github.com/dbt-labs/dbt-core/issues/5200), [#5198](https://github.com/dbt-labs/dbt-core/pull/5198))
|
|
||||||
- Fix column comparison in snapshot_check_all_get_existing_columns for check-strategy snapshots with explicit check_cols defined ([#5222](https://github.com/dbt-labs/dbt-core/issues/5222), [#5223](https://github.com/dbt-labs/dbt-core/pull/5223))
|
|
||||||
- Changed how `--select state:modified` detects changes for macros nodes depend on ([#5202](https://github.com/dbt-labs/dbt-core/issues/5202), [#5224](https://github.com/dbt-labs/dbt-core/pull/5224))
|
|
||||||
- Fix column comparison in snapshot_check_all_get_existing_columns to use adapter.get_columns_in_relation ([#5222](https://github.com/dbt-labs/dbt-core/issues/5222), [#5232](https://github.com/dbt-labs/dbt-core/pull/5232))
|
|
||||||
- Remove docs file from manifest when removing doc node ([#4146](https://github.com/dbt-labs/dbt-core/issues/4146), [#5270](https://github.com/dbt-labs/dbt-core/pull/5270))
|
|
||||||
- Remove duplicate dbt script entry ([#5314](https://github.com/dbt-labs/dbt-core/issues/5314), [#5304](https://github.com/dbt-labs/dbt-core/pull/5304))
|
|
||||||
- Change node ancestor/descendant algo, fixes issue where downstream models aren't run when using networkx >= 2.8.1 ([#5286](https://github.com/dbt-labs/dbt-core/issues/5286), [#5326](https://github.com/dbt-labs/dbt-core/pull/5326))
|
|
||||||
- Fixing Windows color regression ([#5191](https://github.com/dbt-labs/dbt-core/issues/5191), [#5327](https://github.com/dbt-labs/dbt-core/pull/5327))
|
|
||||||
- Define compatibility for older manifest versions when using state: selection methods ([#5213](https://github.com/dbt-labs/dbt-core/issues/5213), [#5346](https://github.com/dbt-labs/dbt-core/pull/5346))
|
|
||||||
- Remove duplicate key checking introduced in 1.2.0a1 ([#5331](https://github.com/dbt-labs/dbt-core/issues/5331), [#5403](https://github.com/dbt-labs/dbt-core/pull/5403))
|
|
||||||
### Under the Hood
|
|
||||||
- Migrating 005_simple_seed to the new test framework. ([#200](https://github.com/dbt-labs/dbt-core/issues/200), [#5013](https://github.com/dbt-labs/dbt-core/pull/5013))
|
|
||||||
- Convert 029_docs_generate tests to new framework ([#5035](https://github.com/dbt-labs/dbt-core/issues/5035), [#5058](https://github.com/dbt-labs/dbt-core/pull/5058))
|
|
||||||
- Move package deprecation check outside of package cache ([#5068](https://github.com/dbt-labs/dbt-core/issues/5068), [#5069](https://github.com/dbt-labs/dbt-core/pull/5069))
|
|
||||||
- removal of scaffold first attempt and create_adapter_plugin.py as they are deprecated new scaffold can be found https://github.com/dbt-labs/dbt-database-adapter-scaffold ([#4980](https://github.com/dbt-labs/dbt-core/issues/4980), [#5117](https://github.com/dbt-labs/dbt-core/pull/5117))
|
|
||||||
- Mypy -> 0.942 + fixed import logic to allow for full mypy coverage ([#4805](https://github.com/dbt-labs/dbt-core/issues/4805), [#5171](https://github.com/dbt-labs/dbt-core/pull/5171))
|
|
||||||
- Converted dbt list tests to pytest ([#5049](https://github.com/dbt-labs/dbt-core/issues/5049), [#5178](https://github.com/dbt-labs/dbt-core/pull/5178))
|
|
||||||
- Fix: Call str and repr for UnsetProfileConfig without a RuntimeException ([#5081](https://github.com/dbt-labs/dbt-core/issues/5081), [#5209](https://github.com/dbt-labs/dbt-core/pull/5209))
|
|
||||||
- Improve tracking error logging message ([#5197](https://github.com/dbt-labs/dbt-core/issues/5197), [#5211](https://github.com/dbt-labs/dbt-core/pull/5211))
|
|
||||||
- Clean up materialization logic: more consistent relation names, loading from cache ([#2869](https://github.com/dbt-labs/dbt-core/issues/2869), [#4921](https://github.com/dbt-labs/dbt-core/pull/4921))
|
|
||||||
- Use the default Python version for local dev and test instead of requiring Python 3.8 ([#5257](https://github.com/dbt-labs/dbt-core/issues/5257), [#5269](https://github.com/dbt-labs/dbt-core/pull/5269))
|
|
||||||
- Fix test for context set function ([#5266](https://github.com/dbt-labs/dbt-core/issues/5266), [#5272](https://github.com/dbt-labs/dbt-core/pull/5272))
|
|
||||||
- Fix pip upgrade step in CI for Windows ([#5321](https://github.com/dbt-labs/dbt-core/issues/5321), [#5320](https://github.com/dbt-labs/dbt-core/pull/5320))
|
|
||||||
- Fix unit test test_graph_selection ([#5323](https://github.com/dbt-labs/dbt-core/issues/5323), [#5324](https://github.com/dbt-labs/dbt-core/pull/5324))
|
|
||||||
- Update context readme + clean up context code" ([#4796](https://github.com/dbt-labs/dbt-core/issues/4796), [#5334](https://github.com/dbt-labs/dbt-core/pull/5334))
|
|
||||||
- removed script meant for snowflake to snowflake ([#5361](https://github.com/dbt-labs/dbt-core/issues/5361), [#5362](https://github.com/dbt-labs/dbt-core/pull/5362))
|
|
||||||
### Dependencies
|
|
||||||
- Bump ubuntu from 20.04 to 22.04 ([#4904](https://github.com/dbt-labs/dbt-core/issues/4904), [#5141](https://github.com/dbt-labs/dbt-core/pull/5141))
|
|
||||||
- Bumping hologram version ([#5219](https://github.com/dbt-labs/dbt-core/issues/5219), [#5218](https://github.com/dbt-labs/dbt-core/pull/5218))
|
|
||||||
- Bump python from 3.10.3-slim-bullseye to 3.10.5-slim-bullseye in /docker ([#4904](https://github.com/dbt-labs/dbt-core/issues/4904), [#5367](https://github.com/dbt-labs/dbt-core/pull/5367))
|
|
||||||
|
|
||||||
### Contributors
|
|
||||||
- [@GtheSheep](https://github.com/GtheSheep) ([#4893](https://github.com/dbt-labs/dbt-core/pull/4893))
|
|
||||||
- [@NicolasPA](https://github.com/NicolasPA) ([#5211](https://github.com/dbt-labs/dbt-core/pull/5211))
|
|
||||||
- [@adamantike](https://github.com/adamantike) ([#5207](https://github.com/dbt-labs/dbt-core/pull/5207))
|
|
||||||
- [@alexrosenfeld10](https://github.com/alexrosenfeld10) ([#5184](https://github.com/dbt-labs/dbt-core/pull/5184))
|
|
||||||
- [@bd3dowling](https://github.com/bd3dowling) ([#5140](https://github.com/dbt-labs/dbt-core/pull/5140))
|
|
||||||
- [@danieldiamond](https://github.com/danieldiamond) ([#4827](https://github.com/dbt-labs/dbt-core/pull/4827))
|
|
||||||
- [@dbeatty10](https://github.com/dbeatty10) ([#5265](https://github.com/dbt-labs/dbt-core/pull/5265), [#5077](https://github.com/dbt-labs/dbt-core/pull/5077))
|
|
||||||
- [@dependabot[bot]](https://github.com/dependabot[bot]) ([#5141](https://github.com/dbt-labs/dbt-core/pull/5141), [#5367](https://github.com/dbt-labs/dbt-core/pull/5367))
|
|
||||||
- [@epapineau](https://github.com/epapineau) ([#4921](https://github.com/dbt-labs/dbt-core/pull/4921))
|
|
||||||
- [@groodt](https://github.com/groodt) ([#5304](https://github.com/dbt-labs/dbt-core/pull/5304))
|
|
||||||
- [@jared-rimmer](https://github.com/jared-rimmer) ([#5364](https://github.com/dbt-labs/dbt-core/pull/5364))
|
|
||||||
- [@jeremyyeo](https://github.com/jeremyyeo) ([#5107](https://github.com/dbt-labs/dbt-core/pull/5107), [#5146](https://github.com/dbt-labs/dbt-core/pull/5146), [#5403](https://github.com/dbt-labs/dbt-core/pull/5403))
|
|
||||||
- [@jwills](https://github.com/jwills) ([#5241](https://github.com/dbt-labs/dbt-core/pull/5241), [#5269](https://github.com/dbt-labs/dbt-core/pull/5269))
|
|
||||||
- [@tomasfarias](https://github.com/tomasfarias) ([#5209](https://github.com/dbt-labs/dbt-core/pull/5209))
|
|
||||||
- [@ulisesojeda](https://github.com/ulisesojeda) ([#5366](https://github.com/dbt-labs/dbt-core/pull/5366))
|
|
||||||
|
|
||||||
|
|
||||||
## Previous Releases
|
## Previous Releases
|
||||||
|
|
||||||
For information on prior major and minor releases, see their changelogs:
|
For information on prior major and minor releases, see their changelogs:
|
||||||
|
|
||||||
|
|
||||||
|
* [1.4](https://github.com/dbt-labs/dbt-core/blob/1.4.latest/CHANGELOG.md)
|
||||||
|
* [1.3](https://github.com/dbt-labs/dbt-core/blob/1.3.latest/CHANGELOG.md)
|
||||||
|
* [1.2](https://github.com/dbt-labs/dbt-core/blob/1.2.latest/CHANGELOG.md)
|
||||||
* [1.1](https://github.com/dbt-labs/dbt-core/blob/1.1.latest/CHANGELOG.md)
|
* [1.1](https://github.com/dbt-labs/dbt-core/blob/1.1.latest/CHANGELOG.md)
|
||||||
* [1.0](https://github.com/dbt-labs/dbt-core/blob/1.0.latest/CHANGELOG.md)
|
* [1.0](https://github.com/dbt-labs/dbt-core/blob/1.0.latest/CHANGELOG.md)
|
||||||
* [0.21](https://github.com/dbt-labs/dbt-core/blob/0.21.latest/CHANGELOG.md)
|
* [0.21](https://github.com/dbt-labs/dbt-core/blob/0.21.latest/CHANGELOG.md)
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
3. [Setting up an environment](#setting-up-an-environment)
|
3. [Setting up an environment](#setting-up-an-environment)
|
||||||
4. [Running `dbt` in development](#running-dbt-core-in-development)
|
4. [Running `dbt` in development](#running-dbt-core-in-development)
|
||||||
5. [Testing dbt-core](#testing)
|
5. [Testing dbt-core](#testing)
|
||||||
6. [Submitting a Pull Request](#submitting-a-pull-request)
|
6. [Debugging](#debugging)
|
||||||
|
7. [Adding a changelog entry](#adding-a-changelog-entry)
|
||||||
|
8. [Submitting a Pull Request](#submitting-a-pull-request)
|
||||||
|
|
||||||
## About this document
|
## About this document
|
||||||
|
|
||||||
@@ -21,7 +23,8 @@ If you get stuck, we're happy to help! Drop us a line in the `#dbt-core-developm
|
|||||||
|
|
||||||
- **Adapters:** Is your issue or proposed code change related to a specific [database adapter](https://docs.getdbt.com/docs/available-adapters)? If so, please open issues, PRs, and discussions in that adapter's repository instead. The sole exception is Postgres; the `dbt-postgres` plugin lives in this repository (`dbt-core`).
|
- **Adapters:** Is your issue or proposed code change related to a specific [database adapter](https://docs.getdbt.com/docs/available-adapters)? If so, please open issues, PRs, and discussions in that adapter's repository instead. The sole exception is Postgres; the `dbt-postgres` plugin lives in this repository (`dbt-core`).
|
||||||
- **CLA:** Please note that anyone contributing code to `dbt-core` must sign the [Contributor License Agreement](https://docs.getdbt.com/docs/contributor-license-agreements). If you are unable to sign the CLA, the `dbt-core` maintainers will unfortunately be unable to merge any of your Pull Requests. We welcome you to participate in discussions, open issues, and comment on existing ones.
|
- **CLA:** Please note that anyone contributing code to `dbt-core` must sign the [Contributor License Agreement](https://docs.getdbt.com/docs/contributor-license-agreements). If you are unable to sign the CLA, the `dbt-core` maintainers will unfortunately be unable to merge any of your Pull Requests. We welcome you to participate in discussions, open issues, and comment on existing ones.
|
||||||
- **Branches:** All pull requests from community contributors should target the `main` branch (default). If the change is needed as a patch for a minor version of dbt that has already been released (or is already a release candidate), a maintainer will backport the changes in your PR to the relevant "latest" release branch (`1.0.latest`, `1.1.latest`, ...)
|
- **Branches:** All pull requests from community contributors should target the `main` branch (default). If the change is needed as a patch for a minor version of dbt that has already been released (or is already a release candidate), a maintainer will backport the changes in your PR to the relevant "latest" release branch (`1.0.latest`, `1.1.latest`, ...). If an issue fix applies to a release branch, that fix should be first committed to the development branch and then to the release branch (rarely release-branch fixes may not apply to `main`).
|
||||||
|
- **Releases**: Before releasing a new minor version of Core, we prepare a series of alphas and release candidates to allow users (especially employees of dbt Labs!) to test the new version in live environments. This is an important quality assurance step, as it exposes the new code to a wide variety of complicated deployments and can surface bugs before official release. Releases are accessible via pip, homebrew, and dbt Cloud.
|
||||||
|
|
||||||
## Getting the code
|
## Getting the code
|
||||||
|
|
||||||
@@ -41,7 +44,9 @@ If you are not a member of the `dbt-labs` GitHub organization, you can contribut
|
|||||||
|
|
||||||
### dbt Labs contributors
|
### dbt Labs contributors
|
||||||
|
|
||||||
If you are a member of the `dbt-labs` GitHub organization, you will have push access to the `dbt-core` repo. Rather than forking `dbt-core` to make your changes, just clone the repository, check out a new branch, and push directly to that branch.
|
If you are a member of the `dbt-labs` GitHub organization, you will have push access to the `dbt-core` repo. Rather than forking `dbt-core` to make your changes, just clone the repository, check out a new branch, and push directly to that branch. Branch names should be fixed by `CT-XXX/` where:
|
||||||
|
* CT stands for 'core team'
|
||||||
|
* XXX stands for a JIRA ticket number
|
||||||
|
|
||||||
## Setting up an environment
|
## Setting up an environment
|
||||||
|
|
||||||
@@ -51,7 +56,7 @@ There are some tools that will be helpful to you in developing locally. While th
|
|||||||
|
|
||||||
These are the tools used in `dbt-core` development and testing:
|
These are the tools used in `dbt-core` development and testing:
|
||||||
|
|
||||||
- [`tox`](https://tox.readthedocs.io/en/latest/) to manage virtualenvs across python versions. We currently target the latest patch releases for Python 3.7, 3.8, 3.9, and 3.10
|
- [`tox`](https://tox.readthedocs.io/en/latest/) to manage virtualenvs across python versions. We currently target the latest patch releases for Python 3.7, 3.8, 3.9, 3.10 and 3.11
|
||||||
- [`pytest`](https://docs.pytest.org/en/latest/) to define, discover, and run tests
|
- [`pytest`](https://docs.pytest.org/en/latest/) to define, discover, and run tests
|
||||||
- [`flake8`](https://flake8.pycqa.org/en/latest/) for code linting
|
- [`flake8`](https://flake8.pycqa.org/en/latest/) for code linting
|
||||||
- [`black`](https://github.com/psf/black) for code formatting
|
- [`black`](https://github.com/psf/black) for code formatting
|
||||||
@@ -91,12 +96,15 @@ brew install postgresql
|
|||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
First make sure that you set up your `virtualenv` as described in [Setting up an environment](#setting-up-an-environment). Also ensure you have the latest version of pip installed with `pip install --upgrade pip`. Next, install `dbt-core` (and its dependencies) with:
|
First make sure that you set up your `virtualenv` as described in [Setting up an environment](#setting-up-an-environment). Also ensure you have the latest version of pip installed with `pip install --upgrade pip`. Next, install `dbt-core` (and its dependencies):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make dev
|
make dev
|
||||||
# or
|
```
|
||||||
|
or, alternatively:
|
||||||
|
```sh
|
||||||
pip install -r dev-requirements.txt -r editable-requirements.txt
|
pip install -r dev-requirements.txt -r editable-requirements.txt
|
||||||
|
pre-commit install
|
||||||
```
|
```
|
||||||
|
|
||||||
When installed in this way, any changes you make to your local copy of the source code will be reflected immediately in your next `dbt` run.
|
When installed in this way, any changes you make to your local copy of the source code will be reflected immediately in your next `dbt` run.
|
||||||
@@ -151,11 +159,11 @@ Check out the other targets in the Makefile to see other commonly used test
|
|||||||
suites.
|
suites.
|
||||||
|
|
||||||
#### `pre-commit`
|
#### `pre-commit`
|
||||||
[`pre-commit`](https://pre-commit.com) takes care of running all code-checks for formatting and linting. Run `make dev` to install `pre-commit` in your local environment. Once this is done you can use any of the linter-based make targets as well as a git pre-commit hook that will ensure proper formatting and linting.
|
[`pre-commit`](https://pre-commit.com) takes care of running all code-checks for formatting and linting. Run `make dev` to install `pre-commit` in your local environment (we recommend running this command with a python virtual environment active). This command installs several pip executables including black, mypy, and flake8. Once this is done you can use any of the linter-based make targets as well as a git pre-commit hook that will ensure proper formatting and linting.
|
||||||
|
|
||||||
#### `tox`
|
#### `tox`
|
||||||
|
|
||||||
[`tox`](https://tox.readthedocs.io/en/latest/) takes care of managing virtualenvs and install dependencies in order to run tests. You can also run tests in parallel, for example, you can run unit tests for Python 3.7, Python 3.8, Python 3.9, and Python 3.10 checks in parallel with `tox -p`. Also, you can run unit tests for specific python versions with `tox -e py37`. The configuration for these tests in located in `tox.ini`.
|
[`tox`](https://tox.readthedocs.io/en/latest/) takes care of managing virtualenvs and install dependencies in order to run tests. You can also run tests in parallel, for example, you can run unit tests for Python 3.7, Python 3.8, Python 3.9, Python 3.10 and Python 3.11 checks in parallel with `tox -p`. Also, you can run unit tests for specific python versions with `tox -e py37`. The configuration for these tests in located in `tox.ini`.
|
||||||
|
|
||||||
#### `pytest`
|
#### `pytest`
|
||||||
|
|
||||||
@@ -174,20 +182,52 @@ python3 -m pytest tests/functional/sources
|
|||||||
|
|
||||||
> See [pytest usage docs](https://docs.pytest.org/en/6.2.x/usage.html) for an overview of useful command-line options.
|
> See [pytest usage docs](https://docs.pytest.org/en/6.2.x/usage.html) for an overview of useful command-line options.
|
||||||
|
|
||||||
## Adding CHANGELOG Entry
|
### Unit, Integration, Functional?
|
||||||
|
|
||||||
|
Here are some general rules for adding tests:
|
||||||
|
* unit tests (`test/unit` & `tests/unit`) don’t need to access a database; "pure Python" tests should be written as unit tests
|
||||||
|
* functional tests (`test/integration` & `tests/functional`) cover anything that interacts with a database, namely adapter
|
||||||
|
* *everything in* `test/*` *is being steadily migrated to* `tests/*`
|
||||||
|
|
||||||
|
## Debugging
|
||||||
|
|
||||||
|
1. The logs for a `dbt run` have stack traces and other information for debugging errors (in `logs/dbt.log` in your project directory).
|
||||||
|
2. Try using a debugger, like `ipdb`. For pytest: `--pdb --pdbcls=IPython.terminal.debugger:pdb`
|
||||||
|
3. Sometimes, it’s easier to debug on a single thread: `dbt --single-threaded run`
|
||||||
|
4. To make print statements from Jinja macros: `{{ log(msg, info=true) }}`
|
||||||
|
5. You can also add `{{ debug() }}` statements, which will drop you into some auto-generated code that the macro wrote.
|
||||||
|
6. The dbt “artifacts” are written out to the ‘target’ directory of your dbt project. They are in unformatted json, which can be hard to read. Format them with:
|
||||||
|
> python -m json.tool target/run_results.json > run_results.json
|
||||||
|
|
||||||
|
### Assorted development tips
|
||||||
|
* Append `# type: ignore` to the end of a line if you need to disable `mypy` on that line.
|
||||||
|
* Sometimes flake8 complains about lines that are actually fine, in which case you can put a comment on the line such as: # noqa or # noqa: ANNN, where ANNN is the error code that flake8 issues.
|
||||||
|
* To collect output for `CProfile`, run dbt with the `-r` option and the name of an output file, i.e. `dbt -r dbt.cprof run`. If you just want to profile parsing, you can do: `dbt -r dbt.cprof parse`. `pip` install `snakeviz` to view the output. Run `snakeviz dbt.cprof` and output will be rendered in a browser window.
|
||||||
|
|
||||||
|
## Adding or modifying a CHANGELOG Entry
|
||||||
|
|
||||||
We use [changie](https://changie.dev) to generate `CHANGELOG` entries. **Note:** Do not edit the `CHANGELOG.md` directly. Your modifications will be lost.
|
We use [changie](https://changie.dev) to generate `CHANGELOG` entries. **Note:** Do not edit the `CHANGELOG.md` directly. Your modifications will be lost.
|
||||||
|
|
||||||
Follow the steps to [install `changie`](https://changie.dev/guide/installation/) for your system.
|
Follow the steps to [install `changie`](https://changie.dev/guide/installation/) for your system.
|
||||||
|
|
||||||
Once changie is installed and your PR is created, simply run `changie new` and changie will walk you through the process of creating a changelog entry. Commit the file that's created and your changelog entry is complete!
|
Once changie is installed and your PR is created for a new feature, simply run the following command and changie will walk you through the process of creating a changelog entry:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
changie new
|
||||||
|
```
|
||||||
|
|
||||||
|
Commit the file that's created and your changelog entry is complete!
|
||||||
|
|
||||||
|
If you are contributing to a feature already in progress, you will modify the changie yaml file in dbt/.changes/unreleased/ related to your change. If you need help finding this file, please ask within the discussion for the pull request!
|
||||||
|
|
||||||
You don't need to worry about which `dbt-core` version your change will go into. Just create the changelog entry with `changie`, and open your PR against the `main` branch. All merged changes will be included in the next minor version of `dbt-core`. The Core maintainers _may_ choose to "backport" specific changes in order to patch older minor versions. In that case, a maintainer will take care of that backport after merging your PR, before releasing the new version of `dbt-core`.
|
You don't need to worry about which `dbt-core` version your change will go into. Just create the changelog entry with `changie`, and open your PR against the `main` branch. All merged changes will be included in the next minor version of `dbt-core`. The Core maintainers _may_ choose to "backport" specific changes in order to patch older minor versions. In that case, a maintainer will take care of that backport after merging your PR, before releasing the new version of `dbt-core`.
|
||||||
|
|
||||||
## Submitting a Pull Request
|
## Submitting a Pull Request
|
||||||
|
|
||||||
A `dbt-core` maintainer will review your PR. They may suggest code revision for style or clarity, or request that you add unit or integration test(s). These are good things! We believe that, with a little bit of help, anyone can contribute high-quality code.
|
Code can be merged into the current development branch `main` by opening a pull request. A `dbt-core` maintainer will review your PR. They may suggest code revision for style or clarity, or request that you add unit or integration test(s). These are good things! We believe that, with a little bit of help, anyone can contribute high-quality code.
|
||||||
|
|
||||||
Automated tests run via GitHub Actions. If you're a first-time contributor, all tests (including code checks and unit tests) will require a maintainer to approve. Changes in the `dbt-core` repository trigger integration tests against Postgres. dbt Labs also provides CI environments in which to test changes to other adapters, triggered by PRs in those adapters' repositories, as well as periodic maintenance checks of each adapter in concert with the latest `dbt-core` code changes.
|
Automated tests run via GitHub Actions. If you're a first-time contributor, all tests (including code checks and unit tests) will require a maintainer to approve. Changes in the `dbt-core` repository trigger integration tests against Postgres. dbt Labs also provides CI environments in which to test changes to other adapters, triggered by PRs in those adapters' repositories, as well as periodic maintenance checks of each adapter in concert with the latest `dbt-core` code changes.
|
||||||
|
|
||||||
Once all tests are passing and your PR has been approved, a `dbt-core` maintainer will merge your changes into the active development branch. And that's it! Happy developing :tada:
|
Once all tests are passing and your PR has been approved, a `dbt-core` maintainer will merge your changes into the active development branch. And that's it! Happy developing :tada:
|
||||||
|
|
||||||
|
Sometimes, the content license agreement auto-check bot doesn't find a user's entry in its roster. If you need to force a rerun, add `@cla-bot check` in a comment on the pull request.
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ RUN apt-get update \
|
|||||||
python3.10 \
|
python3.10 \
|
||||||
python3.10-dev \
|
python3.10-dev \
|
||||||
python3.10-venv \
|
python3.10-venv \
|
||||||
|
python3.11 \
|
||||||
|
python3.11-dev \
|
||||||
|
python3.11-venv \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
|||||||
32
Makefile
32
Makefile
@@ -6,11 +6,29 @@ ifeq ($(USE_DOCKER),true)
|
|||||||
DOCKER_CMD := docker-compose run --rm test
|
DOCKER_CMD := docker-compose run --rm test
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: dev
|
LOGS_DIR := ./logs
|
||||||
dev: ## Installs dbt-* packages in develop mode along with development dependencies.
|
|
||||||
|
# Optional flag to invoke tests using our CI env.
|
||||||
|
# But we always want these active for structured
|
||||||
|
# log testing.
|
||||||
|
CI_FLAGS =\
|
||||||
|
DBT_TEST_USER_1=dbt_test_user_1\
|
||||||
|
DBT_TEST_USER_2=dbt_test_user_2\
|
||||||
|
DBT_TEST_USER_3=dbt_test_user_3\
|
||||||
|
RUSTFLAGS="-D warnings"\
|
||||||
|
LOG_DIR=./logs\
|
||||||
|
DBT_LOG_FORMAT=json
|
||||||
|
|
||||||
|
.PHONY: dev_req
|
||||||
|
dev_req: ## Installs dbt-* packages in develop mode along with only development dependencies.
|
||||||
@\
|
@\
|
||||||
pip install -r dev-requirements.txt -r editable-requirements.txt
|
pip install -r dev-requirements.txt -r editable-requirements.txt
|
||||||
|
|
||||||
|
.PHONY: dev
|
||||||
|
dev: dev_req ## Installs dbt-* packages in develop mode along with development dependencies and pre-commit.
|
||||||
|
@\
|
||||||
|
pre-commit install
|
||||||
|
|
||||||
.PHONY: mypy
|
.PHONY: mypy
|
||||||
mypy: .env ## Runs mypy against staged changes for static type checking.
|
mypy: .env ## Runs mypy against staged changes for static type checking.
|
||||||
@\
|
@\
|
||||||
@@ -48,13 +66,20 @@ test: .env ## Runs unit tests with py and code checks against staged changes.
|
|||||||
.PHONY: integration
|
.PHONY: integration
|
||||||
integration: .env ## Runs postgres integration tests with py-integration
|
integration: .env ## Runs postgres integration tests with py-integration
|
||||||
@\
|
@\
|
||||||
$(DOCKER_CMD) tox -e py-integration -- -nauto
|
$(if $(USE_CI_FLAGS), $(CI_FLAGS)) $(DOCKER_CMD) tox -e py-integration -- -nauto
|
||||||
|
|
||||||
.PHONY: integration-fail-fast
|
.PHONY: integration-fail-fast
|
||||||
integration-fail-fast: .env ## Runs postgres integration tests with py-integration in "fail fast" mode.
|
integration-fail-fast: .env ## Runs postgres integration tests with py-integration in "fail fast" mode.
|
||||||
@\
|
@\
|
||||||
$(DOCKER_CMD) tox -e py-integration -- -x -nauto
|
$(DOCKER_CMD) tox -e py-integration -- -x -nauto
|
||||||
|
|
||||||
|
.PHONY: interop
|
||||||
|
interop: clean
|
||||||
|
@\
|
||||||
|
mkdir $(LOGS_DIR) && \
|
||||||
|
$(CI_FLAGS) $(DOCKER_CMD) tox -e py-integration -- -nauto && \
|
||||||
|
LOG_DIR=$(LOGS_DIR) cargo run --manifest-path test/interop/log_parsing/Cargo.toml
|
||||||
|
|
||||||
.PHONY: setup-db
|
.PHONY: setup-db
|
||||||
setup-db: ## Setup Postgres database with docker-compose for system testing.
|
setup-db: ## Setup Postgres database with docker-compose for system testing.
|
||||||
@\
|
@\
|
||||||
@@ -76,6 +101,7 @@ endif
|
|||||||
clean: ## Resets development environment.
|
clean: ## Resets development environment.
|
||||||
@echo 'cleaning repo...'
|
@echo 'cleaning repo...'
|
||||||
@rm -f .coverage
|
@rm -f .coverage
|
||||||
|
@rm -f .coverage.*
|
||||||
@rm -rf .eggs/
|
@rm -rf .eggs/
|
||||||
@rm -f .env
|
@rm -f .env
|
||||||
@rm -rf .tox/
|
@rm -rf .tox/
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
recursive-include dbt/include *.py *.sql *.yml *.html *.md .gitkeep .gitignore
|
recursive-include dbt/include *.py *.sql *.yml *.html *.md .gitkeep .gitignore
|
||||||
|
include dbt/py.typed
|
||||||
|
|||||||
@@ -2,50 +2,59 @@
|
|||||||
|
|
||||||
## The following are individual files in this directory.
|
## The following are individual files in this directory.
|
||||||
|
|
||||||
### deprecations.py
|
|
||||||
|
|
||||||
### flags.py
|
|
||||||
|
|
||||||
### main.py
|
|
||||||
|
|
||||||
### tracking.py
|
|
||||||
|
|
||||||
### version.py
|
|
||||||
|
|
||||||
### lib.py
|
|
||||||
|
|
||||||
### node_types.py
|
|
||||||
|
|
||||||
### helper_types.py
|
|
||||||
|
|
||||||
### links.py
|
|
||||||
|
|
||||||
### semver.py
|
|
||||||
|
|
||||||
### ui.py
|
|
||||||
|
|
||||||
### compilation.py
|
### compilation.py
|
||||||
|
|
||||||
|
### constants.py
|
||||||
|
|
||||||
### dataclass_schema.py
|
### dataclass_schema.py
|
||||||
|
|
||||||
|
### deprecations.py
|
||||||
|
|
||||||
### exceptions.py
|
### exceptions.py
|
||||||
|
|
||||||
|
### flags.py
|
||||||
|
|
||||||
|
### helper_types.py
|
||||||
|
|
||||||
### hooks.py
|
### hooks.py
|
||||||
|
|
||||||
|
### lib.py
|
||||||
|
|
||||||
|
### links.py
|
||||||
|
|
||||||
### logger.py
|
### logger.py
|
||||||
|
|
||||||
|
### main.py
|
||||||
|
|
||||||
|
### node_types.py
|
||||||
|
|
||||||
### profiler.py
|
### profiler.py
|
||||||
|
|
||||||
|
### selected_resources.py
|
||||||
|
|
||||||
|
### semver.py
|
||||||
|
|
||||||
|
### tracking.py
|
||||||
|
|
||||||
|
### ui.py
|
||||||
|
|
||||||
### utils.py
|
### utils.py
|
||||||
|
|
||||||
|
### version.py
|
||||||
|
|
||||||
|
|
||||||
## The subdirectories will be documented in a README in the subdirectory
|
## The subdirectories will be documented in a README in the subdirectory
|
||||||
* config
|
|
||||||
* include
|
|
||||||
* adapters
|
* adapters
|
||||||
* context
|
* cli
|
||||||
* deps
|
|
||||||
* graph
|
|
||||||
* task
|
|
||||||
* clients
|
* clients
|
||||||
|
* config
|
||||||
|
* context
|
||||||
|
* contracts
|
||||||
|
* deps
|
||||||
|
* docs
|
||||||
* events
|
* events
|
||||||
|
* graph
|
||||||
|
* include
|
||||||
|
* parser
|
||||||
|
* task
|
||||||
|
* tests
|
||||||
|
|||||||
10
core/dbt/adapters/base/README.md
Normal file
10
core/dbt/adapters/base/README.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
## Base adapters
|
||||||
|
|
||||||
|
### impl.py
|
||||||
|
|
||||||
|
The class `SQLAdapter` in [base/imply.py](https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/adapters/base/impl.py) is a (mostly) abstract object that adapter objects inherit from. The base class scaffolds out methods that every adapter project usually should implement for smooth communication between dbt and database.
|
||||||
|
|
||||||
|
Some target databases require more or fewer methods--it all depends on what the warehouse's featureset is.
|
||||||
|
|
||||||
|
Look into the class for function-level comments.
|
||||||
@@ -10,5 +10,5 @@ from dbt.adapters.base.relation import ( # noqa
|
|||||||
SchemaSearchMap,
|
SchemaSearchMap,
|
||||||
)
|
)
|
||||||
from dbt.adapters.base.column import Column # noqa
|
from dbt.adapters.base.column import Column # noqa
|
||||||
from dbt.adapters.base.impl import AdapterConfig, BaseAdapter # noqa
|
from dbt.adapters.base.impl import AdapterConfig, BaseAdapter, PythonJobHelper # noqa
|
||||||
from dbt.adapters.base.plugin import AdapterPlugin # noqa
|
from dbt.adapters.base.plugin import AdapterPlugin # noqa
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ from dataclasses import dataclass
|
|||||||
import re
|
import re
|
||||||
from typing import Dict, ClassVar, Any, Optional
|
from typing import Dict, ClassVar, Any, Optional
|
||||||
|
|
||||||
from dbt.exceptions import RuntimeException
|
from dbt.exceptions import DbtRuntimeError
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@@ -12,6 +12,7 @@ class Column:
|
|||||||
"TIMESTAMP": "TIMESTAMP",
|
"TIMESTAMP": "TIMESTAMP",
|
||||||
"FLOAT": "FLOAT",
|
"FLOAT": "FLOAT",
|
||||||
"INTEGER": "INT",
|
"INTEGER": "INT",
|
||||||
|
"BOOLEAN": "BOOLEAN",
|
||||||
}
|
}
|
||||||
column: str
|
column: str
|
||||||
dtype: str
|
dtype: str
|
||||||
@@ -84,7 +85,7 @@ class Column:
|
|||||||
|
|
||||||
def string_size(self) -> int:
|
def string_size(self) -> int:
|
||||||
if not self.is_string():
|
if not self.is_string():
|
||||||
raise RuntimeException("Called string_size() on non-string field!")
|
raise DbtRuntimeError("Called string_size() on non-string field!")
|
||||||
|
|
||||||
if self.dtype == "text" or self.char_size is None:
|
if self.dtype == "text" or self.char_size is None:
|
||||||
# char_size should never be None. Handle it reasonably just in case
|
# char_size should never be None. Handle it reasonably just in case
|
||||||
@@ -123,7 +124,7 @@ class Column:
|
|||||||
def from_description(cls, name: str, raw_data_type: str) -> "Column":
|
def from_description(cls, name: str, raw_data_type: str) -> "Column":
|
||||||
match = re.match(r"([^(]+)(\([^)]+\))?", raw_data_type)
|
match = re.match(r"([^(]+)(\([^)]+\))?", raw_data_type)
|
||||||
if match is None:
|
if match is None:
|
||||||
raise RuntimeException(f'Could not interpret data type "{raw_data_type}"')
|
raise DbtRuntimeError(f'Could not interpret data type "{raw_data_type}"')
|
||||||
data_type, size_info = match.groups()
|
data_type, size_info = match.groups()
|
||||||
char_size = None
|
char_size = None
|
||||||
numeric_precision = None
|
numeric_precision = None
|
||||||
@@ -136,7 +137,7 @@ class Column:
|
|||||||
try:
|
try:
|
||||||
char_size = int(parts[0])
|
char_size = int(parts[0])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise RuntimeException(
|
raise DbtRuntimeError(
|
||||||
f'Could not interpret data_type "{raw_data_type}": '
|
f'Could not interpret data_type "{raw_data_type}": '
|
||||||
f'could not convert "{parts[0]}" to an integer'
|
f'could not convert "{parts[0]}" to an integer'
|
||||||
)
|
)
|
||||||
@@ -144,14 +145,14 @@ class Column:
|
|||||||
try:
|
try:
|
||||||
numeric_precision = int(parts[0])
|
numeric_precision = int(parts[0])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise RuntimeException(
|
raise DbtRuntimeError(
|
||||||
f'Could not interpret data_type "{raw_data_type}": '
|
f'Could not interpret data_type "{raw_data_type}": '
|
||||||
f'could not convert "{parts[0]}" to an integer'
|
f'could not convert "{parts[0]}" to an integer'
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
numeric_scale = int(parts[1])
|
numeric_scale = int(parts[1])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise RuntimeException(
|
raise DbtRuntimeError(
|
||||||
f'Could not interpret data_type "{raw_data_type}": '
|
f'Could not interpret data_type "{raw_data_type}": '
|
||||||
f'could not convert "{parts[1]}" to an integer'
|
f'could not convert "{parts[1]}" to an integer'
|
||||||
)
|
)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user