mirror of
https://github.com/dbt-labs/dbt-core
synced 2025-12-19 17:31:28 +00:00
Compare commits
266 Commits
er/test-re
...
enable-pos
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf4384da38 | ||
|
|
71a6e53102 | ||
|
|
c4dc80dcd2 | ||
|
|
8097a34726 | ||
|
|
b66dff7278 | ||
|
|
22d21edb4b | ||
|
|
bef7928e22 | ||
|
|
c573131d91 | ||
|
|
f10d84d05e | ||
|
|
79a4c8969e | ||
|
|
9a80308fcf | ||
|
|
7a13d08376 | ||
|
|
9e9f5b8e57 | ||
|
|
9cd6a23eba | ||
|
|
e46c37cf07 | ||
|
|
df23f398a6 | ||
|
|
97df9278c0 | ||
|
|
748d352b6b | ||
|
|
bbd8fa02f1 | ||
|
|
61009f6ba7 | ||
|
|
ee7ecdc29f | ||
|
|
d74b58a137 | ||
|
|
12b04e7d2f | ||
|
|
5d56a052a7 | ||
|
|
62a8ea05a6 | ||
|
|
1219bd49aa | ||
|
|
791d1ebdcd | ||
|
|
148b9b41a5 | ||
|
|
d096a6776e | ||
|
|
8ff86d35ea | ||
|
|
087f8167ec | ||
|
|
bcb07ceb7b | ||
|
|
c559848044 | ||
|
|
3de0160b00 | ||
|
|
2c7f49a71e | ||
|
|
518c360a29 | ||
|
|
8cf51fddba | ||
|
|
8e128eee8e | ||
|
|
94b69b1578 | ||
|
|
0216e32c7f | ||
|
|
bbd078089e | ||
|
|
575bac3172 | ||
|
|
bca2211246 | ||
|
|
0015e35a1b | ||
|
|
09bce7af63 | ||
|
|
cb7c4a7dce | ||
|
|
5555a3dd25 | ||
|
|
0e30db4e82 | ||
|
|
b2ff6ab5a7 | ||
|
|
48218be274 | ||
|
|
500208c009 | ||
|
|
0162b71e94 | ||
|
|
811e4ee955 | ||
|
|
b79ec3c33b | ||
|
|
e32718e666 | ||
|
|
f6e0793d00 | ||
|
|
39cf2ec94f | ||
|
|
3caddd0b65 | ||
|
|
5dd516608b | ||
|
|
11ada88e48 | ||
|
|
b9e5c144a9 | ||
|
|
001e729664 | ||
|
|
7e10fc72d5 | ||
|
|
c170211ce3 | ||
|
|
8e800cee4c | ||
|
|
1bd81f5025 | ||
|
|
65a122b34a | ||
|
|
785304732f | ||
|
|
4693918a0f | ||
|
|
96738d5edc | ||
|
|
780544dc7f | ||
|
|
2190fa64a3 | ||
|
|
deb2f3e890 | ||
|
|
34f0190a14 | ||
|
|
7f9449660e | ||
|
|
ea172aa668 | ||
|
|
f0d3b8a51d | ||
|
|
c6afa4d0f2 | ||
|
|
98a1b6e272 | ||
|
|
d5071fa135 | ||
|
|
db284a14c1 | ||
|
|
4017802800 | ||
|
|
17a8816ee3 | ||
|
|
3bd425fdc9 | ||
|
|
db9a6e10c1 | ||
|
|
4a78a78c2b | ||
|
|
5ee5bf4129 | ||
|
|
ac445ca1fd | ||
|
|
1258728d9a | ||
|
|
15722264aa | ||
|
|
a6d4091b6b | ||
|
|
b1b3839715 | ||
|
|
963251df4e | ||
|
|
8c929c337e | ||
|
|
e949d1a6f9 | ||
|
|
538de17f78 | ||
|
|
96c9d80f83 | ||
|
|
2f842055f0 | ||
|
|
faeee357b1 | ||
|
|
bca5c4d454 | ||
|
|
b3d059e427 | ||
|
|
b783c97eff | ||
|
|
5add25db0c | ||
|
|
ad6ea20277 | ||
|
|
472b8057a9 | ||
|
|
2915c3e284 | ||
|
|
537daa8476 | ||
|
|
b48ad8282b | ||
|
|
7cab753863 | ||
|
|
19393a8080 | ||
|
|
1e61e3bfc6 | ||
|
|
a9dae5cac1 | ||
|
|
15010f1e6b | ||
|
|
2564b3d1f9 | ||
|
|
34bb3f94dd | ||
|
|
593a151220 | ||
|
|
1a251ee081 | ||
|
|
9b7cf25c33 | ||
|
|
26333f7f21 | ||
|
|
9bc7333e19 | ||
|
|
ee8884731b | ||
|
|
f1106ad61e | ||
|
|
ada5d3b82a | ||
|
|
64b58ec628 | ||
|
|
1e713db2fa | ||
|
|
6b7b1ad74b | ||
|
|
3e31117ba1 | ||
|
|
451b745aea | ||
|
|
d27232a946 | ||
|
|
b1705fb6f3 | ||
|
|
0e50851fa6 | ||
|
|
b75d5e701e | ||
|
|
f8b1a6dcd1 | ||
|
|
9010537499 | ||
|
|
56d3c9318b | ||
|
|
1fcce443ba | ||
|
|
de03d6f44f | ||
|
|
5db78ca6dd | ||
|
|
ada9e63c13 | ||
|
|
69d19eb5fc | ||
|
|
55bb3c304a | ||
|
|
693564de40 | ||
|
|
04a3df7324 | ||
|
|
31d974f5eb | ||
|
|
c1f64e216f | ||
|
|
8fa6e037d0 | ||
|
|
e1c98e8123 | ||
|
|
9955ea760a | ||
|
|
fdd0546700 | ||
|
|
45f21a7cda | ||
|
|
f250b503d5 | ||
|
|
aa42ff8986 | ||
|
|
3c2fdfe735 | ||
|
|
303c63ccc8 | ||
|
|
17ec11ad30 | ||
|
|
65598f3dc6 | ||
|
|
240a6056fb | ||
|
|
7cd8935b13 | ||
|
|
cd5d4be7ab | ||
|
|
5a23894584 | ||
|
|
70ad9319d2 | ||
|
|
8873581c5a | ||
|
|
1ffd059442 | ||
|
|
091ba5fe0b | ||
|
|
6bbcce1f1c | ||
|
|
0fff5760ff | ||
|
|
f4988c62e3 | ||
|
|
2e6d4f493d | ||
|
|
3e593600e0 | ||
|
|
87584c73b0 | ||
|
|
709bd11c71 | ||
|
|
f7f53732b2 | ||
|
|
32b8097a1f | ||
|
|
36f1143c31 | ||
|
|
cf7a465338 | ||
|
|
465aa0c2fc | ||
|
|
a0284edb6b | ||
|
|
d2bfb4e215 | ||
|
|
38443640ce | ||
|
|
86e0ad49aa | ||
|
|
972eb23d03 | ||
|
|
f56c3868cf | ||
|
|
66fc546766 | ||
|
|
c71d5f6665 | ||
|
|
6e0564a98b | ||
|
|
99827ea220 | ||
|
|
0db83d0abd | ||
|
|
98711cec75 | ||
|
|
4a8f9c181c | ||
|
|
5165716e3d | ||
|
|
65d428004a | ||
|
|
14fc39a76f | ||
|
|
8b4e2a138c | ||
|
|
a11ee322ae | ||
|
|
db8ca25da9 | ||
|
|
c264a7f2b9 | ||
|
|
da6f0a1bd7 | ||
|
|
c643a1d482 | ||
|
|
0f8f42639d | ||
|
|
ec2cf9b561 | ||
|
|
c6b7655b65 | ||
|
|
3e80ad7cc7 | ||
|
|
1efad4e68e | ||
|
|
f5e0a3b1b3 | ||
|
|
a64b5be25b | ||
|
|
b31718a31f | ||
|
|
f6d83c765c | ||
|
|
5b3b22a2e9 | ||
|
|
a9b26d03ce | ||
|
|
31cb5a9b72 | ||
|
|
e5dd4c57a6 | ||
|
|
e7a1c6c315 | ||
|
|
e355be6186 | ||
|
|
12850a36ec | ||
|
|
010411fed3 | ||
|
|
f64a4883eb | ||
|
|
2883933549 | ||
|
|
fe9c78eed8 | ||
|
|
a5ec58dab9 | ||
|
|
29a79557d5 | ||
|
|
35fc3fdda2 | ||
|
|
8931262fa2 | ||
|
|
85d31db1d4 | ||
|
|
d48476a08d | ||
|
|
02f695b423 | ||
|
|
3c95db9c00 | ||
|
|
fec20ff914 | ||
|
|
de38bc9b0d | ||
|
|
f4114130c9 | ||
|
|
e920053306 | ||
|
|
511ff8e0e9 | ||
|
|
0220941849 | ||
|
|
7594d42e02 | ||
|
|
bd08d13ddc | ||
|
|
5095e8d1e8 | ||
|
|
a1958c1193 | ||
|
|
2a4da100ff | ||
|
|
9c91ab27b1 | ||
|
|
3f56cbce5f | ||
|
|
7cca8470e0 | ||
|
|
c82ceaaf39 | ||
|
|
e2e86b788c | ||
|
|
6b747fe801 | ||
|
|
9e6facc4d1 | ||
|
|
5cd966cafa | ||
|
|
47d5d99693 | ||
|
|
359b195d23 | ||
|
|
2a64b7365f | ||
|
|
c6aeb4a291 | ||
|
|
5001e4f0e1 | ||
|
|
61648b5ed2 | ||
|
|
4aa5169212 | ||
|
|
729caf0d5e | ||
|
|
f26d82217e | ||
|
|
e264675db7 | ||
|
|
300aa09fc5 | ||
|
|
493008417c | ||
|
|
906e07c1f2 | ||
|
|
6a954e2d24 | ||
|
|
3b724acc54 | ||
|
|
b0ca1256ae | ||
|
|
9d7820c356 | ||
|
|
1fc193167d | ||
|
|
d9f96a95c1 | ||
|
|
138a2acf84 | ||
|
|
88ada4aa31 |
@@ -1,37 +0,0 @@
|
|||||||
[bumpversion]
|
|
||||||
current_version = 1.10.0a1
|
|
||||||
parse = (?P<major>[\d]+) # major version number
|
|
||||||
\.(?P<minor>[\d]+) # minor version number
|
|
||||||
\.(?P<patch>[\d]+) # patch version number
|
|
||||||
(?P<prerelease> # optional pre-release - ex: a1, b2, rc25
|
|
||||||
(?P<prekind>a|b|rc) # pre-release type
|
|
||||||
(?P<num>[\d]+) # pre-release version number
|
|
||||||
)?
|
|
||||||
( # optional nightly release indicator
|
|
||||||
\.(?P<nightly>dev[0-9]+) # ex: .dev02142023
|
|
||||||
)? # expected matches: `1.15.0`, `1.5.0a11`, `1.5.0a1.dev123`, `1.5.0.dev123457`, expected failures: `1`, `1.5`, `1.5.2-a1`, `text1.5.0`
|
|
||||||
serialize =
|
|
||||||
{major}.{minor}.{patch}{prekind}{num}.{nightly}
|
|
||||||
{major}.{minor}.{patch}.{nightly}
|
|
||||||
{major}.{minor}.{patch}{prekind}{num}
|
|
||||||
{major}.{minor}.{patch}
|
|
||||||
commit = False
|
|
||||||
tag = False
|
|
||||||
|
|
||||||
[bumpversion:part:prekind]
|
|
||||||
first_value = a
|
|
||||||
optional_value = final
|
|
||||||
values =
|
|
||||||
a
|
|
||||||
b
|
|
||||||
rc
|
|
||||||
final
|
|
||||||
|
|
||||||
[bumpversion:part:num]
|
|
||||||
first_value = 1
|
|
||||||
|
|
||||||
[bumpversion:part:nightly]
|
|
||||||
|
|
||||||
[bumpversion:file:core/setup.py]
|
|
||||||
|
|
||||||
[bumpversion:file:core/dbt/version.py]
|
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
For information on prior major and minor releases, see their changelogs:
|
For information on prior major and minor releases, see their changelogs:
|
||||||
|
|
||||||
|
|
||||||
|
* [1.10](https://github.com/dbt-labs/dbt-core/blob/1.10.latest/CHANGELOG.md)
|
||||||
|
* [1.9](https://github.com/dbt-labs/dbt-core/blob/1.9.latest/CHANGELOG.md)
|
||||||
|
* [1.8](https://github.com/dbt-labs/dbt-core/blob/1.8.latest/CHANGELOG.md)
|
||||||
* [1.7](https://github.com/dbt-labs/dbt-core/blob/1.7.latest/CHANGELOG.md)
|
* [1.7](https://github.com/dbt-labs/dbt-core/blob/1.7.latest/CHANGELOG.md)
|
||||||
* [1.6](https://github.com/dbt-labs/dbt-core/blob/1.6.latest/CHANGELOG.md)
|
* [1.6](https://github.com/dbt-labs/dbt-core/blob/1.6.latest/CHANGELOG.md)
|
||||||
* [1.5](https://github.com/dbt-labs/dbt-core/blob/1.5.latest/CHANGELOG.md)
|
* [1.5](https://github.com/dbt-labs/dbt-core/blob/1.5.latest/CHANGELOG.md)
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Breaking Changes
|
|
||||||
body: Add invocations_started_at field to artifact metadata
|
|
||||||
time: 2025-02-10T12:33:06.722803-05:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "11272"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Dependencies
|
|
||||||
body: Upgrading dbt-semantic-interfaces to 0.8.3 for custom grain support in offset windows
|
|
||||||
time: 2024-11-12T16:38:15.351519-05:00
|
|
||||||
custom:
|
|
||||||
Author: WilliamDee
|
|
||||||
Issue: None
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: "Dependencies"
|
|
||||||
body: "Bump codecov/codecov-action from 4 to 5"
|
|
||||||
time: 2024-11-18T00:11:13.00000Z
|
|
||||||
custom:
|
|
||||||
Author: dependabot[bot]
|
|
||||||
Issue: 11009
|
|
||||||
6
.changes/unreleased/Dependencies-20251118-155354.yaml
Normal file
6
.changes/unreleased/Dependencies-20251118-155354.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Dependencies
|
||||||
|
body: Use EventCatcher from dbt-common instead of maintaining a local copy
|
||||||
|
time: 2025-11-18T15:53:54.284561+05:30
|
||||||
|
custom:
|
||||||
|
Author: 3loka
|
||||||
|
Issue: "12124"
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Add new hard_deletes="new_record" mode for snapshots.
|
|
||||||
time: 2024-11-04T12:00:53.95191-05:00
|
|
||||||
custom:
|
|
||||||
Author: peterallenwebb
|
|
||||||
Issue: "10235"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Add `batch` context object to model jinja context
|
|
||||||
time: 2024-11-21T12:56:30.715473-06:00
|
|
||||||
custom:
|
|
||||||
Author: QMalcolm
|
|
||||||
Issue: "11025"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Ensure pre/post hooks only run on first/last batch respectively for microbatch
|
|
||||||
model batches
|
|
||||||
time: 2024-12-06T19:53:08.928793-06:00
|
|
||||||
custom:
|
|
||||||
Author: MichelleArk QMalcolm
|
|
||||||
Issue: 11094 11104
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Support "tags" in Saved Queries
|
|
||||||
time: 2024-12-16T09:54:35.327675-08:00
|
|
||||||
custom:
|
|
||||||
Author: theyostalservice
|
|
||||||
Issue: "11155"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Calculate source freshness via a SQL query
|
|
||||||
time: 2024-12-17T17:16:31.841076-08:00
|
|
||||||
custom:
|
|
||||||
Author: ChenyuLInx
|
|
||||||
Issue: "8797"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Add freshness definition on model for adaptive job
|
|
||||||
time: 2024-12-18T17:07:29.55754-08:00
|
|
||||||
custom:
|
|
||||||
Author: ChenyuLInx
|
|
||||||
Issue: "11123"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Meta config for dimensions measures and entities
|
|
||||||
time: 2025-01-06T13:28:29.176439-06:00
|
|
||||||
custom:
|
|
||||||
Author: DevonFulcher
|
|
||||||
Issue: None
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Add doc_blocks to manifest for nodes and columns
|
|
||||||
time: 2025-01-22T17:03:28.866522Z
|
|
||||||
custom:
|
|
||||||
Author: aranke
|
|
||||||
Issue: 11000 11001
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Initial implementation of sample mode
|
|
||||||
time: 2025-02-02T14:00:54.074209-06:00
|
|
||||||
custom:
|
|
||||||
Author: QMalcolm
|
|
||||||
Issue: 11227 11230 11231 11248 11252 11254 11258
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Combine `--sample` and `--sample-window` CLI params
|
|
||||||
time: 2025-02-12T15:56:58.546879-06:00
|
|
||||||
custom:
|
|
||||||
Author: QMalcolm
|
|
||||||
Issue: "11299"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Allow for sampling of ref'd seeds
|
|
||||||
time: 2025-02-12T17:37:43.554156-06:00
|
|
||||||
custom:
|
|
||||||
Author: QMalcolm
|
|
||||||
Issue: "11300"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Enable sample mode for 'build' command
|
|
||||||
time: 2025-02-13T18:29:32.238857-06:00
|
|
||||||
custom:
|
|
||||||
Author: QMalcolm
|
|
||||||
Issue: "11298"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Features
|
|
||||||
body: Allow sampling nodes snapshots depend on and of snapshots as a dependency
|
|
||||||
time: 2025-02-14T15:29:57.118017-06:00
|
|
||||||
custom:
|
|
||||||
Author: QMalcolm
|
|
||||||
Issue: "11301"
|
|
||||||
6
.changes/unreleased/Features-20251006-140352.yaml
Normal file
6
.changes/unreleased/Features-20251006-140352.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Features
|
||||||
|
body: Support partial parsing for function nodes
|
||||||
|
time: 2025-10-06T14:03:52.258104-05:00
|
||||||
|
custom:
|
||||||
|
Author: QMalcolm
|
||||||
|
Issue: "12072"
|
||||||
6
.changes/unreleased/Features-20251117-141053.yaml
Normal file
6
.changes/unreleased/Features-20251117-141053.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Features
|
||||||
|
body: Allow for defining funciton arguments with default values
|
||||||
|
time: 2025-11-17T14:10:53.860178-06:00
|
||||||
|
custom:
|
||||||
|
Author: QMalcolm
|
||||||
|
Issue: "12044"
|
||||||
6
.changes/unreleased/Features-20251201-165209.yaml
Normal file
6
.changes/unreleased/Features-20251201-165209.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Features
|
||||||
|
body: Raise jsonschema-based deprecation warnings by default
|
||||||
|
time: 2025-12-01T16:52:09.354436-05:00
|
||||||
|
custom:
|
||||||
|
Author: michelleark
|
||||||
|
Issue: 12240
|
||||||
6
.changes/unreleased/Features-20251203-122926.yaml
Normal file
6
.changes/unreleased/Features-20251203-122926.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Features
|
||||||
|
body: ':bug: :snowman: Disable unit tests whose model is disabled'
|
||||||
|
time: 2025-12-03T12:29:26.209248-05:00
|
||||||
|
custom:
|
||||||
|
Author: michelleark
|
||||||
|
Issue: "10540"
|
||||||
6
.changes/unreleased/Features-20251210-202001.yaml
Normal file
6
.changes/unreleased/Features-20251210-202001.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Features
|
||||||
|
body: Implement config.meta_get and config.meta_require
|
||||||
|
time: 2025-12-10T20:20:01.354288-05:00
|
||||||
|
custom:
|
||||||
|
Author: gshank
|
||||||
|
Issue: "12012"
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: dbt retry does not respect --threads
|
|
||||||
time: 2024-08-22T12:21:32.358066+05:30
|
|
||||||
custom:
|
|
||||||
Author: donjin-master
|
|
||||||
Issue: "10584"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: update adapter version messages
|
|
||||||
time: 2024-10-25T10:43:39.274723-05:00
|
|
||||||
custom:
|
|
||||||
Author: dave-connors-3
|
|
||||||
Issue: "10230"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Catch DbtRuntimeError for hooks
|
|
||||||
time: 2024-11-21T18:17:39.753235Z
|
|
||||||
custom:
|
|
||||||
Author: aranke
|
|
||||||
Issue: "11012"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Access DBUG flag more consistently with the rest of the codebase in ManifestLoader
|
|
||||||
time: 2024-11-28T16:29:36.236729+01:00
|
|
||||||
custom:
|
|
||||||
Author: Threynaud
|
|
||||||
Issue: "11068"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Improve the performance characteristics of add_test_edges()
|
|
||||||
time: 2024-12-04T10:04:29.096231-05:00
|
|
||||||
custom:
|
|
||||||
Author: peterallenwebb
|
|
||||||
Issue: "10950"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Implement partial parsing for singular data test configs in yaml files
|
|
||||||
time: 2024-12-05T14:53:07.295536-05:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "10801"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Fix debug log messages for microbatch batch execution information
|
|
||||||
time: 2024-12-09T11:38:06.972743-06:00
|
|
||||||
custom:
|
|
||||||
Author: MichelleArk QMalcolm
|
|
||||||
Issue: "11111"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Fix running of extra "last" batch when there is only one batch
|
|
||||||
time: 2024-12-09T13:33:17.253326-06:00
|
|
||||||
custom:
|
|
||||||
Author: QMalcolm
|
|
||||||
Issue: "11112"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Fix interpretation of `PartialSuccess` to result in non-zero exit code
|
|
||||||
time: 2024-12-09T15:07:11.391313-06:00
|
|
||||||
custom:
|
|
||||||
Author: QMalcolm
|
|
||||||
Issue: "11114"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Warn about invalid usages of `concurrent_batches` config
|
|
||||||
time: 2024-12-12T11:36:11.451962-06:00
|
|
||||||
custom:
|
|
||||||
Author: QMalcolm
|
|
||||||
Issue: "11122"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Error writing generic test at run time
|
|
||||||
time: 2024-12-16T13:46:45.936573-05:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "11110"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Run check_modified_contract for state:modified
|
|
||||||
time: 2024-12-17T15:48:48.053054-05:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "11034"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Fix unrendered_config for tests from dbt_project.yml
|
|
||||||
time: 2024-12-18T11:26:40.270022-05:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "11146"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Make partial parsing reparse referencing nodes of newly versioned models.
|
|
||||||
time: 2025-01-02T14:05:43.629959-05:00
|
|
||||||
custom:
|
|
||||||
Author: d-cole
|
|
||||||
Issue: "8872"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Ensure warning about microbatch lacking filter inputs is always fired
|
|
||||||
time: 2025-01-07T17:37:19.373261-06:00
|
|
||||||
custom:
|
|
||||||
Author: QMalcolm
|
|
||||||
Issue: "11159"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Fix microbatch dbt list --output json
|
|
||||||
time: 2025-01-09T12:33:09.958795+01:00
|
|
||||||
custom:
|
|
||||||
Author: internetcoffeephone
|
|
||||||
Issue: 10556 11098
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Fix for custom fields in generic test config for not_null and unique tests
|
|
||||||
time: 2025-01-10T15:58:24.479245-05:00
|
|
||||||
custom:
|
|
||||||
Author: gshank
|
|
||||||
Issue: "11208"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Loosen validation on freshness to accomodate previously wrong but harmless config.
|
|
||||||
time: 2025-01-28T13:55:09.318833-08:00
|
|
||||||
custom:
|
|
||||||
Author: ChenyuLInx peterallenwebb
|
|
||||||
Issue: "11123"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Handle `--limit -1` properly in `ShowTaskDirect` so that it propagates None instead of a negative int
|
|
||||||
time: 2025-02-07T13:14:24.725503-05:00
|
|
||||||
custom:
|
|
||||||
Author: WilliamDee
|
|
||||||
Issue: None
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: _get_doc_blocks is crashing parsing if .format is called
|
|
||||||
time: 2025-02-18T13:47:45.659731Z
|
|
||||||
custom:
|
|
||||||
Author: aranke
|
|
||||||
Issue: "11310"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Fixes
|
|
||||||
body: Fix microbatch execution to not block main thread nor hang
|
|
||||||
time: 2025-03-03T13:14:40.432874-06:00
|
|
||||||
custom:
|
|
||||||
Author: QMalcolm
|
|
||||||
Issue: 11243 11306
|
|
||||||
6
.changes/unreleased/Fixes-20250922-151726.yaml
Normal file
6
.changes/unreleased/Fixes-20250922-151726.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: Address Click 8.2+ deprecation warning
|
||||||
|
time: 2025-09-22T15:17:26.983151-06:00
|
||||||
|
custom:
|
||||||
|
Author: edgarrmondragon
|
||||||
|
Issue: "12038"
|
||||||
6
.changes/unreleased/Fixes-20251117-140649.yaml
Normal file
6
.changes/unreleased/Fixes-20251117-140649.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: Include macros in unit test parsing
|
||||||
|
time: 2025-11-17T14:06:49.518566-05:00
|
||||||
|
custom:
|
||||||
|
Author: michelleark nathanskone
|
||||||
|
Issue: "10157"
|
||||||
6
.changes/unreleased/Fixes-20251117-185025.yaml
Normal file
6
.changes/unreleased/Fixes-20251117-185025.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: Allow dbt deps to run when vars lack defaults in dbt_project.yml
|
||||||
|
time: 2025-11-17T18:50:25.759091+05:30
|
||||||
|
custom:
|
||||||
|
Author: 3loka
|
||||||
|
Issue: "8913"
|
||||||
6
.changes/unreleased/Fixes-20251118-171106.yaml
Normal file
6
.changes/unreleased/Fixes-20251118-171106.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: Restore DuplicateResourceNameError for intra-project node name duplication, behind behavior flag `require_unique_project_resource_names`
|
||||||
|
time: 2025-11-18T17:11:06.454784-05:00
|
||||||
|
custom:
|
||||||
|
Author: michelleark
|
||||||
|
Issue: "12152"
|
||||||
6
.changes/unreleased/Fixes-20251119-195034.yaml
Normal file
6
.changes/unreleased/Fixes-20251119-195034.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: Allow the usage of `function` with `--exclude-resource-type` flag
|
||||||
|
time: 2025-11-19T19:50:34.703236-06:00
|
||||||
|
custom:
|
||||||
|
Author: QMalcolm
|
||||||
|
Issue: "12143"
|
||||||
6
.changes/unreleased/Fixes-20251124-155629.yaml
Normal file
6
.changes/unreleased/Fixes-20251124-155629.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: Fix bug where schemas of functions weren't guaranteed to exist
|
||||||
|
time: 2025-11-24T15:56:29.467004-06:00
|
||||||
|
custom:
|
||||||
|
Author: QMalcolm
|
||||||
|
Issue: "12142"
|
||||||
6
.changes/unreleased/Fixes-20251124-155756.yaml
Normal file
6
.changes/unreleased/Fixes-20251124-155756.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: Fix generation of deprecations summary
|
||||||
|
time: 2025-11-24T15:57:56.544123-08:00
|
||||||
|
custom:
|
||||||
|
Author: asiunov
|
||||||
|
Issue: "12146"
|
||||||
6
.changes/unreleased/Fixes-20251124-170855.yaml
Normal file
6
.changes/unreleased/Fixes-20251124-170855.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: ':bug: :snowman: Correctly reference foreign key references when --defer and --state provided'
|
||||||
|
time: 2025-11-24T17:08:55.387946-05:00
|
||||||
|
custom:
|
||||||
|
Author: michellark
|
||||||
|
Issue: "11885"
|
||||||
7
.changes/unreleased/Fixes-20251125-120246.yaml
Normal file
7
.changes/unreleased/Fixes-20251125-120246.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: ':bug: :snowman: Add exception when using --state and referring to a removed
|
||||||
|
test'
|
||||||
|
time: 2025-11-25T12:02:46.635026-05:00
|
||||||
|
custom:
|
||||||
|
Author: emmyoop
|
||||||
|
Issue: "10630"
|
||||||
6
.changes/unreleased/Fixes-20251125-122020.yaml
Normal file
6
.changes/unreleased/Fixes-20251125-122020.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: ':bug: :snowman: Stop emitting `NoNodesForSelectionCriteria` three times during `build` command'
|
||||||
|
time: 2025-11-25T12:20:20.132379-06:00
|
||||||
|
custom:
|
||||||
|
Author: QMalcolm
|
||||||
|
Issue: "11627"
|
||||||
6
.changes/unreleased/Fixes-20251127-141308.yaml
Normal file
6
.changes/unreleased/Fixes-20251127-141308.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: ":bug: :snowman: Fix long Python stack traces appearing when package dependencies have incompatible version requirements"
|
||||||
|
time: 2025-11-27T14:13:08.082542-05:00
|
||||||
|
custom:
|
||||||
|
Author: emmyoop
|
||||||
|
Issue: "12049"
|
||||||
7
.changes/unreleased/Fixes-20251127-145929.yaml
Normal file
7
.changes/unreleased/Fixes-20251127-145929.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: ':bug: :snowman: Fixed issue where changing data type size/precision/scale (e.g.,
|
||||||
|
varchar(3) to varchar(10)) incorrectly triggered a breaking change error fo'
|
||||||
|
time: 2025-11-27T14:59:29.256274-05:00
|
||||||
|
custom:
|
||||||
|
Author: emmyoop
|
||||||
|
Issue: "11186"
|
||||||
6
.changes/unreleased/Fixes-20251127-170124.yaml
Normal file
6
.changes/unreleased/Fixes-20251127-170124.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: ':bug: :snowman: Support unit testing models that depend on sources with the same name'
|
||||||
|
time: 2025-11-27T17:01:24.193516-05:00
|
||||||
|
custom:
|
||||||
|
Author: michelleark
|
||||||
|
Issue: 11975 10433
|
||||||
6
.changes/unreleased/Fixes-20251128-102129.yaml
Normal file
6
.changes/unreleased/Fixes-20251128-102129.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: Fix bug in partial parsing when updating a model with a schema file that is referenced by a singular test
|
||||||
|
time: 2025-11-28T10:21:29.911147Z
|
||||||
|
custom:
|
||||||
|
Author: mattogburke
|
||||||
|
Issue: "12223"
|
||||||
6
.changes/unreleased/Fixes-20251128-122838.yaml
Normal file
6
.changes/unreleased/Fixes-20251128-122838.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: ':bug: :snowman: Avoid retrying successful run-operation commands'
|
||||||
|
time: 2025-11-28T12:28:38.546261-05:00
|
||||||
|
custom:
|
||||||
|
Author: michelleark
|
||||||
|
Issue: "11850"
|
||||||
7
.changes/unreleased/Fixes-20251128-161937.yaml
Normal file
7
.changes/unreleased/Fixes-20251128-161937.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: ':bug: :snowman: Fix `dbt deps --add-package` crash when packages.yml contains `warn-unpinned:
|
||||||
|
false`'
|
||||||
|
time: 2025-11-28T16:19:37.608722-05:00
|
||||||
|
custom:
|
||||||
|
Author: emmyoop
|
||||||
|
Issue: "9104"
|
||||||
7
.changes/unreleased/Fixes-20251128-163144.yaml
Normal file
7
.changes/unreleased/Fixes-20251128-163144.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: ':bug: :snowman: Improve `dbt deps --add-package` duplicate detection with better
|
||||||
|
cross-source matching and word boundaries'
|
||||||
|
time: 2025-11-28T16:31:44.344099-05:00
|
||||||
|
custom:
|
||||||
|
Author: emmyoop
|
||||||
|
Issue: "12239"
|
||||||
6
.changes/unreleased/Fixes-20251202-133705.yaml
Normal file
6
.changes/unreleased/Fixes-20251202-133705.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: ':bug: :snowman: Fix false positive deprecation warning of pre/post-hook SQL configs'
|
||||||
|
time: 2025-12-02T13:37:05.012112-05:00
|
||||||
|
custom:
|
||||||
|
Author: michelleark
|
||||||
|
Issue: "12244"
|
||||||
6
.changes/unreleased/Fixes-20251209-175031.yaml
Normal file
6
.changes/unreleased/Fixes-20251209-175031.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: Ensure recent deprecation warnings include event name in message
|
||||||
|
time: 2025-12-09T17:50:31.334618-06:00
|
||||||
|
custom:
|
||||||
|
Author: QMalcolm
|
||||||
|
Issue: "12264"
|
||||||
6
.changes/unreleased/Fixes-20251210-143935.yaml
Normal file
6
.changes/unreleased/Fixes-20251210-143935.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Fixes
|
||||||
|
body: Improve error message clarity when detecting nodes with space in name
|
||||||
|
time: 2025-12-10T14:39:35.107841-08:00
|
||||||
|
custom:
|
||||||
|
Author: michelleark
|
||||||
|
Issue: "11835"
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Create a no-op exposure runner
|
|
||||||
time: 2024-12-02T16:47:15.766574Z
|
|
||||||
custom:
|
|
||||||
Author: aranke
|
|
||||||
Issue: ' '
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Improve selection peformance by optimizing the select_children() and select_parents()
|
|
||||||
functions.
|
|
||||||
time: 2024-12-05T14:31:44.584216-05:00
|
|
||||||
custom:
|
|
||||||
Author: peterallenwebb
|
|
||||||
Issue: "11099"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Change exception type from DbtInternalException to UndefinedMacroError when
|
|
||||||
macro not found in 'run operation' command
|
|
||||||
time: 2025-01-07T12:39:55.234321-05:00
|
|
||||||
custom:
|
|
||||||
Author: michelleark
|
|
||||||
Issue: "11192"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Create LogNodeResult event
|
|
||||||
time: 2025-01-07T20:58:38.821036Z
|
|
||||||
custom:
|
|
||||||
Author: aranke
|
|
||||||
Issue: ' '
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Fix error counts for exposures
|
|
||||||
time: 2025-01-10T20:20:57.01632Z
|
|
||||||
custom:
|
|
||||||
Author: aranke
|
|
||||||
Issue: ' '
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Misc fixes for group info in logging
|
|
||||||
time: 2025-01-17T15:22:15.497485Z
|
|
||||||
custom:
|
|
||||||
Author: aranke
|
|
||||||
Issue: '11218'
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
kind: Under the Hood
|
|
||||||
body: Add secondary profiles to profile.py
|
|
||||||
time: 2025-02-14T12:38:53.964266Z
|
|
||||||
custom:
|
|
||||||
Author: aranke
|
|
||||||
Issue: XPLAT-241
|
|
||||||
6
.changes/unreleased/Under the Hood-20251119-110110.yaml
Normal file
6
.changes/unreleased/Under the Hood-20251119-110110.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Under the Hood
|
||||||
|
body: Update jsonschemas for schema.yml and dbt_project.yml deprecations
|
||||||
|
time: 2025-11-19T11:01:10.616676-05:00
|
||||||
|
custom:
|
||||||
|
Author: michelleark
|
||||||
|
Issue: "12180"
|
||||||
6
.changes/unreleased/Under the Hood-20251121-140515.yaml
Normal file
6
.changes/unreleased/Under the Hood-20251121-140515.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Under the Hood
|
||||||
|
body: Replace setuptools and tox with hatch for build, test, and environment management.
|
||||||
|
time: 2025-11-21T14:05:15.838252-05:00
|
||||||
|
custom:
|
||||||
|
Author: emmyoop
|
||||||
|
Issue: "12151"
|
||||||
6
.changes/unreleased/Under the Hood-20251209-131857.yaml
Normal file
6
.changes/unreleased/Under the Hood-20251209-131857.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
kind: Under the Hood
|
||||||
|
body: Add add_catalog_integration call even if we have a pre-existing manifest
|
||||||
|
time: 2025-12-09T13:18:57.043254-08:00
|
||||||
|
custom:
|
||||||
|
Author: colin-rogers-dbt
|
||||||
|
Issue: "12262"
|
||||||
@@ -41,32 +41,26 @@ newlines:
|
|||||||
endOfVersion: 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 (separated by a single space if multiple)
|
label: GitHub Issue Number (separated by a single space if multiple)
|
||||||
type: string
|
type: string
|
||||||
minLength: 1
|
minLength: 1
|
||||||
|
|
||||||
footerFormat: |
|
footerFormat: |
|
||||||
{{- $contributorDict := dict }}
|
{{- $contributorDict := dict }}
|
||||||
{{- /* ensure all names in this list are all lowercase for later matching purposes */}}
|
{{- /* ensure we always skip snyk and dependabot */}}
|
||||||
{{- $core_team := splitList " " .Env.CORE_TEAM }}
|
{{- $bots := list "dependabot[bot]" "snyk-bot"}}
|
||||||
{{- /* ensure we always skip snyk and dependabot in addition to the core team */}}
|
|
||||||
{{- $maintainers := list "dependabot[bot]" "snyk-bot"}}
|
|
||||||
{{- range $team_member := $core_team }}
|
|
||||||
{{- $team_member_lower := lower $team_member }}
|
|
||||||
{{- $maintainers = append $maintainers $team_member_lower }}
|
|
||||||
{{- end }}
|
|
||||||
{{- range $change := .Changes }}
|
{{- range $change := .Changes }}
|
||||||
{{- $authorList := splitList " " $change.Custom.Author }}
|
{{- $authorList := splitList " " $change.Custom.Author }}
|
||||||
{{- /* loop through all authors for a single changelog */}}
|
{{- /* 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-bot contributors */}}
|
||||||
{{- if not (has $authorLower $maintainers)}}
|
{{- if not (has $authorLower $bots)}}
|
||||||
{{- $changeList := splitList " " $change.Custom.Author }}
|
{{- $changeList := splitList " " $change.Custom.Author }}
|
||||||
{{- $IssueList := list }}
|
{{- $IssueList := list }}
|
||||||
{{- $changeLink := $change.Kind }}
|
{{- $changeLink := $change.Kind }}
|
||||||
|
|||||||
1
.flake8
1
.flake8
@@ -10,6 +10,5 @@ ignore =
|
|||||||
E704 # makes Flake8 work like black
|
E704 # 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/
|
|
||||||
per-file-ignores =
|
per-file-ignores =
|
||||||
*/__init__.py: F401
|
*/__init__.py: F401
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -62,7 +62,7 @@ body:
|
|||||||
description: |
|
description: |
|
||||||
examples:
|
examples:
|
||||||
- **OS**: Ubuntu 24.04
|
- **OS**: Ubuntu 24.04
|
||||||
- **Python**: 3.9.12 (`python3 --version`)
|
- **Python**: 3.10.12 (`python3 --version`)
|
||||||
- **dbt-core**: 1.1.1 (`dbt --version`)
|
- **dbt-core**: 1.1.1 (`dbt --version`)
|
||||||
value: |
|
value: |
|
||||||
- OS:
|
- OS:
|
||||||
|
|||||||
15
.github/ISSUE_TEMPLATE/config.yml
vendored
15
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -12,15 +12,6 @@ contact_links:
|
|||||||
- name: Participate in Discussions
|
- name: Participate in Discussions
|
||||||
url: https://github.com/dbt-labs/dbt-core/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
|
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 adapters
|
||||||
url: https://github.com/dbt-labs/dbt-redshift/issues/new/choose
|
url: https://github.com/dbt-labs/dbt-adapters/issues/new/choose
|
||||||
about: Report a bug or request a feature for dbt-redshift
|
about: Report a bug or request a feature for an adapter
|
||||||
- name: Create an issue for dbt-bigquery
|
|
||||||
url: https://github.com/dbt-labs/dbt-bigquery/issues/new/choose
|
|
||||||
about: Report a bug or request a feature for dbt-bigquery
|
|
||||||
- name: Create an issue for dbt-snowflake
|
|
||||||
url: https://github.com/dbt-labs/dbt-snowflake/issues/new/choose
|
|
||||||
about: Report a bug or request a feature for dbt-snowflake
|
|
||||||
- name: Create an issue for dbt-spark
|
|
||||||
url: https://github.com/dbt-labs/dbt-spark/issues/new/choose
|
|
||||||
about: Report a bug or request a feature for dbt-spark
|
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/regression-report.yml
vendored
2
.github/ISSUE_TEMPLATE/regression-report.yml
vendored
@@ -56,7 +56,7 @@ body:
|
|||||||
description: |
|
description: |
|
||||||
examples:
|
examples:
|
||||||
- **OS**: Ubuntu 24.04
|
- **OS**: Ubuntu 24.04
|
||||||
- **Python**: 3.9.12 (`python3 --version`)
|
- **Python**: 3.10.12 (`python3 --version`)
|
||||||
- **dbt-core (working version)**: 1.1.1 (`dbt --version`)
|
- **dbt-core (working version)**: 1.1.1 (`dbt --version`)
|
||||||
- **dbt-core (regression version)**: 1.2.0 (`dbt --version`)
|
- **dbt-core (regression version)**: 1.2.0 (`dbt --version`)
|
||||||
value: |
|
value: |
|
||||||
|
|||||||
8
.github/_README.md
vendored
8
.github/_README.md
vendored
@@ -120,7 +120,7 @@ Some triggers of note that we use:
|
|||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
dependency_changelog:
|
dependency_changelog:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get File Name Timestamp
|
- name: Get File Name Timestamp
|
||||||
@@ -188,6 +188,12 @@ ___
|
|||||||
- The [GitHub CLI](https://cli.github.com/) is available in the default runners
|
- 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 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.
|
||||||
|
|
||||||
|
### Runners
|
||||||
|
- We dynamically set runners based on repository vars. Admins can view repository vars and reset them. Current values are the following but are subject to change:
|
||||||
|
- `vars.UBUNTU_LATEST` -> `ubuntu-latest`
|
||||||
|
- `vars.WINDOWS_LATEST` -> `windows-latest`
|
||||||
|
- `vars.MACOS_LATEST` -> `macos-14`
|
||||||
|
|
||||||
### Actions from the Marketplace
|
### Actions from the Marketplace
|
||||||
- Don’t use external actions for things that can easily be accomplished manually.
|
- 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
|
- 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
|
||||||
|
|||||||
2
.github/actions/latest-wrangler/README.md
vendored
2
.github/actions/latest-wrangler/README.md
vendored
@@ -33,7 +33,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Wrangle latest tag
|
- name: Wrangle latest tag
|
||||||
|
|||||||
@@ -3,24 +3,24 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
package:
|
package:
|
||||||
description: The package to publish
|
description: The package to publish
|
||||||
required: true
|
required: true
|
||||||
version_number:
|
version_number:
|
||||||
description: The version number
|
description: The version number
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Wrangle latest tag
|
- name: Wrangle latest tag
|
||||||
id: is_latest
|
id: is_latest
|
||||||
uses: ./.github/actions/latest-wrangler
|
uses: ./.github/actions/latest-wrangler
|
||||||
with:
|
with:
|
||||||
package: ${{ github.event.inputs.package }}
|
package: ${{ github.event.inputs.package }}
|
||||||
new_version: ${{ github.event.inputs.new_version }}
|
new_version: ${{ github.event.inputs.new_version }}
|
||||||
gh_token: ${{ secrets.GITHUB_TOKEN }}
|
gh_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Print the results
|
- name: Print the results
|
||||||
run: |
|
run: |
|
||||||
echo "Is it latest? Survey says: ${{ steps.is_latest.outputs.latest }} !"
|
echo "Is it latest? Survey says: ${{ steps.is_latest.outputs.latest }} !"
|
||||||
|
|||||||
5
.github/actions/latest-wrangler/main.py
vendored
5
.github/actions/latest-wrangler/main.py
vendored
@@ -1,9 +1,10 @@
|
|||||||
import os
|
import os
|
||||||
from packaging.version import Version, parse
|
|
||||||
import requests
|
|
||||||
import sys
|
import sys
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
import requests
|
||||||
|
from packaging.version import Version, parse
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
package_name: str = os.environ["INPUT_PACKAGE_NAME"]
|
package_name: str = os.environ["INPUT_PACKAGE_NAME"]
|
||||||
|
|||||||
26
.github/actions/setup-postgres-macos/action.yml
vendored
26
.github/actions/setup-postgres-macos/action.yml
vendored
@@ -1,26 +0,0 @@
|
|||||||
name: "Set up postgres (macos)"
|
|
||||||
description: "Set up postgres service on macos vm for dbt integration tests"
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- shell: bash
|
|
||||||
run: |
|
|
||||||
brew install postgresql@16
|
|
||||||
brew link postgresql@16 --force
|
|
||||||
brew services start postgresql@16
|
|
||||||
echo "Check PostgreSQL service is running"
|
|
||||||
i=10
|
|
||||||
COMMAND='pg_isready'
|
|
||||||
while [ $i -gt -1 ]; do
|
|
||||||
if [ $i == 0 ]; then
|
|
||||||
echo "PostgreSQL service not ready, all attempts exhausted"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Check PostgreSQL service status"
|
|
||||||
eval $COMMAND && break
|
|
||||||
echo "PostgreSQL service not ready, wait 10 more sec, attempts left: $i"
|
|
||||||
sleep 10
|
|
||||||
((i--))
|
|
||||||
done
|
|
||||||
createuser -s postgres
|
|
||||||
bash ${{ github.action_path }}/setup_db.sh
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../../test/setup_db.sh
|
|
||||||
@@ -1 +1 @@
|
|||||||
../../../test/setup_db.sh
|
../../../scripts/setup_db.sh
|
||||||
169
.github/dbt-postgres-testing.yml
vendored
Normal file
169
.github/dbt-postgres-testing.yml
vendored
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
# **what?**
|
||||||
|
# Runs all tests in dbt-postgres with this branch of dbt-core to ensure nothing is broken
|
||||||
|
|
||||||
|
# **why?**
|
||||||
|
# Ensure dbt-core changes do not break dbt-postgres, as a basic proxy for other adapters
|
||||||
|
|
||||||
|
# **when?**
|
||||||
|
# This will run when trying to merge a PR into main.
|
||||||
|
# It can also be manually triggered.
|
||||||
|
|
||||||
|
# This workflow can be skipped by adding the "Skip Postgres Testing" label to the PR. This is
|
||||||
|
# useful when making a change in both `dbt-postgres` and `dbt-core` where the changes are dependant
|
||||||
|
# and cause the other repository to break.
|
||||||
|
|
||||||
|
name: "dbt-postgres Tests"
|
||||||
|
run-name: >-
|
||||||
|
${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call')
|
||||||
|
&& format('dbt-postgres@{0} with dbt-core@{1}', inputs.dbt-postgres-ref, inputs.dbt-core-ref)
|
||||||
|
|| 'dbt-postgres@main with dbt-core branch' }}
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "main"
|
||||||
|
- "*.latest"
|
||||||
|
- "releases/*"
|
||||||
|
pull_request:
|
||||||
|
merge_group:
|
||||||
|
types: [checks_requested]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
dbt-postgres-ref:
|
||||||
|
description: "The branch of dbt-postgres to test against"
|
||||||
|
default: "main"
|
||||||
|
dbt-core-ref:
|
||||||
|
description: "The branch of dbt-core to test against"
|
||||||
|
default: "main"
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
dbt-postgres-ref:
|
||||||
|
description: "The branch of dbt-postgres to test against"
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
default: "main"
|
||||||
|
dbt-core-ref:
|
||||||
|
description: "The branch of dbt-core to test against"
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
default: "main"
|
||||||
|
|
||||||
|
permissions: read-all
|
||||||
|
|
||||||
|
# will cancel previous workflows triggered by the same event
|
||||||
|
# and for the same ref for PRs/merges or same SHA otherwise
|
||||||
|
# and for the same inputs on workflow_dispatch or workflow_call
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(fromJson('["pull_request", "merge_group"]'), github.event_name) && github.event.pull_request.head.ref || github.sha }}-${{ contains(fromJson('["workflow_call", "workflow_dispatch"]'), github.event_name) && github.event.inputs.dbt-postgres-ref && github.event.inputs.dbt-core-ref || github.sha }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
job-prep:
|
||||||
|
# This allow us to run the workflow on pull_requests as well so we can always run unit tests
|
||||||
|
# and only run integration tests on merge for time purposes
|
||||||
|
name: Setup Repo Refs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
dbt-postgres-ref: ${{ steps.core-ref.outputs.ref }}
|
||||||
|
dbt-core-ref: ${{ steps.common-ref.outputs.ref }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Input Refs"
|
||||||
|
id: job-inputs
|
||||||
|
run: |
|
||||||
|
echo "inputs.dbt-postgres-ref=${{ inputs.dbt-postgres-ref }}"
|
||||||
|
echo "inputs.dbt-core-ref=${{ inputs.dbt-core-ref }}"
|
||||||
|
|
||||||
|
- name: "Determine dbt-postgres ref"
|
||||||
|
id: core-ref
|
||||||
|
run: |
|
||||||
|
if [[ -z "${{ inputs.dbt-postgres-ref }}" ]]; then
|
||||||
|
REF="main"
|
||||||
|
else
|
||||||
|
REF=${{ inputs.dbt-postgres-ref }}
|
||||||
|
fi
|
||||||
|
echo "ref=$REF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: "Determine dbt-core ref"
|
||||||
|
id: common-ref
|
||||||
|
run: |
|
||||||
|
if [[ -z "${{ inputs.dbt-core-ref }}" ]]; then
|
||||||
|
# these will be commits instead of branches
|
||||||
|
if [[ "${{ github.event_name }}" == "merge_group" ]]; then
|
||||||
|
REF=${{ github.event.merge_group.head_sha }}
|
||||||
|
else
|
||||||
|
REF=${{ github.event.pull_request.base.sha }}
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
REF=${{ inputs.dbt-core-ref }}
|
||||||
|
fi
|
||||||
|
echo "ref=$REF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: "Final Refs"
|
||||||
|
run: |
|
||||||
|
echo "dbt-postgres-ref=${{ steps.core-ref.outputs.ref }}"
|
||||||
|
echo "dbt-core-ref=${{ steps.common-ref.outputs.ref }}"
|
||||||
|
|
||||||
|
integration-tests-postgres:
|
||||||
|
name: "dbt-postgres integration tests"
|
||||||
|
needs: [job-prep]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: "./dbt-postgres"
|
||||||
|
environment:
|
||||||
|
name: "dbt-postgres"
|
||||||
|
env:
|
||||||
|
POSTGRES_TEST_HOST: ${{ vars.POSTGRES_TEST_HOST }}
|
||||||
|
POSTGRES_TEST_PORT: ${{ vars.POSTGRES_TEST_PORT }}
|
||||||
|
POSTGRES_TEST_USER: ${{ vars.POSTGRES_TEST_USER }}
|
||||||
|
POSTGRES_TEST_PASS: ${{ secrets.POSTGRES_TEST_PASS }}
|
||||||
|
POSTGRES_TEST_DATABASE: ${{ vars.POSTGRES_TEST_DATABASE }}
|
||||||
|
POSTGRES_TEST_THREADS: ${{ vars.POSTGRES_TEST_THREADS }}
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
- ${{ vars.POSTGRES_TEST_PORT }}:5432
|
||||||
|
steps:
|
||||||
|
- name: "Check out dbt-adapters@${{ needs.job-prep.outputs.dbt-postgres-ref }}"
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: dbt-labs/dbt-adapters
|
||||||
|
ref: ${{ needs.job-prep.outputs.dbt-postgres-ref }}
|
||||||
|
|
||||||
|
- name: "Set up Python"
|
||||||
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: ${{ inputs.python-version }}
|
||||||
|
|
||||||
|
- name: "Set environment variables"
|
||||||
|
run: |
|
||||||
|
echo "HATCH_PYTHON=${{ inputs.python-version }}" >> $GITHUB_ENV
|
||||||
|
echo "PIP_ONLY_BINARY=psycopg2-binary" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: "Setup test database"
|
||||||
|
run: psql -f ./scripts/setup_test_database.sql
|
||||||
|
env:
|
||||||
|
PGHOST: ${{ vars.POSTGRES_TEST_HOST }}
|
||||||
|
PGPORT: ${{ vars.POSTGRES_TEST_PORT }}
|
||||||
|
PGUSER: postgres
|
||||||
|
PGPASSWORD: postgres
|
||||||
|
PGDATABASE: postgres
|
||||||
|
|
||||||
|
- name: "Install hatch"
|
||||||
|
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc # pypa/hatch@install
|
||||||
|
|
||||||
|
- name: "Run integration tests"
|
||||||
|
run: hatch run ${{ inputs.hatch-env }}:integration-tests
|
||||||
175
.github/workflows/artifact-reviews.yml
vendored
175
.github/workflows/artifact-reviews.yml
vendored
@@ -6,92 +6,70 @@
|
|||||||
# multiple reviews on a single PR based on files changed, so we need to enforce this manually.
|
# multiple reviews on a single PR based on files changed, so we need to enforce this manually.
|
||||||
|
|
||||||
# **when?**
|
# **when?**
|
||||||
# This will run when PRs are opened, synchronized, reopened, edited, or when reviews
|
# This will run when reviews are submitted and dismissed.
|
||||||
# are submitted and dismissed.
|
|
||||||
|
|
||||||
name: "Enforce Additional Reviews on Artifact and Validations Changes"
|
name: "Enforce Additional Reviews on Artifact and Validations Changes"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
checks: write
|
||||||
|
pull-requests: write
|
||||||
|
contents: read
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
# trigger check on review events. use pull_request_target for forks.
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, synchronize, reopened, edited]
|
types: [opened, reopened, ready_for_review, synchronize, review_requested]
|
||||||
# retrigger check on review events
|
|
||||||
pull_request_review:
|
pull_request_review:
|
||||||
types: [submitted, edited, dismissed]
|
types: [submitted, edited, dismissed]
|
||||||
|
|
||||||
# only run this once per PR at a time
|
# only run this once per PR at a time
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||||
cancel-in-progress: false # wait for in-progress runs to complete to prevent race condition
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
required_approvals: 2
|
required_approvals: 2
|
||||||
team: "core-group"
|
team: "core-group"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cleanup-old-runs:
|
|
||||||
# this job is only run once per PR at a time. Since it uses two types of triggers,
|
|
||||||
# when the pull_request trigger fails, that run stays around when the pull_request_review
|
|
||||||
# triggers a new run. This job will clean up those old runs so we only end up with a single run.
|
|
||||||
name: "Cleanup Previous Runs"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "Dismiss previous workflow runs"
|
|
||||||
run: |
|
|
||||||
# Get all check runs for this PR's SHA
|
|
||||||
cleanup_checks=$(gh api repos/${{ github.repository }}/commits/${{ github.event.pull_request.head.sha }}/check-runs \
|
|
||||||
--jq '.check_runs[] | select(.name == "Cleanup Previous Runs")')
|
|
||||||
review_checks=$(gh api repos/${{ github.repository }}/commits/${{ github.event.pull_request.head.sha }}/check-runs \
|
|
||||||
--jq '.check_runs[] | select(.name == "Validate Additional Reviews")')
|
|
||||||
|
|
||||||
# For each check run from this workflow (except current), dismiss it
|
|
||||||
{ echo "$cleanup_checks"; echo "$review_checks"; } | jq -r '. | select(.id != ${{ github.run_id }}) | .id' | \
|
|
||||||
while read -r check_id; do
|
|
||||||
echo "Dismissing check $check_id"
|
|
||||||
gh api repos/${{ github.repository }}/check-runs/$check_id \
|
|
||||||
-X PATCH \
|
|
||||||
-F status="completed" \
|
|
||||||
-F conclusion="neutral" \
|
|
||||||
-F "output[title]=Superseded" \
|
|
||||||
-F "output[summary]=This check was superseded by a newer run"
|
|
||||||
done
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
check-reviews:
|
check-reviews:
|
||||||
name: "Validate Additional Reviews"
|
name: "Validate Additional Reviews"
|
||||||
needs: [cleanup-old-runs]
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout code"
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: "Get list of changed files"
|
- name: "Get list of changed files"
|
||||||
id: changed_files
|
id: changed_files
|
||||||
run: |
|
run: |
|
||||||
CHANGED_FILES=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files | jq -r '.[].filename')
|
# Fetch files as JSON and process with jq to sanitize output
|
||||||
echo "Changed files:"
|
gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files \
|
||||||
echo "$CHANGED_FILES"
|
| jq -r '.[].filename' \
|
||||||
|
| while IFS= read -r file; do
|
||||||
|
# Sanitize the filename by removing any special characters and command injection attempts
|
||||||
|
clean_file=$(echo "$file" | sed 's/[^a-zA-Z0-9\.\/\-_]//g')
|
||||||
|
echo "$clean_file"
|
||||||
|
done > changed_files.txt
|
||||||
echo "CHANGED_FILES<<EOF" >> $GITHUB_OUTPUT
|
echo "CHANGED_FILES<<EOF" >> $GITHUB_OUTPUT
|
||||||
echo "$CHANGED_FILES" >> $GITHUB_OUTPUT
|
cat changed_files.txt >> $GITHUB_OUTPUT
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: "Check if any artifact files were changed"
|
- name: "Check if any artifact files changed"
|
||||||
id: artifact_files_changed
|
id: artifact_files_changed
|
||||||
run: |
|
run: |
|
||||||
artifact_changes=false
|
artifact_changes=false
|
||||||
while IFS= read -r file; do
|
while IFS= read -r file; do
|
||||||
echo "Debug: Checking file: '$file'"
|
# Only process if file path looks legitimate
|
||||||
if [[ "$file" == "core/dbt/artifacts/"* ]] ; then
|
if [[ "$file" =~ ^[a-zA-Z0-9\.\/\-_]+$ ]]; then
|
||||||
artifact_changes=true
|
if [[ "$file" == "core/dbt/artifacts/"* ]] ; then
|
||||||
break
|
artifact_changes=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done <<< "${{ steps.changed_files.outputs.CHANGED_FILES }}"
|
done < changed_files.txt
|
||||||
echo "artifact_changes=$artifact_changes" >> $GITHUB_OUTPUT
|
echo "artifact_changes=$artifact_changes" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: "Get Core Team Members"
|
- name: "Get Core Team Members"
|
||||||
if: ${{ steps.artifact_files_changed.outputs.artifact_changes == 'true' }}
|
if: steps.artifact_files_changed.outputs.artifact_changes == 'true'
|
||||||
id: core_members
|
id: core_members
|
||||||
run: |
|
run: |
|
||||||
gh api -H "Accept: application/vnd.github+json" \
|
gh api -H "Accept: application/vnd.github+json" \
|
||||||
@@ -105,49 +83,104 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.IT_TEAM_MEMBERSHIP }}
|
GH_TOKEN: ${{ secrets.IT_TEAM_MEMBERSHIP }}
|
||||||
|
|
||||||
- name: "Verify ${{ env.required_approvals }} core team approvals"
|
- name: "Verify ${{ env.required_approvals }} core team approvals"
|
||||||
|
if: steps.artifact_files_changed.outputs.artifact_changes == 'true'
|
||||||
id: check_approvals
|
id: check_approvals
|
||||||
if: ${{ steps.artifact_files_changed.outputs.artifact_changes == 'true' }}
|
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
# Get all reviews
|
# Get all reviews
|
||||||
REVIEWS=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews)
|
REVIEWS=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews)
|
||||||
|
echo "All reviews:"
|
||||||
|
echo "$REVIEWS"
|
||||||
# Count approved reviews from core team members (only most recent review per user)
|
# Count approved reviews from core team members (only most recent review per user)
|
||||||
CORE_APPROVALS=0
|
CORE_APPROVALS=0
|
||||||
while IFS= read -r member; do
|
while IFS= read -r member; do
|
||||||
echo "member: $member"
|
echo "Checking member: $member"
|
||||||
APPROVED=$(echo "$REVIEWS" | jq --arg user "$member" '
|
APPROVED=$(echo "$REVIEWS" | jq --arg user "$member" '
|
||||||
group_by(.user.login) |
|
group_by(.user.login) |
|
||||||
map(select(.[0].user.login == $user) |
|
map(select(.[0].user.login == $user) |
|
||||||
sort_by(.submitted_at) |
|
sort_by(.submitted_at) |
|
||||||
last) |
|
last) |
|
||||||
map(select(.state == "APPROVED")) |
|
map(select(.state == "APPROVED" and (.state != "DISMISSED"))) |
|
||||||
length')
|
length')
|
||||||
|
echo "Latest review state for $member: $APPROVED"
|
||||||
CORE_APPROVALS=$((CORE_APPROVALS + APPROVED))
|
CORE_APPROVALS=$((CORE_APPROVALS + APPROVED))
|
||||||
|
echo "Running total: $CORE_APPROVALS"
|
||||||
done <<< "${{ steps.core_members.outputs.membership }}"
|
done <<< "${{ steps.core_members.outputs.membership }}"
|
||||||
|
|
||||||
echo "CORE_APPROVALS=$CORE_APPROVALS" >> $GITHUB_OUTPUT
|
echo "CORE_APPROVALS=$CORE_APPROVALS" >> $GITHUB_OUTPUT
|
||||||
echo $CORE_APPROVALS
|
echo "CORE_APPROVALS=$CORE_APPROVALS"
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: "Notify and fail if not enough approvals"
|
- name: "Find Comment"
|
||||||
if: ${{ steps.artifact_files_changed.outputs.artifact_changes == 'true' && steps.check_approvals.outputs.CORE_APPROVALS < fromJSON(env.required_approvals) }}
|
if: steps.artifact_files_changed.outputs.artifact_changes == 'true' && steps.check_approvals.outputs.CORE_APPROVALS < env.required_approvals
|
||||||
run: |
|
uses: peter-evans/find-comment@a54c31d7fa095754bfef525c0c8e5e5674c4b4b1 # peter-evans/find-comment@v2
|
||||||
title="PR Approval Requirements Not Met"
|
id: find-comment
|
||||||
message="Changes to artifact directory files requires at least ${{ env.required_approvals }} approvals from core team members. Current number of core team approvals: ${{ steps.check_approvals.outputs.CORE_APPROVALS }} "
|
with:
|
||||||
echo "::error title=$title::$message"
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
exit 1
|
comment-author: 'github-actions[bot]'
|
||||||
|
body-includes: "### Additional Artifact Review Required"
|
||||||
|
|
||||||
- name: "Notify of sufficient approvals"
|
- name: "Create Comment"
|
||||||
if: ${{ steps.artifact_files_changed.outputs.artifact_changes == 'true' && steps.check_approvals.outputs.CORE_APPROVALS >= fromJSON(env.required_approvals) }}
|
if: steps.artifact_files_changed.outputs.artifact_changes == 'true' && steps.find-comment.outputs.comment-id == '' && steps.check_approvals.outputs.CORE_APPROVALS < env.required_approvals
|
||||||
run: |
|
uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # peter-evans/create-or-update-comment@v3
|
||||||
title="Extra requirements met"
|
with:
|
||||||
message="Changes to artifact directory files requires at least ${{ env.required_approvals }} approvals from core team members. Current number of core team approvals: ${{ steps.check_approvals.outputs.CORE_APPROVALS }} "
|
issue-number: ${{ github.event.pull_request.number }}
|
||||||
echo "::notice title=$title::$message"
|
body: |
|
||||||
|
### Additional Artifact Review Required
|
||||||
|
|
||||||
- name: "Notify of no extra requirements"
|
Changes to artifact directory files requires at least ${{ env.required_approvals }} approvals from core team members.
|
||||||
if: ${{ steps.artifact_files_changed.outputs.artifact_changes != 'true' }}
|
|
||||||
|
- name: "Notify if not enough approvals"
|
||||||
|
if: steps.artifact_files_changed.outputs.artifact_changes == 'true'
|
||||||
run: |
|
run: |
|
||||||
title="No extra requirements"
|
if [[ "${{ steps.check_approvals.outputs.CORE_APPROVALS }}" -ge "${{ env.required_approvals }}" ]]; then
|
||||||
message="No additional reviews required"
|
title="Extra requirements met"
|
||||||
echo "::notice title=$title::$message"
|
message="Changes to artifact directory files requires at least ${{ env.required_approvals }} approvals from core team members. Current number of core team approvals: ${{ steps.check_approvals.outputs.CORE_APPROVALS }} "
|
||||||
|
echo "::notice title=$title::$message"
|
||||||
|
echo "REVIEW_STATUS=success" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
title="PR Approval Requirements Not Met"
|
||||||
|
message="Changes to artifact directory files requires at least ${{ env.required_approvals }} approvals from core team members. Current number of core team approvals: ${{ steps.check_approvals.outputs.CORE_APPROVALS }} "
|
||||||
|
echo "::notice title=$title::$message"
|
||||||
|
echo "REVIEW_STATUS=neutral" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
id: review_check
|
||||||
|
|
||||||
|
- name: "Set check status"
|
||||||
|
id: status_check
|
||||||
|
run: |
|
||||||
|
if [[ "${{ steps.artifact_files_changed.outputs.artifact_changes }}" == 'false' ]]; then
|
||||||
|
# no extra review required
|
||||||
|
echo "current_status=success" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "${{ steps.review_check.outputs.REVIEW_STATUS }}" == "success" ]]; then
|
||||||
|
# we have all the required reviews
|
||||||
|
echo "current_status=success" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
# neutral exit - neither success nor failure
|
||||||
|
# we can't fail here because we use multiple triggers for this workflow and they won't reset the check
|
||||||
|
# workaround is to use a neutral exit to skip the check run until it's actually successful
|
||||||
|
echo "current_status=neutral" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: "Post Event"
|
||||||
|
# This step posts the status of the check because the workflow is triggered by multiple events
|
||||||
|
# and we need to ensure the check is always updated. Otherwise we would end up with duplicate
|
||||||
|
# checks in the GitHub UI.
|
||||||
|
run: |
|
||||||
|
if [[ "${{ steps.status_check.outputs.current_status }}" == "success" ]]; then
|
||||||
|
state="success"
|
||||||
|
else
|
||||||
|
state="failure"
|
||||||
|
fi
|
||||||
|
|
||||||
|
gh api \
|
||||||
|
--method POST \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.base.sha }} \
|
||||||
|
-f state="$state" \
|
||||||
|
-f description="Artifact Review Check" \
|
||||||
|
-f context="Artifact Review Check" \
|
||||||
|
-f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.FISHTOWN_BOT_PAT }}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-response:
|
auto-response:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check if current date is within holiday period
|
- name: Check if current date is within holiday period
|
||||||
id: date-check
|
id: date-check
|
||||||
|
|||||||
4
.github/workflows/backport.yml
vendored
4
.github/workflows/backport.yml
vendored
@@ -28,13 +28,13 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
backport:
|
backport:
|
||||||
name: Backport
|
name: Backport
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
# Only react to merged PRs for security reasons.
|
# Only react to merged PRs for security reasons.
|
||||||
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
|
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
|
||||||
if: >
|
if: >
|
||||||
github.event.pull_request.merged
|
github.event.pull_request.merged
|
||||||
&& contains(github.event.label.name, 'backport')
|
&& contains(github.event.label.name, 'backport')
|
||||||
steps:
|
steps:
|
||||||
- uses: tibdex/backport@v2.0.4
|
- uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # tibdex/backport@v2.0.4
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
4
.github/workflows/bot-changelog.yml
vendored
4
.github/workflows/bot-changelog.yml
vendored
@@ -41,14 +41,14 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- label: "dependencies"
|
- label: "dependencies"
|
||||||
changie_kind: "Dependencies"
|
changie_kind: "Dependencies"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Create and commit changelog on bot PR
|
- name: Create and commit changelog on bot PR
|
||||||
if: ${{ contains(github.event.pull_request.labels.*.name, matrix.label) }}
|
if: ${{ contains(github.event.pull_request.labels.*.name, matrix.label) }}
|
||||||
id: bot_changelog
|
id: bot_changelog
|
||||||
uses: emmyoop/changie_bot@v1.1.0
|
uses: emmyoop/changie_bot@22b70618b13d0d1c64ea95212bafca2d2bf6b764 # emmyoop/changie_bot@v1.1.0
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.FISHTOWN_BOT_PAT }}
|
GITHUB_TOKEN: ${{ secrets.FISHTOWN_BOT_PAT }}
|
||||||
commit_author_name: "Github Build Bot"
|
commit_author_name: "Github Build Bot"
|
||||||
|
|||||||
12
.github/workflows/check-artifact-changes.yml
vendored
12
.github/workflows/check-artifact-changes.yml
vendored
@@ -4,22 +4,26 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
types: [ opened, reopened, labeled, unlabeled, synchronize ]
|
types: [ opened, reopened, labeled, unlabeled, synchronize ]
|
||||||
paths-ignore: [ '.changes/**', '.github/**', 'tests/**', '**.md', '**.yml' ]
|
paths-ignore: [ '.changes/**', '.github/**', 'tests/**', '**.md', '**.yml' ]
|
||||||
|
merge_group:
|
||||||
|
types: [checks_requested]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-artifact-changes:
|
check-artifact-changes:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'artifact_minor_upgrade') }}
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'artifact_minor_upgrade') }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Check for changes in core/dbt/artifacts
|
- name: Check for changes in core/dbt/artifacts
|
||||||
# https://github.com/marketplace/actions/paths-changes-filter
|
# https://github.com/marketplace/actions/paths-changes-filter
|
||||||
uses: dorny/paths-filter@v3
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # dorny/paths-filter@v3
|
||||||
id: check_artifact_changes
|
id: check_artifact_changes
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: |
|
||||||
|
|||||||
13
.github/workflows/community-label.yml
vendored
13
.github/workflows/community-label.yml
vendored
@@ -7,7 +7,6 @@
|
|||||||
# **when?**
|
# **when?**
|
||||||
# When a PR is opened, not in draft or moved from draft to ready for review
|
# When a PR is opened, not in draft or moved from draft to ready for review
|
||||||
|
|
||||||
|
|
||||||
name: Label community PRs
|
name: Label community PRs
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -29,9 +28,15 @@ jobs:
|
|||||||
# If this PR is opened and not draft, determine if it needs to be labeled
|
# If this PR is opened and not draft, determine if it needs to be labeled
|
||||||
# if the PR is converted out of draft, determine if it needs to be labeled
|
# if the PR is converted out of draft, determine if it needs to be labeled
|
||||||
if: |
|
if: |
|
||||||
(!contains(github.event.pull_request.labels.*.name, 'community') &&
|
(
|
||||||
(github.event.action == 'opened' && github.event.pull_request.draft == false ) ||
|
!contains(github.event.pull_request.labels.*.name, 'community')
|
||||||
github.event.action == 'ready_for_review' )
|
&& (
|
||||||
|
(github.event.action == 'opened' && github.event.pull_request.draft == false)
|
||||||
|
|| github.event.action == 'ready_for_review'
|
||||||
|
)
|
||||||
|
&& github.event.pull_request.user.type != 'Bot'
|
||||||
|
&& github.event.pull_request.user.login != 'dependabot[bot]'
|
||||||
|
)
|
||||||
uses: dbt-labs/actions/.github/workflows/label-community.yml@main
|
uses: dbt-labs/actions/.github/workflows/label-community.yml@main
|
||||||
with:
|
with:
|
||||||
github_team: 'core-group'
|
github_team: 'core-group'
|
||||||
|
|||||||
388
.github/workflows/cut-release-branch.yml
vendored
388
.github/workflows/cut-release-branch.yml
vendored
@@ -1,25 +1,44 @@
|
|||||||
# **what?**
|
# **what?**
|
||||||
# Cuts a new `*.latest` branch
|
# Cuts the `*.latest` branch, bumps dependencies on it, cleans up all files in `.changes/unreleased`
|
||||||
# Also cleans up all files in `.changes/unreleased` and `.changes/previous verion on
|
# and `.changes/previous verion on main and bumps main to the input version.
|
||||||
# `main` and bumps `main` to the input version.
|
|
||||||
|
|
||||||
# **why?**
|
# **why?**
|
||||||
# Generally reduces the workload of engineers and reduces error. Allow automation.
|
# Clean up the main branch after a release branch is cut and automate cutting the release branch.
|
||||||
|
# Generally reduces the workload of engineers and reducing error.
|
||||||
|
|
||||||
# **when?**
|
# **when?**
|
||||||
# This will run when called manually.
|
# This will run when called manually or when triggered in another workflow.
|
||||||
|
|
||||||
|
# Example Usage including required permissions: TODO: update once finalized
|
||||||
|
|
||||||
|
# permissions:
|
||||||
|
# contents: read
|
||||||
|
# pull-requests: write
|
||||||
|
#
|
||||||
|
# name: Cut Release Branch
|
||||||
|
# jobs:
|
||||||
|
# changelog:
|
||||||
|
# uses: dbt-labs/actions/.github/workflows/cut-release-branch.yml@main
|
||||||
|
# with:
|
||||||
|
# new_branch_name: 1.7.latest
|
||||||
|
# PR_title: "Cleanup main after cutting new 1.7.latest branch"
|
||||||
|
# PR_body: "All adapter PRs will fail CI until the dbt-core PR has been merged due to release version conflicts."
|
||||||
|
# secrets:
|
||||||
|
# FISHTOWN_BOT_PAT: ${{ secrets.FISHTOWN_BOT_PAT }}
|
||||||
|
|
||||||
|
# TODOs
|
||||||
|
# add note to eventually commit changes directly and bypass checks - same as release - when we move to this model run test action after merge
|
||||||
|
|
||||||
name: Cut new release branch
|
name: Cut new release branch
|
||||||
|
run-name: "Cutting New Branch: ${{ inputs.new_branch_name }}"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version_to_bump_main:
|
|
||||||
description: 'The alpha version main should bump to (ex. 1.6.0a1)'
|
|
||||||
required: true
|
|
||||||
new_branch_name:
|
new_branch_name:
|
||||||
description: 'The full name of the new branch (ex. 1.5.latest)'
|
description: "The full name of the new branch (ex. 1.5.latest)"
|
||||||
required: true
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -27,15 +46,346 @@ defaults:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
PYTHON_TARGET_VERSION: "3.10"
|
||||||
|
PR_TITLE: "Cleanup main after cutting new ${{ inputs.new_branch_name }} branch"
|
||||||
|
PR_BODY: "All adapter PRs will fail CI until the dbt-core PR has been merged due to release version conflicts."
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cut_branch:
|
prep_work:
|
||||||
name: "Cut branch and clean up main for dbt-core"
|
name: "Prep Work"
|
||||||
uses: dbt-labs/actions/.github/workflows/cut-release-branch.yml@main
|
runs-on: ubuntu-latest
|
||||||
with:
|
steps:
|
||||||
version_to_bump_main: ${{ inputs.version_to_bump_main }}
|
- name: "[DEBUG] Print Inputs"
|
||||||
new_branch_name: ${{ inputs.new_branch_name }}
|
run: |
|
||||||
PR_title: "Cleanup main after cutting new ${{ inputs.new_branch_name }} branch"
|
echo "new_branch_name: ${{ inputs.new_branch_name }}"
|
||||||
PR_body: "All adapter PRs will fail CI until the dbt-core PR has been merged due to release version conflicts."
|
echo "PR_title: ${{ env.PR_TITLE }}"
|
||||||
secrets:
|
echo "PR_body: ${{ env.PR_BODY }}"
|
||||||
FISHTOWN_BOT_PAT: ${{ secrets.FISHTOWN_BOT_PAT }}
|
|
||||||
|
create_temp_branch:
|
||||||
|
name: "Create Temp branch off main"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
temp_branch_name: ${{ steps.variables.outputs.BRANCH_NAME }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Set Branch Value"
|
||||||
|
id: variables
|
||||||
|
run: |
|
||||||
|
echo "BRANCH_NAME=cutting_release_branch/main_cleanup_$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: "Checkout ${{ github.repository }}"
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: "main"
|
||||||
|
token: ${{ secrets.FISHTOWN_BOT_PAT }}
|
||||||
|
|
||||||
|
- name: "Create PR Branch"
|
||||||
|
run: |
|
||||||
|
user="Github Build Bot"
|
||||||
|
email="buildbot@fishtownanalytics.com"
|
||||||
|
git config user.name "$user"
|
||||||
|
git config user.email "$email"
|
||||||
|
git checkout -b ${{ steps.variables.outputs.BRANCH_NAME }}
|
||||||
|
git push --set-upstream origin ${{ steps.variables.outputs.BRANCH_NAME }}
|
||||||
|
|
||||||
|
- name: "[Notification] Temp branch created"
|
||||||
|
run: |
|
||||||
|
message="Temp branch ${{ steps.variables.outputs.BRANCH_NAME }} created"
|
||||||
|
echo "::notice title="Temporary branch created": $title::$message"
|
||||||
|
|
||||||
|
cleanup_changelog:
|
||||||
|
name: "Clean Up Changelog"
|
||||||
|
needs: ["create_temp_branch"]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
next-version: ${{ steps.semver-current.outputs.next-minor-alpha-version }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout ${{ github.repository }}"
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ needs.create_temp_branch.outputs.temp_branch_name }}
|
||||||
|
token: ${{ secrets.FISHTOWN_BOT_PAT }}
|
||||||
|
|
||||||
|
- name: "Add Homebrew To PATH"
|
||||||
|
run: |
|
||||||
|
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
- name: "Install Homebrew Packages"
|
||||||
|
run: |
|
||||||
|
brew install pre-commit
|
||||||
|
brew tap miniscruff/changie https://github.com/miniscruff/changie
|
||||||
|
brew install changie
|
||||||
|
|
||||||
|
- name: "Check Current Version In Code"
|
||||||
|
id: determine_version
|
||||||
|
run: |
|
||||||
|
current_version=$(grep '^version = ' core/pyproject.toml | sed 's/version = "\(.*\)"/\1/')
|
||||||
|
echo "current_version=$current_version" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: "[Notification] Check Current Version In Code"
|
||||||
|
run: |
|
||||||
|
message="The current version is ${{ steps.determine_version.outputs.current_version }}"
|
||||||
|
echo "::notice title="Version Bump Check": $title::$message"
|
||||||
|
|
||||||
|
- name: "Parse Current Version Into Parts for Changelog Directories"
|
||||||
|
id: semver-current
|
||||||
|
uses: dbt-labs/actions/parse-semver@main
|
||||||
|
with:
|
||||||
|
version: ${{ steps.determine_version.outputs.current_version }}
|
||||||
|
|
||||||
|
- name: "[Notification] Next Alpha Version"
|
||||||
|
run: |
|
||||||
|
message="The next alpha version is ${{ steps.semver-current.outputs.next-minor-alpha-version }}"
|
||||||
|
echo "::notice title="Version Bump Check": $title::$message"
|
||||||
|
|
||||||
|
- name: "Delete Unreleased Changelog YAMLs"
|
||||||
|
# removal fails if no files exist. OK to continue since we're just cleaning up the files.
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
rm .changes/unreleased/*.yaml || true
|
||||||
|
|
||||||
|
- name: "Delete Pre Release Changelogs and YAMLs"
|
||||||
|
# removal fails if no files exist. OK to continue since we're just cleaning up the files.
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
rm .changes/${{ steps.semver-current.outputs.base-version }}/*.yaml || true
|
||||||
|
rm .changes/${{ steps.semver-current.outputs.major }}.${{ steps.semver-current.outputs.minor }}.*.md || true
|
||||||
|
|
||||||
|
- name: "Cleanup CHANGELOG.md"
|
||||||
|
run: |
|
||||||
|
changie merge
|
||||||
|
|
||||||
|
- name: "Commit Changelog Cleanup to Branch"
|
||||||
|
run: |
|
||||||
|
user="Github Build Bot"
|
||||||
|
email="buildbot@fishtownanalytics.com"
|
||||||
|
git config user.name "$user"
|
||||||
|
git config user.email "$email"
|
||||||
|
git status
|
||||||
|
git add .
|
||||||
|
git commit -m "Clean up changelog on main"
|
||||||
|
git push
|
||||||
|
|
||||||
|
- name: "[Notification] Changelog cleaned up"
|
||||||
|
run: |
|
||||||
|
message="Changelog on ${{ needs.create_temp_branch.outputs.temp_branch_name }} cleaned up"
|
||||||
|
echo "::notice title="Changelog cleaned up": $title::$message"
|
||||||
|
|
||||||
|
bump_version:
|
||||||
|
name: "Bump to next minor version"
|
||||||
|
needs: ["cleanup_changelog", "create_temp_branch"]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout ${{ github.repository }}"
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ needs.create_temp_branch.outputs.temp_branch_name }}
|
||||||
|
token: ${{ secrets.FISHTOWN_BOT_PAT }}
|
||||||
|
|
||||||
|
- name: "Set up Python - ${{ env.PYTHON_TARGET_VERSION }}"
|
||||||
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "${{ env.PYTHON_TARGET_VERSION }}"
|
||||||
|
|
||||||
|
- name: "Install Spark Dependencies"
|
||||||
|
if: ${{ contains(github.repository, 'dbt-labs/dbt-spark') }}
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install libsasl2-dev
|
||||||
|
|
||||||
|
- name: "Install Python Dependencies"
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install hatch
|
||||||
|
|
||||||
|
- name: "Bump Version To ${{ needs.cleanup_changelog.outputs.next-version }}"
|
||||||
|
run: |
|
||||||
|
cd core
|
||||||
|
hatch version ${{ needs.cleanup_changelog.outputs.next-version }}
|
||||||
|
hatch run dev-req
|
||||||
|
dbt --version
|
||||||
|
|
||||||
|
- name: "Commit Version Bump to Branch"
|
||||||
|
run: |
|
||||||
|
user="Github Build Bot"
|
||||||
|
email="buildbot@fishtownanalytics.com"
|
||||||
|
git config user.name "$user"
|
||||||
|
git config user.email "$email"
|
||||||
|
git status
|
||||||
|
git add .
|
||||||
|
git commit -m "Bumping version to ${{ needs.cleanup_changelog.outputs.next-version }}"
|
||||||
|
git push
|
||||||
|
|
||||||
|
- name: "[Notification] Version Bump completed"
|
||||||
|
run: |
|
||||||
|
message="Version on ${{ needs.create_temp_branch.outputs.temp_branch_name }} bumped to ${{ needs.cleanup_changelog.outputs.next-version }}"
|
||||||
|
echo "::notice title="Version Bump Completed": $title::$message"
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
name: "Cleanup Code Quality"
|
||||||
|
needs: ["create_temp_branch", "bump_version"]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout ${{ github.repository }}"
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ needs.create_temp_branch.outputs.temp_branch_name }}
|
||||||
|
token: ${{ secrets.FISHTOWN_BOT_PAT }}
|
||||||
|
|
||||||
|
- name: "Add Homebrew To PATH"
|
||||||
|
run: |
|
||||||
|
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
- name: "brew install pre-commit"
|
||||||
|
run: |
|
||||||
|
brew install pre-commit
|
||||||
|
|
||||||
|
# this step will fail on whitespace errors but also correct them
|
||||||
|
- name: "Cleanup - Remove Trailing Whitespace Via Pre-commit"
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
pre-commit run trailing-whitespace --files CHANGELOG.md .changes/* || true
|
||||||
|
|
||||||
|
# this step will fail on newline errors but also correct them
|
||||||
|
- name: "Cleanup - Remove Extra Newlines Via Pre-commit"
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
pre-commit run end-of-file-fixer --files CHANGELOG.md .changes/* || true
|
||||||
|
|
||||||
|
- name: "Commit Version Bump to Branch"
|
||||||
|
run: |
|
||||||
|
user="Github Build Bot"
|
||||||
|
email="buildbot@fishtownanalytics.com"
|
||||||
|
git config user.name "$user"
|
||||||
|
git config user.email "$email"
|
||||||
|
git status
|
||||||
|
git add .
|
||||||
|
git commit -m "Code quality cleanup"
|
||||||
|
git push
|
||||||
|
|
||||||
|
open_pr:
|
||||||
|
name: "Open PR Against main"
|
||||||
|
needs: ["cleanup_changelog", "create_temp_branch", "cleanup"]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
pr_number: ${{ steps.create_pr.outputs.pull-request-number }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout ${{ github.repository }}"
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ needs.create_temp_branch.outputs.temp_branch_name }}
|
||||||
|
token: ${{ secrets.FISHTOWN_BOT_PAT }}
|
||||||
|
|
||||||
|
- name: "Determine PR Title"
|
||||||
|
id: pr_title
|
||||||
|
run: |
|
||||||
|
echo "pr_title=${{ env.PR_TITLE }}" >> $GITHUB_OUTPUT
|
||||||
|
if [${{ env.PR_TITLE }} == ""]; then
|
||||||
|
echo "pr_title='Clean up changelogs and bump to version ${{ needs.cleanup_changelog.outputs.next-version }}'" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: "Determine PR Body"
|
||||||
|
id: pr_body
|
||||||
|
run: |
|
||||||
|
echo "pr_body=${{ env.PR_BODY }}" >> $GITHUB_OUTPUT
|
||||||
|
if [${{ env.PR_BODY }} == ""]; then
|
||||||
|
echo "pr_body='Clean up changelogs and bump to version ${{ needs.cleanup_changelog.outputs.next-version }}'" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: "Add Branch Details"
|
||||||
|
id: pr_body_branch
|
||||||
|
run: |
|
||||||
|
branch_details="The workflow that generated this PR also created a new branch: ${{ inputs.new_branch_name }}"
|
||||||
|
full_body="${{ steps.pr_body.outputs.pr_body }} $branch_details"
|
||||||
|
echo "pr_full_body=$full_body" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: "Open Pull Request"
|
||||||
|
id: create_pr
|
||||||
|
run: |
|
||||||
|
pr_url=$(gh pr create -B main -H ${{ needs.create_temp_branch.outputs.temp_branch_name }} -l "Skip Changelog" -t "${{ steps.pr_title.outputs.pr_title }}" -b "${{ steps.pr_body_branch.outputs.pr_full_body }}")
|
||||||
|
echo "pr_url=$pr_url" >> $GITHUB_OUTPUT
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.FISHTOWN_BOT_PAT }}
|
||||||
|
|
||||||
|
- name: "[Notification] Pull Request Opened"
|
||||||
|
run: |
|
||||||
|
message="PR opened at ${{ steps.create_pr.outputs.pr_url }}"
|
||||||
|
echo "::notice title="Pull Request Opened": $title::$message"
|
||||||
|
|
||||||
|
cut_new_branch:
|
||||||
|
# don't cut the new branch until we're done opening the PR against main
|
||||||
|
name: "Cut New Branch ${{ inputs.new_branch_name }}"
|
||||||
|
needs: [open_pr]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout ${{ github.repository }}"
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.FISHTOWN_BOT_PAT }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: "Ensure New Branch Does Not Exist"
|
||||||
|
id: check_new_branch
|
||||||
|
run: |
|
||||||
|
title="Check New Branch Existence"
|
||||||
|
if git show-ref --quiet ${{ inputs.new_branch_name }}; then
|
||||||
|
message="Branch ${{ inputs.new_branch_name }} already exists. Exiting."
|
||||||
|
echo "::error $title::$message"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: "Create New Release Branch"
|
||||||
|
run: |
|
||||||
|
git checkout -b ${{ inputs.new_branch_name }}
|
||||||
|
|
||||||
|
- name: "Push up New Branch"
|
||||||
|
run: |
|
||||||
|
#Data for commit
|
||||||
|
user="Github Build Bot"
|
||||||
|
email="buildbot@fishtownanalytics.com"
|
||||||
|
git config user.name "$user"
|
||||||
|
git config user.email "$email"
|
||||||
|
git push --set-upstream origin ${{ inputs.new_branch_name }}
|
||||||
|
|
||||||
|
- name: "[Notification] New branch created"
|
||||||
|
run: |
|
||||||
|
message="New branch ${{ inputs.new_branch_name }} created"
|
||||||
|
echo "::notice title="New branch created": $title::$message"
|
||||||
|
|
||||||
|
- name: "Bump dependencies via script"
|
||||||
|
# This bumps the dependency on dbt-core in the adapters
|
||||||
|
if: ${{ !contains(github.repository, 'dbt-core') }}
|
||||||
|
run: |
|
||||||
|
echo ${{ github.repository }}
|
||||||
|
echo "running update_dependencies script"
|
||||||
|
bash ${GITHUB_WORKSPACE}/.github/scripts/update_dependencies.sh ${{ inputs.new_branch_name }}
|
||||||
|
commit_message="bumping .latest branch variable in update_dependencies.sh to ${{ inputs.new_branch_name }}"
|
||||||
|
git status
|
||||||
|
git add .
|
||||||
|
git commit -m "$commit_message"
|
||||||
|
git push
|
||||||
|
|
||||||
|
- name: "Bump env variable via script"
|
||||||
|
# bumps the RELEASE_BRANCH variable in nightly-release.yml in adapters
|
||||||
|
if: ${{ !contains(github.repository, 'dbt-core') }}
|
||||||
|
run: |
|
||||||
|
file="./.github/scripts/update_release_branch.sh"
|
||||||
|
if test -f "$file"; then
|
||||||
|
echo ${{ github.repository }}
|
||||||
|
echo "running some script yet to be written now"
|
||||||
|
bash $file ${{ inputs.new_branch_name }}
|
||||||
|
commit_message="updating env variable to ${{ inputs.new_branch_name }} in nightly-release.yml"
|
||||||
|
git status
|
||||||
|
git add .
|
||||||
|
git commit -m "$commit_message"
|
||||||
|
git push
|
||||||
|
else
|
||||||
|
echo "no $file seen skipping step"
|
||||||
|
fi
|
||||||
|
|||||||
142
.github/workflows/main.yml
vendored
142
.github/workflows/main.yml
vendored
@@ -20,6 +20,8 @@ on:
|
|||||||
- "*.latest"
|
- "*.latest"
|
||||||
- "releases/*"
|
- "releases/*"
|
||||||
pull_request:
|
pull_request:
|
||||||
|
merge_group:
|
||||||
|
types: [checks_requested]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
@@ -47,27 +49,33 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repository
|
- name: Check out the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: "3.10"
|
||||||
|
|
||||||
- name: Install python dependencies
|
- name: Install python dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --user --upgrade pip
|
python -m pip install --user --upgrade pip
|
||||||
python -m pip --version
|
python -m pip --version
|
||||||
make dev
|
python -m pip install hatch
|
||||||
make dev_req
|
cd core
|
||||||
mypy --version
|
hatch run setup
|
||||||
dbt --version
|
|
||||||
|
- name: Verify dbt installation
|
||||||
|
run: |
|
||||||
|
cd core
|
||||||
|
hatch run dbt --version
|
||||||
|
|
||||||
- name: Run pre-commit hooks
|
- name: Run pre-commit hooks
|
||||||
run: pre-commit run --all-files --show-diff-on-failure
|
run: |
|
||||||
|
cd core
|
||||||
|
hatch run code-quality
|
||||||
|
|
||||||
unit:
|
unit:
|
||||||
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
|
timeout-minutes: 10
|
||||||
@@ -75,17 +83,14 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
|
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
||||||
|
|
||||||
env:
|
|
||||||
TOXENV: "unit"
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repository
|
- name: Check out the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
@@ -93,15 +98,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --user --upgrade pip
|
python -m pip install --user --upgrade pip
|
||||||
python -m pip --version
|
python -m pip --version
|
||||||
python -m pip install tox
|
python -m pip install hatch
|
||||||
tox --version
|
hatch --version
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
uses: nick-fields/retry@v3
|
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # nick-fields/retry@v3
|
||||||
with:
|
with:
|
||||||
timeout_minutes: 10
|
timeout_minutes: 10
|
||||||
max_attempts: 3
|
max_attempts: 3
|
||||||
command: tox -e unit
|
command: cd core && hatch run ci:unit-tests
|
||||||
|
|
||||||
- name: Get current date
|
- name: Get current date
|
||||||
if: always()
|
if: always()
|
||||||
@@ -112,10 +117,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload Unit Test Coverage to Codecov
|
- name: Upload Unit Test Coverage to Codecov
|
||||||
if: ${{ matrix.python-version == '3.11' }}
|
if: ${{ matrix.python-version == '3.11' }}
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
flags: unit
|
flags: unit
|
||||||
|
fail_ci_if_error: false
|
||||||
|
|
||||||
integration-metadata:
|
integration-metadata:
|
||||||
name: integration test metadata generation
|
name: integration test metadata generation
|
||||||
@@ -140,7 +146,7 @@ jobs:
|
|||||||
- name: generate include
|
- name: generate include
|
||||||
id: generate-include
|
id: generate-include
|
||||||
run: |
|
run: |
|
||||||
INCLUDE=('"python-version":"3.9","os":"windows-latest"' '"python-version":"3.9","os":"macos-14"' )
|
INCLUDE=('"python-version":"3.10","os":"windows-latest"' '"python-version":"3.10","os":"macos-14"' )
|
||||||
INCLUDE_GROUPS="["
|
INCLUDE_GROUPS="["
|
||||||
for include in ${INCLUDE[@]}; do
|
for include in ${INCLUDE[@]}; do
|
||||||
for group in $(seq 1 ${{ env.PYTHON_INTEGRATION_TEST_WORKERS }}); do
|
for group in $(seq 1 ${{ env.PYTHON_INTEGRATION_TEST_WORKERS }}); do
|
||||||
@@ -153,7 +159,7 @@ jobs:
|
|||||||
echo "include=${INCLUDE_GROUPS}" >> $GITHUB_OUTPUT
|
echo "include=${INCLUDE_GROUPS}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
integration-postgres:
|
integration-postgres:
|
||||||
name: (${{ matrix.split-group }}) integration test / python ${{ matrix.python-version }} / ${{ matrix.os }}
|
name: "(${{ matrix.split-group }}) integration test / python ${{ matrix.python-version }} / ${{ matrix.os }}"
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
@@ -162,11 +168,10 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
|
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
||||||
os: [ubuntu-latest]
|
os: ["ubuntu-latest"]
|
||||||
split-group: ${{ fromJson(needs.integration-metadata.outputs.split-groups) }}
|
split-group: ${{ fromJson(needs.integration-metadata.outputs.split-groups) }}
|
||||||
env:
|
env:
|
||||||
TOXENV: integration
|
|
||||||
DBT_INVOCATION_ENV: github-actions
|
DBT_INVOCATION_ENV: github-actions
|
||||||
DBT_TEST_USER_1: dbt_test_user_1
|
DBT_TEST_USER_1: dbt_test_user_1
|
||||||
DBT_TEST_USER_2: dbt_test_user_2
|
DBT_TEST_USER_2: dbt_test_user_2
|
||||||
@@ -197,16 +202,16 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repository
|
- name: Check out the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Run postgres setup script
|
- name: Run postgres setup script
|
||||||
run: |
|
run: |
|
||||||
./test/setup_db.sh
|
./scripts/setup_db.sh
|
||||||
env:
|
env:
|
||||||
PGHOST: localhost
|
PGHOST: localhost
|
||||||
PGPORT: 5432
|
PGPORT: 5432
|
||||||
@@ -216,17 +221,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --user --upgrade pip
|
python -m pip install --user --upgrade pip
|
||||||
python -m pip --version
|
python -m pip --version
|
||||||
python -m pip install tox
|
python -m pip install hatch
|
||||||
tox --version
|
hatch --version
|
||||||
|
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
uses: nick-fields/retry@v3
|
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # nick-fields/retry@v3
|
||||||
with:
|
with:
|
||||||
timeout_minutes: 30
|
timeout_minutes: 30
|
||||||
max_attempts: 3
|
max_attempts: 3
|
||||||
command: tox -- --ddtrace
|
shell: bash
|
||||||
env:
|
command: cd core && hatch run ci:integration-tests -- --ddtrace --splits ${{ env.PYTHON_INTEGRATION_TEST_WORKERS }} --group ${{ matrix.split-group }}
|
||||||
PYTEST_ADDOPTS: ${{ format('--splits {0} --group {1}', env.PYTHON_INTEGRATION_TEST_WORKERS, matrix.split-group) }}
|
|
||||||
|
|
||||||
- name: Get current date
|
- name: Get current date
|
||||||
if: always()
|
if: always()
|
||||||
@@ -235,7 +239,7 @@ jobs:
|
|||||||
CURRENT_DATE=$(date +'%Y-%m-%dT%H_%M_%S') # no colons allowed for artifacts
|
CURRENT_DATE=$(date +'%Y-%m-%dT%H_%M_%S') # no colons allowed for artifacts
|
||||||
echo "date=$CURRENT_DATE" >> $GITHUB_OUTPUT
|
echo "date=$CURRENT_DATE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: logs_${{ matrix.python-version }}_${{ matrix.os }}_${{ matrix.split-group }}_${{ steps.date.outputs.date }}
|
name: logs_${{ matrix.python-version }}_${{ matrix.os }}_${{ matrix.split-group }}_${{ steps.date.outputs.date }}
|
||||||
@@ -243,10 +247,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload Integration Test Coverage to Codecov
|
- name: Upload Integration Test Coverage to Codecov
|
||||||
if: ${{ matrix.python-version == '3.11' }}
|
if: ${{ matrix.python-version == '3.11' }}
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
flags: integration
|
flags: integration
|
||||||
|
fail_ci_if_error: false
|
||||||
|
|
||||||
integration-mac-windows:
|
integration-mac-windows:
|
||||||
name: (${{ matrix.split-group }}) integration test / python ${{ matrix.python-version }} / ${{ matrix.os }}
|
name: (${{ matrix.split-group }}) integration test / python ${{ matrix.python-version }} / ${{ matrix.os }}
|
||||||
@@ -258,11 +263,9 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
split-group: ${{ fromJson(needs.integration-metadata.outputs.split-groups) }}
|
# already includes split group and runs mac + windows
|
||||||
# this include is where we add the mac and windows os
|
|
||||||
include: ${{ fromJson(needs.integration-metadata.outputs.include) }}
|
include: ${{ fromJson(needs.integration-metadata.outputs.include) }}
|
||||||
env:
|
env:
|
||||||
TOXENV: integration
|
|
||||||
DBT_INVOCATION_ENV: github-actions
|
DBT_INVOCATION_ENV: github-actions
|
||||||
DBT_TEST_USER_1: dbt_test_user_1
|
DBT_TEST_USER_1: dbt_test_user_1
|
||||||
DBT_TEST_USER_2: dbt_test_user_2
|
DBT_TEST_USER_2: dbt_test_user_2
|
||||||
@@ -275,16 +278,21 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repository
|
- name: Check out the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Set up postgres (macos)
|
- name: Set up postgres (macos)
|
||||||
if: runner.os == 'macOS'
|
if: runner.os == 'macOS'
|
||||||
uses: ./.github/actions/setup-postgres-macos
|
|
||||||
|
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # nick-fields/retry@v3
|
||||||
|
with:
|
||||||
|
timeout_minutes: 10
|
||||||
|
max_attempts: 3
|
||||||
|
command: ./scripts/setup_db.sh
|
||||||
|
|
||||||
- name: Set up postgres (windows)
|
- name: Set up postgres (windows)
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
@@ -294,17 +302,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --user --upgrade pip
|
python -m pip install --user --upgrade pip
|
||||||
python -m pip --version
|
python -m pip --version
|
||||||
python -m pip install tox
|
python -m pip install hatch
|
||||||
tox --version
|
hatch --version
|
||||||
|
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
uses: nick-fields/retry@v3
|
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # nick-fields/retry@v3
|
||||||
with:
|
with:
|
||||||
timeout_minutes: 30
|
timeout_minutes: 30
|
||||||
max_attempts: 3
|
max_attempts: 3
|
||||||
command: tox -- --ddtrace
|
shell: bash
|
||||||
env:
|
command: cd core && hatch run ci:integration-tests -- --ddtrace --splits ${{ env.PYTHON_INTEGRATION_TEST_WORKERS }} --group ${{ matrix.split-group }}
|
||||||
PYTEST_ADDOPTS: ${{ format('--splits {0} --group {1}', env.PYTHON_INTEGRATION_TEST_WORKERS, matrix.split-group) }}
|
|
||||||
|
|
||||||
- name: Get current date
|
- name: Get current date
|
||||||
if: always()
|
if: always()
|
||||||
@@ -313,7 +320,7 @@ jobs:
|
|||||||
CURRENT_DATE=$(date +'%Y-%m-%dT%H_%M_%S') # no colons allowed for artifacts
|
CURRENT_DATE=$(date +'%Y-%m-%dT%H_%M_%S') # no colons allowed for artifacts
|
||||||
echo "date=$CURRENT_DATE" >> $GITHUB_OUTPUT
|
echo "date=$CURRENT_DATE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: logs_${{ matrix.python-version }}_${{ matrix.os }}_${{ matrix.split-group }}_${{ steps.date.outputs.date }}
|
name: logs_${{ matrix.python-version }}_${{ matrix.os }}_${{ matrix.split-group }}_${{ steps.date.outputs.date }}
|
||||||
@@ -321,10 +328,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload Integration Test Coverage to Codecov
|
- name: Upload Integration Test Coverage to Codecov
|
||||||
if: ${{ matrix.python-version == '3.11' }}
|
if: ${{ matrix.python-version == '3.11' }}
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
flags: integration
|
flags: integration
|
||||||
|
fail_ci_if_error: false
|
||||||
|
|
||||||
integration-report:
|
integration-report:
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -350,17 +358,17 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repository
|
- name: Check out the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: "3.10"
|
||||||
|
|
||||||
- name: Install python dependencies
|
- name: Install python dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --user --upgrade pip
|
python -m pip install --user --upgrade pip
|
||||||
python -m pip install --upgrade setuptools wheel twine check-wheel-contents
|
python -m pip install --upgrade hatch twine check-wheel-contents
|
||||||
python -m pip --version
|
python -m pip --version
|
||||||
|
|
||||||
- name: Build distributions
|
- name: Build distributions
|
||||||
@@ -369,27 +377,7 @@ jobs:
|
|||||||
- name: Show distributions
|
- name: Show distributions
|
||||||
run: ls -lh dist/
|
run: ls -lh dist/
|
||||||
|
|
||||||
- name: Check distribution descriptions
|
- name: Check and verify distributions
|
||||||
run: |
|
run: |
|
||||||
twine check dist/*
|
cd core
|
||||||
|
hatch run build:check-all
|
||||||
- name: Check wheel contents
|
|
||||||
run: |
|
|
||||||
check-wheel-contents dist/*.whl --ignore W007,W008
|
|
||||||
|
|
||||||
- name: Install wheel distributions
|
|
||||||
run: |
|
|
||||||
find ./dist/*.whl -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/
|
|
||||||
|
|
||||||
- name: Check wheel distributions
|
|
||||||
run: |
|
|
||||||
dbt --version
|
|
||||||
|
|
||||||
- name: Install source distributions
|
|
||||||
# ignore dbt-1.0.0, which intentionally raises an error when installed from source
|
|
||||||
run: |
|
|
||||||
find ./dist/*.gz -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/
|
|
||||||
|
|
||||||
- name: Check source distributions
|
|
||||||
run: |
|
|
||||||
dbt --version
|
|
||||||
|
|||||||
265
.github/workflows/model_performance.yml
vendored
265
.github/workflows/model_performance.yml
vendored
@@ -1,265 +0,0 @@
|
|||||||
# **what?**
|
|
||||||
# This workflow models the performance characteristics of a point in time in dbt.
|
|
||||||
# It runs specific dbt commands on committed projects multiple times to create and
|
|
||||||
# commit information about the distribution to the current branch. For more information
|
|
||||||
# see the readme in the performance module at /performance/README.md.
|
|
||||||
#
|
|
||||||
# **why?**
|
|
||||||
# When developing new features, we can take quick performance samples and compare
|
|
||||||
# them against the commited baseline measurements produced by this workflow to detect
|
|
||||||
# some performance regressions at development time before they reach users.
|
|
||||||
#
|
|
||||||
# **when?**
|
|
||||||
# This is only run once directly after each release (for non-prereleases). If for some
|
|
||||||
# reason the results of a run are not satisfactory, it can also be triggered manually.
|
|
||||||
|
|
||||||
name: Model Performance Characteristics
|
|
||||||
|
|
||||||
on:
|
|
||||||
# runs after non-prereleases are published.
|
|
||||||
release:
|
|
||||||
types: [released]
|
|
||||||
# run manually from the actions tab
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
release_id:
|
|
||||||
description: 'dbt version to model (must be non-prerelease in Pypi)'
|
|
||||||
type: string
|
|
||||||
required: true
|
|
||||||
|
|
||||||
env:
|
|
||||||
RUNNER_CACHE_PATH: performance/runner/target/release/runner
|
|
||||||
|
|
||||||
# both jobs need to write
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
set-variables:
|
|
||||||
name: Setting Variables
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
cache_key: ${{ steps.variables.outputs.cache_key }}
|
|
||||||
release_id: ${{ steps.semver.outputs.base-version }}
|
|
||||||
release_branch: ${{ steps.variables.outputs.release_branch }}
|
|
||||||
steps:
|
|
||||||
|
|
||||||
# explicitly checkout the performance runner from main regardless of which
|
|
||||||
# version we are modeling.
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: main
|
|
||||||
|
|
||||||
- name: Parse version into parts
|
|
||||||
id: semver
|
|
||||||
uses: dbt-labs/actions/parse-semver@v1
|
|
||||||
with:
|
|
||||||
version: ${{ github.event.inputs.release_id || github.event.release.tag_name }}
|
|
||||||
|
|
||||||
# collect all the variables that need to be used in subsequent jobs
|
|
||||||
- name: Set variables
|
|
||||||
id: variables
|
|
||||||
run: |
|
|
||||||
# create a cache key that will be used in the next job. without this the
|
|
||||||
# next job would have to checkout from main and hash the files itself.
|
|
||||||
echo "cache_key=${{ runner.os }}-${{ hashFiles('performance/runner/Cargo.toml')}}-${{ hashFiles('performance/runner/src/*') }}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
branch_name="${{steps.semver.outputs.major}}.${{steps.semver.outputs.minor}}.latest"
|
|
||||||
echo "release_branch=$branch_name" >> $GITHUB_OUTPUT
|
|
||||||
echo "release branch is inferred to be ${branch_name}"
|
|
||||||
|
|
||||||
latest-runner:
|
|
||||||
name: Build or Fetch Runner
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [set-variables]
|
|
||||||
env:
|
|
||||||
RUSTFLAGS: "-D warnings"
|
|
||||||
steps:
|
|
||||||
- name: '[DEBUG] print variables'
|
|
||||||
run: |
|
|
||||||
echo "all variables defined in set-variables"
|
|
||||||
echo "cache_key: ${{ needs.set-variables.outputs.cache_key }}"
|
|
||||||
echo "release_id: ${{ needs.set-variables.outputs.release_id }}"
|
|
||||||
echo "release_branch: ${{ needs.set-variables.outputs.release_branch }}"
|
|
||||||
|
|
||||||
# explicitly checkout the performance runner from main regardless of which
|
|
||||||
# version we are modeling.
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: main
|
|
||||||
|
|
||||||
# attempts to access a previously cached runner
|
|
||||||
- uses: actions/cache@v4
|
|
||||||
id: cache
|
|
||||||
with:
|
|
||||||
path: ${{ env.RUNNER_CACHE_PATH }}
|
|
||||||
key: ${{ needs.set-variables.outputs.cache_key }}
|
|
||||||
|
|
||||||
- name: Fetch Rust Toolchain
|
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
profile: minimal
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Add fmt
|
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
|
||||||
run: rustup component add rustfmt
|
|
||||||
|
|
||||||
- name: Cargo fmt
|
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --manifest-path performance/runner/Cargo.toml --all -- --check
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --manifest-path performance/runner/Cargo.toml
|
|
||||||
|
|
||||||
- name: Build (optimized)
|
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --release --manifest-path performance/runner/Cargo.toml
|
|
||||||
# the cache action automatically caches this binary at the end of the job
|
|
||||||
|
|
||||||
model:
|
|
||||||
# depends on `latest-runner` as a separate job so that failures in this job do not prevent
|
|
||||||
# a successfully tested and built binary from being cached.
|
|
||||||
needs: [set-variables, latest-runner]
|
|
||||||
name: Model a release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: '[DEBUG] print variables'
|
|
||||||
run: |
|
|
||||||
echo "all variables defined in set-variables"
|
|
||||||
echo "cache_key: ${{ needs.set-variables.outputs.cache_key }}"
|
|
||||||
echo "release_id: ${{ needs.set-variables.outputs.release_id }}"
|
|
||||||
echo "release_branch: ${{ needs.set-variables.outputs.release_branch }}"
|
|
||||||
|
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.9"
|
|
||||||
|
|
||||||
- name: Install dbt
|
|
||||||
run: pip install dbt-postgres==${{ needs.set-variables.outputs.release_id }}
|
|
||||||
|
|
||||||
- name: Install Hyperfine
|
|
||||||
run: wget https://github.com/sharkdp/hyperfine/releases/download/v1.11.0/hyperfine_1.11.0_amd64.deb && sudo dpkg -i hyperfine_1.11.0_amd64.deb
|
|
||||||
|
|
||||||
# explicitly checkout main to get the latest project definitions
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: main
|
|
||||||
|
|
||||||
# this was built in the previous job so it will be there.
|
|
||||||
- name: Fetch Runner
|
|
||||||
uses: actions/cache@v4
|
|
||||||
id: cache
|
|
||||||
with:
|
|
||||||
path: ${{ env.RUNNER_CACHE_PATH }}
|
|
||||||
key: ${{ needs.set-variables.outputs.cache_key }}
|
|
||||||
|
|
||||||
- name: Move Runner
|
|
||||||
run: mv performance/runner/target/release/runner performance/app
|
|
||||||
|
|
||||||
- name: Change Runner Permissions
|
|
||||||
run: chmod +x ./performance/app
|
|
||||||
|
|
||||||
- name: '[DEBUG] ls baseline directory before run'
|
|
||||||
run: ls -R performance/baselines/
|
|
||||||
|
|
||||||
# `${{ github.workspace }}` is used to pass the absolute path
|
|
||||||
- name: Create directories
|
|
||||||
run: |
|
|
||||||
mkdir ${{ github.workspace }}/performance/tmp/
|
|
||||||
mkdir -p performance/baselines/${{ needs.set-variables.outputs.release_id }}/
|
|
||||||
|
|
||||||
# Run modeling with taking 20 samples
|
|
||||||
- name: Run Measurement
|
|
||||||
run: |
|
|
||||||
performance/app model -v ${{ needs.set-variables.outputs.release_id }} -b ${{ github.workspace }}/performance/baselines/ -p ${{ github.workspace }}/performance/projects/ -t ${{ github.workspace }}/performance/tmp/ -n 20
|
|
||||||
|
|
||||||
- name: '[DEBUG] ls baseline directory after run'
|
|
||||||
run: ls -R performance/baselines/
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: baseline
|
|
||||||
path: performance/baselines/${{ needs.set-variables.outputs.release_id }}/
|
|
||||||
|
|
||||||
create-pr:
|
|
||||||
name: Open PR for ${{ matrix.base-branch }}
|
|
||||||
|
|
||||||
# depends on `model` as a separate job so that the baseline can be committed to more than one branch
|
|
||||||
# i.e. release branch and main
|
|
||||||
needs: [set-variables, latest-runner, model]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- base-branch: refs/heads/main
|
|
||||||
target-branch: performance-bot/main_${{ needs.set-variables.outputs.release_id }}_${{GITHUB.RUN_ID}}
|
|
||||||
- base-branch: refs/heads/${{ needs.set-variables.outputs.release_branch }}
|
|
||||||
target-branch: performance-bot/release_${{ needs.set-variables.outputs.release_id }}_${{GITHUB.RUN_ID}}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: '[DEBUG] print variables'
|
|
||||||
run: |
|
|
||||||
echo "all variables defined in set-variables"
|
|
||||||
echo "cache_key: ${{ needs.set-variables.outputs.cache_key }}"
|
|
||||||
echo "release_id: ${{ needs.set-variables.outputs.release_id }}"
|
|
||||||
echo "release_branch: ${{ needs.set-variables.outputs.release_branch }}"
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ matrix.base-branch }}
|
|
||||||
|
|
||||||
- name: Create PR branch
|
|
||||||
run: |
|
|
||||||
git checkout -b ${{ matrix.target-branch }}
|
|
||||||
git push origin ${{ matrix.target-branch }}
|
|
||||||
git branch --set-upstream-to=origin/${{ matrix.target-branch }} ${{ matrix.target-branch }}
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: baseline
|
|
||||||
path: performance/baselines/${{ needs.set-variables.outputs.release_id }}
|
|
||||||
|
|
||||||
- name: '[DEBUG] ls baselines after artifact download'
|
|
||||||
run: ls -R performance/baselines/
|
|
||||||
|
|
||||||
- name: Commit baseline
|
|
||||||
uses: EndBug/add-and-commit@v9
|
|
||||||
with:
|
|
||||||
add: 'performance/baselines/*'
|
|
||||||
author_name: 'Github Build Bot'
|
|
||||||
author_email: 'buildbot@fishtownanalytics.com'
|
|
||||||
message: 'adding performance baseline for ${{ needs.set-variables.outputs.release_id }}'
|
|
||||||
push: 'origin origin/${{ matrix.target-branch }}'
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
uses: peter-evans/create-pull-request@v7
|
|
||||||
with:
|
|
||||||
author: 'Github Build Bot <buildbot@fishtownanalytics.com>'
|
|
||||||
base: ${{ matrix.base-branch }}
|
|
||||||
branch: '${{ matrix.target-branch }}'
|
|
||||||
title: 'Adding performance modeling for ${{needs.set-variables.outputs.release_id}} to ${{ matrix.base-branch }}'
|
|
||||||
body: 'Committing perf results for tracking for the ${{needs.set-variables.outputs.release_id}}'
|
|
||||||
labels: |
|
|
||||||
Skip Changelog
|
|
||||||
Performance
|
|
||||||
8
.github/workflows/nightly-release.yml
vendored
8
.github/workflows/nightly-release.yml
vendored
@@ -31,7 +31,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
aggregate-release-data:
|
aggregate-release-data:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
version_number: ${{ steps.nightly-release-version.outputs.number }}
|
version_number: ${{ steps.nightly-release-version.outputs.number }}
|
||||||
@@ -39,14 +39,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout ${{ github.repository }} Branch ${{ env.RELEASE_BRANCH }}"
|
- name: "Checkout ${{ github.repository }} Branch ${{ env.RELEASE_BRANCH }}"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ env.RELEASE_BRANCH }}
|
ref: ${{ env.RELEASE_BRANCH }}
|
||||||
|
|
||||||
- name: "Get Current Version Number"
|
- name: "Get Current Version Number"
|
||||||
id: version-number-sources
|
id: version-number-sources
|
||||||
run: |
|
run: |
|
||||||
current_version=`awk -F"current_version = " '{print $2}' .bumpversion.cfg | tr '\n' ' '`
|
current_version=$(grep '^version = ' core/dbt/__version__.py | sed 's/version = "\(.*\)"/\1/')
|
||||||
echo "current_version=$current_version" >> $GITHUB_OUTPUT
|
echo "current_version=$current_version" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: "Audit Version And Parse Into Parts"
|
- name: "Audit Version And Parse Into Parts"
|
||||||
@@ -76,7 +76,7 @@ jobs:
|
|||||||
echo "name=${{ env.RELEASE_BRANCH }}" >> $GITHUB_OUTPUT
|
echo "name=${{ env.RELEASE_BRANCH }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
log-outputs-aggregate-release-data:
|
log-outputs-aggregate-release-data:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
needs: [aggregate-release-data]
|
needs: [aggregate-release-data]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
55
.github/workflows/release.yml
vendored
55
.github/workflows/release.yml
vendored
@@ -72,12 +72,15 @@ defaults:
|
|||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
env:
|
||||||
|
MIN_HATCH_VERSION: "1.11.0"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
job-setup:
|
job-setup:
|
||||||
name: Log Inputs
|
name: Log Inputs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
outputs:
|
outputs:
|
||||||
starting_sha: ${{ steps.set_sha.outputs.starting_sha }}
|
use_hatch: ${{ steps.use_hatch.outputs.use_hatch }}
|
||||||
steps:
|
steps:
|
||||||
- name: "[DEBUG] Print Variables"
|
- name: "[DEBUG] Print Variables"
|
||||||
run: |
|
run: |
|
||||||
@@ -88,19 +91,29 @@ jobs:
|
|||||||
echo Nightly release: ${{ inputs.nightly_release }}
|
echo Nightly release: ${{ inputs.nightly_release }}
|
||||||
echo Only Docker: ${{ inputs.only_docker }}
|
echo Only Docker: ${{ inputs.only_docker }}
|
||||||
|
|
||||||
- name: "Checkout target branch"
|
# In version env.HATCH_VERSION we started to use hatch for build tooling. Before that we used setuptools.
|
||||||
uses: actions/checkout@v4
|
# This needs to check if we're using hatch or setuptools based on the version being released. We should
|
||||||
with:
|
# check if the version is greater than or equal to env.HATCH_VERSION. If it is, we use hatch, otherwise we use setuptools.
|
||||||
ref: ${{ inputs.target_branch }}
|
- name: "Check if using hatch"
|
||||||
|
id: use_hatch
|
||||||
# release-prep.yml really shouldn't take in the sha but since core + all adapters
|
|
||||||
# depend on it now this workaround lets us not input it manually with risk of error.
|
|
||||||
# The changes always get merged into the head so we can't use a specific commit for
|
|
||||||
# releases anyways.
|
|
||||||
- name: "Capture sha"
|
|
||||||
id: set_sha
|
|
||||||
run: |
|
run: |
|
||||||
echo "starting_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
# Extract major.minor from versions like 1.11.0a1 -> 1.11
|
||||||
|
INPUT_MAJ_MIN=$(echo "${{ inputs.version_number }}" | sed -E 's/^([0-9]+\.[0-9]+).*/\1/')
|
||||||
|
HATCH_MAJ_MIN=$(echo "${{ env.MIN_HATCH_VERSION }}" | sed -E 's/^([0-9]+\.[0-9]+).*/\1/')
|
||||||
|
|
||||||
|
if [ $(echo "$INPUT_MAJ_MIN >= $HATCH_MAJ_MIN" | bc) -eq 1 ]; then
|
||||||
|
echo "use_hatch=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "use_hatch=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: "Notify if using hatch"
|
||||||
|
run: |
|
||||||
|
if [ ${{ steps.use_hatch.outputs.use_hatch }} = "true" ]; then
|
||||||
|
echo "::notice title="Using Hatch": $title::Using Hatch for release"
|
||||||
|
else
|
||||||
|
echo "::notice title="Using Setuptools": $title::Using Setuptools for release"
|
||||||
|
fi
|
||||||
|
|
||||||
bump-version-generate-changelog:
|
bump-version-generate-changelog:
|
||||||
name: Bump package version, Generate changelog
|
name: Bump package version, Generate changelog
|
||||||
@@ -110,12 +123,13 @@ jobs:
|
|||||||
uses: dbt-labs/dbt-release/.github/workflows/release-prep.yml@main
|
uses: dbt-labs/dbt-release/.github/workflows/release-prep.yml@main
|
||||||
|
|
||||||
with:
|
with:
|
||||||
sha: ${{ needs.job-setup.outputs.starting_sha }}
|
|
||||||
version_number: ${{ inputs.version_number }}
|
version_number: ${{ inputs.version_number }}
|
||||||
|
hatch_directory: "core"
|
||||||
target_branch: ${{ inputs.target_branch }}
|
target_branch: ${{ inputs.target_branch }}
|
||||||
env_setup_script_path: "scripts/env-setup.sh"
|
env_setup_script_path: "scripts/env-setup.sh"
|
||||||
test_run: ${{ inputs.test_run }}
|
test_run: ${{ inputs.test_run }}
|
||||||
nightly_release: ${{ inputs.nightly_release }}
|
nightly_release: ${{ inputs.nightly_release }}
|
||||||
|
use_hatch: ${{ needs.job-setup.outputs.use_hatch == 'true' }} # workflow outputs are strings...
|
||||||
|
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
@@ -125,7 +139,7 @@ jobs:
|
|||||||
|
|
||||||
needs: [bump-version-generate-changelog]
|
needs: [bump-version-generate-changelog]
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Print variables
|
- name: Print variables
|
||||||
@@ -143,16 +157,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
sha: ${{ needs.bump-version-generate-changelog.outputs.final_sha }}
|
sha: ${{ needs.bump-version-generate-changelog.outputs.final_sha }}
|
||||||
version_number: ${{ inputs.version_number }}
|
version_number: ${{ inputs.version_number }}
|
||||||
|
hatch_directory: "core"
|
||||||
changelog_path: ${{ needs.bump-version-generate-changelog.outputs.changelog_path }}
|
changelog_path: ${{ needs.bump-version-generate-changelog.outputs.changelog_path }}
|
||||||
build_script_path: "scripts/build-dist.sh"
|
build_script_path: "scripts/build-dist.sh"
|
||||||
s3_bucket_name: "core-team-artifacts"
|
|
||||||
package_test_command: "dbt --version"
|
package_test_command: "dbt --version"
|
||||||
test_run: ${{ inputs.test_run }}
|
test_run: ${{ inputs.test_run }}
|
||||||
nightly_release: ${{ inputs.nightly_release }}
|
nightly_release: ${{ inputs.nightly_release }}
|
||||||
|
use_hatch: ${{ needs.job-setup.outputs.use_hatch == 'true' }} # workflow outputs are strings...
|
||||||
secrets:
|
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
|
|
||||||
github-release:
|
github-release:
|
||||||
name: GitHub Release
|
name: GitHub Release
|
||||||
@@ -188,7 +199,7 @@ jobs:
|
|||||||
# determine if we need to release dbt-core or both dbt-core and dbt-postgres
|
# determine if we need to release dbt-core or both dbt-core and dbt-postgres
|
||||||
name: Determine Docker Package
|
name: Determine Docker Package
|
||||||
if: ${{ !failure() && !cancelled() }}
|
if: ${{ !failure() && !cancelled() }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
needs: [pypi-release]
|
needs: [pypi-release]
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.determine-docker-package.outputs.matrix }}
|
matrix: ${{ steps.determine-docker-package.outputs.matrix }}
|
||||||
|
|||||||
36
.github/workflows/schema-check.yml
vendored
36
.github/workflows/schema-check.yml
vendored
@@ -22,7 +22,7 @@ on:
|
|||||||
target_branch:
|
target_branch:
|
||||||
description: "The branch to check against"
|
description: "The branch to check against"
|
||||||
type: string
|
type: string
|
||||||
default: 'main'
|
default: "main"
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
# no special access is needed
|
# no special access is needed
|
||||||
@@ -37,23 +37,23 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
checking-schemas:
|
checking-schemas:
|
||||||
name: "Post-merge schema changes required"
|
name: "Post-merge schema changes required"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ vars.UBUNTU_LATEST }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: "3.10"
|
||||||
|
|
||||||
- name: Checkout dbt repo
|
- name: Checkout dbt repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ env.DBT_REPO_DIRECTORY }}
|
path: ${{ env.DBT_REPO_DIRECTORY }}
|
||||||
ref: ${{ inputs.target_branch }}
|
ref: ${{ inputs.target_branch }}
|
||||||
|
|
||||||
- name: Check for changes in core/dbt/artifacts
|
- name: Check for changes in core/dbt/artifacts
|
||||||
# https://github.com/marketplace/actions/paths-changes-filter
|
# https://github.com/marketplace/actions/paths-changes-filter
|
||||||
uses: dorny/paths-filter@v3
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # dorny/paths-filter@v3
|
||||||
id: check_artifact_changes
|
id: check_artifact_changes
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: |
|
||||||
@@ -69,21 +69,19 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout schemas.getdbt.com repo
|
- name: Checkout schemas.getdbt.com repo
|
||||||
if: steps.check_artifact_changes.outputs.artifacts_changed == 'true'
|
if: steps.check_artifact_changes.outputs.artifacts_changed == 'true'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: dbt-labs/schemas.getdbt.com
|
repository: dbt-labs/schemas.getdbt.com
|
||||||
ref: 'main'
|
ref: "main"
|
||||||
path: ${{ env.SCHEMA_REPO_DIRECTORY }}
|
path: ${{ env.SCHEMA_REPO_DIRECTORY }}
|
||||||
|
|
||||||
- name: Generate current schema
|
- name: Generate current schema
|
||||||
if: steps.check_artifact_changes.outputs.artifacts_changed == 'true'
|
if: steps.check_artifact_changes.outputs.artifacts_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
cd ${{ env.DBT_REPO_DIRECTORY }}
|
cd ${{ env.DBT_REPO_DIRECTORY }}/core
|
||||||
python3 -m venv env
|
pip install --upgrade pip hatch
|
||||||
source env/bin/activate
|
hatch run setup
|
||||||
pip install --upgrade pip
|
hatch run json-schema -- --path ${{ env.LATEST_SCHEMA_PATH }}
|
||||||
pip install -r dev-requirements.txt -r editable-requirements.txt
|
|
||||||
python scripts/collect-artifact-schema.py --path ${{ env.LATEST_SCHEMA_PATH }}
|
|
||||||
|
|
||||||
# Copy generated schema files into the schemas.getdbt.com repo
|
# Copy generated schema files into the schemas.getdbt.com repo
|
||||||
# Do a git diff to find any changes
|
# Do a git diff to find any changes
|
||||||
@@ -96,8 +94,8 @@ jobs:
|
|||||||
git diff -I='*[0-9]{4}-[0-9]{2}-[0-9]{2}' -I='*[0-9]+\.[0-9]+\.[0-9]+' --exit-code > ${{ env.SCHEMA_DIFF_ARTIFACT }}
|
git diff -I='*[0-9]{4}-[0-9]{2}-[0-9]{2}' -I='*[0-9]+\.[0-9]+\.[0-9]+' --exit-code > ${{ env.SCHEMA_DIFF_ARTIFACT }}
|
||||||
|
|
||||||
- name: Upload schema diff
|
- name: Upload schema diff
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # actions/upload-artifact@v4
|
||||||
if: ${{ failure() && steps.check_artifact_changes.outputs.artifacts_changed == 'true' }}
|
if: ${{ failure() && steps.check_artifact_changes.outputs.artifacts_changed == 'true' }}
|
||||||
with:
|
with:
|
||||||
name: 'schema_changes.txt'
|
name: "schema_changes.txt"
|
||||||
path: '${{ env.SCHEMA_DIFF_ARTIFACT }}'
|
path: "${{ env.SCHEMA_DIFF_ARTIFACT }}"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user