Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Reformat core [CT-104 CT-105] #4697

Merged
merged 934 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
934 commits
Select commit Hold shift + click to select a range
bc4ddae
[#3567] Fix partial parsing error with version key if previous file is
gshank Jul 23, 2021
619e946
[#4253] Support partial parsing of env_vars in metrics definitions (#…
gshank Nov 23, 2021
098d034
[#3627] Improve findability of macro_patches, schedule right macro file
gshank Jul 26, 2021
58c1050
Update project load tracking to include experimental parser info (#3495)
Jun 28, 2021
b12bb67
Fix static parser tracking again (#4109)
Oct 21, 2021
5da10a9
add jinja sampling to stable static parser (#3970)
Oct 6, 2021
a945047
Fix tracking bug for jinja sampling (#4048)
Oct 20, 2021
08ea52a
add macro override detection for ref, source, and config for ModelParser
Sep 13, 2021
e1ffb95
Fix static parser tracking again (#4109)
Oct 21, 2021
9c1ae98
Fix static parser tracking again (#4109)
Oct 21, 2021
104fd8e
Add tracking event for full re-parse reasoning (#3652)
Jul 30, 2021
d092ac7
updates associated with merging main
emmyoop Nov 8, 2021
42d5106
Add tracking event for full re-parse reasoning (#3652)
Jul 30, 2021
a85bff6
[#3725] Switch to full reparse on partial parsing exceptions. Log and
gshank Aug 11, 2021
fa304d9
Do schema file parsing after parsing all other files
gshank May 11, 2021
11b2d89
[#3810] Skip partial parsing if certain macros have changed
gshank Sep 21, 2021
d139ea1
Update project load tracking to include experimental parser info (#3495)
Jun 28, 2021
f0a2a65
flake8, pep8, unit tests
Mar 21, 2019
32cff6f
fix the ambiguous alias exception to respect databases
Apr 30, 2020
a02f94b
Follow Jeremy's wild speculation
Nov 27, 2020
9c1b5ea
reports -> exposures
Sep 21, 2020
8e680fe
PR feedback
Apr 21, 2020
7587e14
[#3689] Fix filesystem searcher and tests that mock it (#4271)
gshank Nov 15, 2021
db3f37a
[#3689] Fix filesystem searcher and tests that mock it (#4271)
gshank Nov 15, 2021
e31cf7d
PR feedback
iknox-fa May 12, 2021
0135561
cleaned up exceptions
emmyoop Sep 30, 2021
148e385
1. Add integration test for yaml schema extension warning. 2. Add int…
sumanau7 Apr 5, 2020
4b91cdd
no more warnings for parse failures
Sep 13, 2019
1545d67
Update project load tracking to include experimental parser info (#3495)
Jun 28, 2021
797f8ce
Addressed PR comments
azhard Jul 29, 2020
ec5ff41
[#3885] Partially parse when environment variables in schema files ch…
gshank Nov 8, 2021
5f87b11
PR feedback
iknox-fa May 12, 2021
69e34bf
Additional PR feedback
iknox-fa May 12, 2021
17a79c3
add test metadata for schema tests, add test tests
Oct 8, 2019
c6e5de5
implement source patching
Apr 21, 2020
c5a7400
Issue message instead of exception when patch does not have a matchin…
gshank Nov 8, 2021
2541542
Initial file creation of code documentation READMEs (#4654)
gshank Feb 2, 2022
574633b
Move partial parsing to end of parsing and implement new partial parsing
gshank Jun 2, 2021
bba18c3
Feature: nullable error_after in source (#3955)
kadero Oct 26, 2021
42d21d3
Use Manifest instead of ParseResults [#3163]
gshank Mar 30, 2021
b162017
Add extra graph edges for `build` only (#4143)
jtcohen6 Nov 2, 2021
35c597e
dbt builtin profiler
cmcarthur Sep 20, 2018
38f8c29
Convert dbt to use dataclasses and hologram for representing things
Jun 24, 2019
bcc39b3
in "dbt deps", if a profile cannot be found/loaded, use invalid value…
Apr 1, 2020
c39f56d
chugging along
kwigley Nov 30, 2020
0ec7a54
stringify generic exceptions (#4424)
iknox-fa Dec 3, 2021
70e4233
project and profile scaffolding with clean, compile, and run tasks
Mar 16, 2016
9b22f7e
Er/1607 source paths (#4008)
emmyoop Oct 12, 2021
56d60c9
Tiny touchups for deps, clean (#4366)
jtcohen6 Dec 2, 2021
384783b
fix printer output
Dec 14, 2020
7da2e65
address test failures
Dec 4, 2020
962ed05
dbt debug
Dec 4, 2018
4c7698a
Use --project-dir outside current dir in debug when it exists #1733
Dec 21, 2019
43459a3
allow "dbt debug" from subdirectories
Feb 4, 2020
af93037
Add colourful count of pass/fail tests in dbt debug (#3832)
Sep 2, 2021
ac36b09
(fixes #1201) Replace unicode characters with ascii strings
drewbanin Jan 2, 2019
8596e34
fix flake test - formatting
sdebruyn Jan 20, 2021
8a05d9a
fix dbt debug connections
Apr 26, 2019
d18e930
Add validation feature, add unit + integration tests for various aspe…
Sep 23, 2019
1aa5937
docs generate RPC task
Oct 2, 2019
d193496
move has_stats to a python-computed value [skip ci]
Aug 20, 2018
b3208f8
Make databases optional
May 26, 2020
f50acc8
move catalog nodes entry into sources
Apr 28, 2020
2262a5f
Create a somewhat sane, if huge, configuration object
Sep 13, 2018
a66c5c2
Fix README links (#554)
cmcarthur Oct 8, 2017
0faea1b
Touch up init, fix missing adapter errors (#3483)
jtcohen6 Jun 24, 2021
abfc3ec
`dbt init` Interactive profile creation (#3625)
NiallRees Oct 20, 2021
fa0f907
Move starter project into `dbt` repo (#3474)
leahwicz Jun 22, 2021
39f3f14
Add gitignore, ignore pycache (#3536)
jtcohen6 Jul 6, 2021
95f2acf
dbt init profile_template.yml improvements (#4118)
NiallRees Oct 22, 2021
4b2df56
Add _fixed key config back for _choice options in profile_template.ym…
NiallRees Oct 22, 2021
1cda434
dbt init profile_template.yml improvements (#4118)
NiallRees Oct 22, 2021
d1c196c
Initial structured logging work with `fire_event` (#4137)
Oct 29, 2021
ff66712
add event to track loading time
Nov 17, 2020
f63d9ca
(#23551) track project id for deps events
drewbanin May 11, 2020
bdc2ecf
[#4071] Add metrics feature (#4235)
gshank Nov 8, 2021
96dd924
added additional fields to list response (unique_id, original_file_path)
iknox-fa May 26, 2021
4bc8452
Fix mypy checking
Dec 17, 2019
0295dcd
replace `logger.warning` with `warn_or_error` (#4019)
laxjesse Oct 8, 2021
3e51f82
Fix mypy checking
Dec 17, 2019
5ac3d84
task callsites: part 2 (#4188)
emmyoop Nov 4, 2021
33947eb
add on-run-start/on-run-end hook logging
May 3, 2019
5240966
call sites in core/dbt (excluding main.py) (#4202)
emmyoop Nov 8, 2021
01d177e
PR feedback
Jul 31, 2019
f042f91
Acquire a connection before executing the macro, and commit after
Apr 17, 2019
bfd9c19
Call build_flat_graph everywhere that wants it
Sep 27, 2019
3a8d0db
first pass at a working "dbt docs serve" command!
cmcarthur Jul 25, 2018
8a39fa6
task callsites: part 2 (#4188)
emmyoop Nov 4, 2021
1b5e9ca
Fix some mypy issues
Apr 16, 2020
7505a45
removed deprication for materialization-return and replaced it with a…
emmyoop Sep 22, 2021
0d834a5
[#3885] Handle env_vars in partial parsing of SQL files (#4101)
gshank Oct 26, 2021
82ac0c3
add node type codes to more events + more hook log data (#4378)
emmyoop Dec 3, 2021
e09a991
PR feedback
May 7, 2019
26b775b
PR feedback
May 10, 2019
b9914be
add tests, make log default to True, make the uid context bigger
Nov 11, 2019
8ee751f
add db, schema pairs to the context
Jan 6, 2020
10e6c73
Include only relational nodes in `database_schema_set` (#4077)
ljhopkins2 Oct 18, 2021
7a3efa8
PR feedback, clean up associated connection holding
Mar 7, 2019
14f12cf
Fix logging for default selector (#3892)
jtcohen6 Sep 17, 2021
7c6a9c4
Make RunModelResult an APIObject with a contract, add write_json
Aug 6, 2018
8237b4b
Refactor for node selection
Jul 2, 2020
33cc4f7
Refactor for node selection
Jul 2, 2020
e5c6c23
Remove RunManager
Feb 1, 2019
bcd736c
Fix typo in failfast msg
jtcohen6 May 15, 2020
3655c89
fix many bugs, move RunBuilder back into the RunManager
Nov 27, 2018
7ca79e6
populate_adapter_cache for everyone
Apr 14, 2020
bf4a473
Convert dbt to use dataclasses and hologram for representing things
Jun 24, 2019
54b3554
Change list_relations_without_caching macro to take a single argument
May 6, 2020
21168bb
Change list_relations_without_caching macro to take a single argument
May 6, 2020
e5d79f7
Use threadpools for filling the cache and listing schemas
Feb 24, 2020
e2ea6c4
initial work on an adapter building script
Nov 20, 2018
1ff0507
more work on the create script
Jan 4, 2019
9afd4db
Update create_adapter_plugins.py (#3509)
jtcohen6 Jul 9, 2021
b78d96e
Update the create adapter script to dbt 0.16.1
Apr 3, 2020
2294863
Update the create adapter script to dbt 0.16.1
Apr 3, 2020
7423385
Update create_adapter_plugins.py (#3509)
jtcohen6 Jul 9, 2021
d1150a9
Bumping version to 1.0.1 (#4543)
github-actions[bot] Jan 3, 2022
0f3fde1
Fix --dependency arg bug in create_adapter_plugin
scarrucciu Jun 1, 2020
f5a61cd
use fishtown's snowplow collector (#682)
cmcarthur Mar 5, 2018
8ae2b98
upgrade run_model iglu schema to 1-0-1
cmcarthur Feb 1, 2019
ae7d936
track package usage for hub site stats (#688)
drewbanin Mar 8, 2018
e78e968
(#1574) track adapter type and rpc requests
drewbanin Jun 26, 2019
d8a941a
Track deprecation warnings
jtcohen6 Aug 17, 2020
f46647e
Track resource counts
gshank Mar 10, 2021
b34c0bf
add experimental parser tracking (#3553)
Jul 9, 2021
e3cb57b
track dbt env
drewbanin Dec 4, 2016
0a818f1
batching
Feb 3, 2020
a4d9b21
build out invocation events
Sep 15, 2016
25f320d
make tracking use the profile directory, and suppress errors
Dec 12, 2018
c68e029
scope all tracking state to fix imported dbt runs
drewbanin Feb 3, 2017
a297217
(#1645) fix for errant cookie generation
drewbanin Aug 3, 2019
cccbf62
rip out dry run
drewbanin Feb 7, 2017
733492f
revert to 1.0.0 schemas, null out fields instead
Jul 5, 2018
1e4ed34
revert to 1.0.0 schemas, null out fields instead
Jul 5, 2018
f2e348f
default to 'manual'
drewbanin Dec 4, 2016
e9a7429
remove run_error from tracking code
Jul 2, 2018
fc9090e
scope all tracking state to fix imported dbt runs
drewbanin Feb 3, 2017
76cca01
fix tests
Nov 18, 2020
eece62b
[#4337] Always create an invocation_id, even when not tracking (#4340)
gshank Nov 24, 2021
9a6a5fe
Create a somewhat sane, if huge, configuration object
Sep 13, 2018
bdc81d7
Fix mypy checking
Dec 17, 2019
0e229b3
Create a somewhat sane, if huge, configuration object
Sep 13, 2018
8de0126
pep8
drewbanin Feb 3, 2017
d374d69
New Dockerfile (#4487)
iknox-fa Dec 22, 2021
f8fc2b0
initial work on a converter, only built-in tests handled
Aug 24, 2018
ce9a1c4
add handling for simple custom tests
Aug 24, 2018
9336e12
Convert the full project, not just single files
Aug 27, 2018
9b395dd
add custom mappings arguments
Aug 27, 2018
667a6d0
logging
Aug 24, 2018
62d9ef1
control flow cleanup
Aug 27, 2018
c3fecd3
Convert the full project, not just single files
Aug 27, 2018
59a0469
Convert the full project, not just single files
Aug 27, 2018
e15f668
if tests are not dicts, make them dicts
Sep 4, 2018
5df579e
get pyyaml to dump things in a more pleasing order
Sep 4, 2018
9213c5e
pep8/test sanity
Aug 27, 2018
bddb579
pep8/test sanity
Aug 27, 2018
f4fd6fd
point latest version check to dbt-core package (#4434)
Dec 3, 2021
28b19f5
use pypi for the latest version instead of git
Dec 5, 2018
c235167
adapter compability messaging added. (#4565)
nkyuray Feb 3, 2022
8b8d627
make the case of an inaccessible raw.githubusercontent.com a bit more…
Aug 27, 2018
c54275b
Allow for more complex version comparison (redux) (#797)
drewbanin Jun 27, 2018
10e6be6
Add DBT Plugin information to get_version_information
sumanau7 Apr 4, 2020
6300ffd
fix up the unit tests
May 7, 2020
c4daf9d
fix version-loading logic to respect multiple plugins at the same path
May 7, 2020
e62c91e
first pass using materialization for data tests
Mar 19, 2021
2963352
added test support for databases without boolean types (#4091)
emmyoop Oct 21, 2021
df74fa0
Rename tests: singular + generic (#3880)
jtcohen6 Sep 30, 2021
d7ec2d1
[#3885] Handle env_vars in partial parsing of SQL files (#4101)
gshank Oct 26, 2021
1e66386
use test materialization for schema/generic tests, update integration…
Apr 22, 2021
039cffb
sets schema for node before parsing raw sql (#541)
drewbanin Sep 29, 2017
9146804
refactor to accommodate pre/post-run hooks
drewbanin Dec 5, 2016
4a3349b
use ternary and f-strings
Apr 13, 2021
d52de06
[#3885] Partially parse when environment variables in schema files ch…
gshank Nov 8, 2021
18ef431
[#3885] Partially parse when environment variables in schema files ch…
gshank Nov 8, 2021
4c3b7ce
add recursion handling
Oct 22, 2018
8072525
[#3885] Partially parse when environment variables in schema files ch…
gshank Nov 8, 2021
dba2d43
Compile on-run-(start|end) hooks to file (#412)
drewbanin May 9, 2017
75ea27b
when encoding json, handle dates and times like datetimes
Mar 8, 2019
a45a634
Add a JSONEncoder that encodes decimals to floats
Aug 6, 2018
e59898c
add run_operation + snapshot to the RPC server
Oct 30, 2019
8e34655
core/dbt/utils: add PB to format_bytes and always return the accurate…
alepuccetti Jun 16, 2020
c32ecf5
core/dbt/utils: add format_rows_number
alepuccetti Jun 16, 2020
c6c8010
instead of a special "config" key, use a "+" prefix and only require …
Apr 20, 2020
eeb7be8
Adding ADR directory, guidelines, first one (#3844)
leahwicz Sep 7, 2021
bfd423b
Fix for #2347
Aug 23, 2020
73a246c
Drop support for Python <3.7.2 (#4643)
jtcohen6 Jan 31, 2022
9ef9ecb
fail more gracefully when setuptools is missing
Dec 4, 2019
914bdf0
PR feedback
Dec 5, 2019
c68d9a9
Raise error on `pip install dbt` (#4133)
jtcohen6 Nov 7, 2021
94e4446
Revert "Merge branch '0.19.latest' into develop"
Feb 15, 2021
cbed9cc
add snowflake support (#259)
cmcarthur Jan 20, 2017
bec410a
Bump jinja2 from 2.11.2 to 2.11.3 in /core (#3077)
dependabot[bot] May 20, 2021
37c1f13
Update agate requirement from <1.6.2,>=1.6 to >=1.6,<1.6.4 in /core (…
dependabot[bot] Nov 8, 2021
e794eea
task init: support older click v7.0 (#4681)
twilly Feb 7, 2022
f28461f
add 'packaging' package to dbt-core
May 11, 2021
db1e848
bump hologram to 0.0.14
bastienboutonnet Mar 8, 2021
c2b972d
Bump mashumaro from 2.5 to 2.9 in /core (#4193)
dependabot[bot] Nov 8, 2021
2e0671c
Update packaging requirement from ~=20.9 to >=20.9,<22.0 in /core (#3…
dependabot[bot] Oct 22, 2021
7c9c614
Update sqlparse requirement from <0.4,>=0.2.3 to >=0.2.3,<0.5 in /cor…
dependabot[bot] Aug 25, 2021
1c171da
experimental parser respects config merge behavior
Jul 27, 2021
e07817f
Update typing-extensions requirement in /core (#3310)
dependabot[bot] Jun 18, 2021
007c987
Bump werkzeug lower bound, werkzeug-refresh-token script (#3590)
jtcohen6 Jul 20, 2021
a48ed6c
update snowflake deps
Mar 26, 2021
27868e8
Update idna requirement from <3,>=2.5 to >=2.5,<4 in /core (#3429)
dependabot[bot] Jun 18, 2021
dbbb075
add some arbitrary-ish classifiers (importantly: the versions we supp…
Nov 4, 2019
232cfa1
update hologram and add new envs to tox
Dec 14, 2020
5808212
Add Structured Logging ADR (#4308)
Dec 22, 2021
bab8513
use a profiles.yml file
Jul 21, 2021
8b0aa78
draft of regression testing workflow
Jul 20, 2021
06c7e8a
update tox, update makefile, run tests natively by default, general d…
Mar 25, 2021
15614bb
swapping dummy perf testing projects for real one
Aug 11, 2021
e706239
Move redshift, snowflake, bigquery plugins (#3969)
jtcohen6 Oct 2, 2021
f6489c3
Default application_name to dbt
cgopalan Mar 26, 2021
0304e4d
Convert dbt to use dataclasses and hologram for representing things
Jun 24, 2019
0818d92
Make adapters optional
Oct 19, 2018
3b7756e
uncommenting sslmode in postgres _coonection_keys
0xdholleran Feb 25, 2020
2ba712f
Use get method for extracting search_path
buremba May 24, 2019
207dfc8
Fix linting issues
buremba May 27, 2019
2151b21
Update plugins/postgres/dbt/adapters/postgres/connections.py
0xdholleran Feb 27, 2020
ef3f606
Set application_name for Postgres connections
cgopalan Mar 20, 2021
5a111f4
Support act-as in postgres
shooka Feb 14, 2020
7626ad9
update api, fix tests, add placeholder for test/source results
Dec 22, 2020
9965fd2
Tweak error message, reformat for flake8
gshank Aug 27, 2020
02161b8
Fix postgres text handling
Apr 26, 2019
c9fafca
Postgres: Prevent temp relation identifiers from being too long
elexisvenator Oct 26, 2020
adb13a9
fix style to get unit tests to pass
arzavj Mar 12, 2021
9dd1059
fix style to get unit tests to pass
arzavj Mar 12, 2021
5170bbc
respond to pr comments
arzavj Mar 12, 2021
c887560
Properly ignore materialized views
Oct 15, 2019
d4d2bd6
PR feedback
Mar 6, 2019
480f79a
Rm py36 tests, pkg metadata, bump reqs (#4223)
jtcohen6 Nov 8, 2021
879504e
Use psycopg2-binary package on all platforms
Nov 22, 2019
2bd56b1
pin psycopg2, add an env variable for opting out of binary
Nov 6, 2019
551eb24
py2 compat
drewbanin May 10, 2019
1d67920
update plugin readmes
drewbanin May 9, 2019
22eea68
More packaging fixes
Oct 21, 2019
828b91f
updated setup.py of adapters to include sample_profiles.yml
brunomurino Jun 26, 2020
a7ddc95
include macros/**/*.sql as well
Jun 18, 2019
426a410
address issue with py39
Dec 10, 2020
c4db108
fix schema collection script
Sep 22, 2020
13e90ba
Moving CI to GitHub actions (#3669)
Aug 24, 2021
1595d55
Support refresh tokens
Feb 14, 2020
c51ec3b
mypy quality of life fixes
Jul 24, 2019
a1050bd
Convert tests to v2, fix them
Apr 16, 2020
ac4702e
update changelog
iknox-fa Feb 8, 2022
fb2edf9
update flake8 warnings
iknox-fa Feb 8, 2022
1514def
more tox tweaks for flake8/black compatibility
iknox-fa Feb 8, 2022
6c708b1
Type error fixes and ignores
iknox-fa Feb 10, 2022
037b3c3
merge main
iknox-fa Feb 11, 2022
8854d2f
merge main formatting
iknox-fa Feb 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ parse = (?P<major>\d+)
((?P<prekind>a|b|rc)
(?P<pre>\d+) # pre-release version num
)?
serialize =
serialize =
{major}.{minor}.{patch}{prekind}{pre}
{major}.{minor}.{patch}
commit = False
Expand All @@ -15,7 +15,7 @@ tag = False
[bumpversion:part:prekind]
first_value = a
optional_value = final
values =
values =
a
b
rc
Expand Down
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file contains the code owners for the dbt-core repo.
# PRs will be automatically assigned for review to the associated
# PRs will be automatically assigned for review to the associated
# team(s) or person(s) that touches any files that are mapped to them.
#
# A statement takes precedence over the statements above it so more general
Expand All @@ -9,7 +9,7 @@
# Consult GitHub documentation for formatting guidelines:
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#example-of-a-codeowners-file

# As a default for areas with no assignment,
# As a default for areas with no assignment,
# the core team as a whole will be assigned
* @dbt-labs/core

Expand Down Expand Up @@ -37,7 +37,7 @@
/core/dbt/include/global_project @dbt-labs/core-execution @dbt-labs/core-adapters

# Perf regression testing framework
# This excludes the test project files itself since those aren't specific
# This excludes the test project files itself since those aren't specific
# framework changes (excluded by not setting an owner next to it- no owner)
/performance @nathaniel-may
/performance/projects
6 changes: 3 additions & 3 deletions .github/actions/latest-wrangler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Plug in the necessary inputs to determine if the container being built should be
| `package` | Name of the GH package to check against |
| `new_version` | Semver of new container |
| `gh_token` | GH token with package read scope|
| `halt_on_missing` | Return non-zero exit code if requested package does not exist. (defaults to false)|
| `halt_on_missing` | Return non-zero exit code if requested package does not exist. (defaults to false)|


## Outputs
Expand All @@ -21,7 +21,7 @@ Plug in the necessary inputs to determine if the container being built should be
## Example workflow
```yaml
name: Ship it!
on:
on:
workflow_dispatch:
inputs:
package:
Expand All @@ -47,4 +47,4 @@ jobs:
run: |
echo "Is it latest? Survey says: ${{ steps.is_latest.outputs.latest }} !"
echo "Is it minor.latest? Survey says: ${{ steps.is_latest.outputs.minor_latest }} !"
```
```
2 changes: 1 addition & 1 deletion .github/actions/latest-wrangler/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
new_version:
description: "Semver of the container being built (I.E. 1.0.4)"
required: true
gh_token:
gh_token:
description: "Auth token for github (must have view packages scope)"
required: true
outputs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Ship it!
on:
on:
workflow_dispatch:
inputs:
package:
Expand All @@ -23,4 +23,4 @@ jobs:
gh_token: ${{ secrets.GITHUB_TOKEN }}
- name: Print the results
run: |
echo "Is it latest? Survey says: ${{ steps.is_latest.outputs.latest }} !"
echo "Is it latest? Survey says: ${{ steps.is_latest.outputs.latest }} !"
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"version_number": "1.0.1",
"package": "dbt-redshift"
}
}
}
15 changes: 6 additions & 9 deletions .github/actions/latest-wrangler/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Log info if we don't get a 200
if package_request.status_code != 200:
print(f"Call to GH API failed: {package_request.status_code} {package_meta['message']}")

# Make an early exit if there is no matching package in github
if package_request.status_code == 404:
if halt_on_missing:
Expand All @@ -35,12 +35,11 @@
sys.exit(0)

# TODO: verify package meta is "correct"
# https://github.com/dbt-labs/dbt-core/issues/4640
# https://github.com/dbt-labs/dbt-core/issues/4640

# map versions and tags
version_tag_map = {
version["id"]: version["metadata"]["container"]["tags"]
for version in package_meta
version["id"]: version["metadata"]["container"]["tags"] for version in package_meta
}

# is pre-release
Expand All @@ -63,9 +62,7 @@
if f"{new_version.major}.{new_version.minor}.latest" in tags:
# Similar to above, only now we expect exactly two tags:
# major.minor.patch and major.minor.latest
current_minor_latest = parse(
[tag for tag in tags if "latest" not in tag][0]
)
current_minor_latest = parse([tag for tag in tags if "latest" not in tag][0])
else:
current_minor_latest = False

Expand All @@ -79,7 +76,8 @@ def is_latest(

:param pre_rel: Wether or not the version of the new container is a pre-release
:param new_version: The version of the new container
:param remote_latest: The version of the previously identified container that's already tagged latest or False
:param remote_latest: The version of the previously identified container that's
already tagged latest or False
"""
# is a pre-release = not latest
if pre_rel:
Expand All @@ -95,4 +93,3 @@ def is_latest(

print(f"::set-output name=latest::{latest}")
print(f"::set-output name=minor_latest::{minor_latest}")

2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# **what?**
# When a PR is merged, if it has the backport label, it will create
# When a PR is merged, if it has the backport label, it will create
# a new PR to backport those changes to the given branch. If it can't
# cleanly do a backport, it will comment on the merged PR of the failure.
#
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jira-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name: Jira Issue Creation
on:
issues:
types: [opened, labeled]

permissions:
issues: write

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/jira-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name: Jira Label Mirroring
on:
issues:
types: [labeled, unlabeled]

permissions:
issues: read

Expand All @@ -24,4 +24,3 @@ jobs:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

2 changes: 1 addition & 1 deletion .github/workflows/jira-transition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
secrets:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# **what?**
# Take the given commit, run unit tests specifically on that sha, build and
# Take the given commit, run unit tests specifically on that sha, build and
# package it, and then release to GitHub and PyPi with that specific build

# **why?**
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:


github-release:
name: GitHub Release
name: GitHub Release

needs: test-build

Expand All @@ -155,7 +155,7 @@ jobs:
with:
name: dist
path: '.'

# Need to set an output variable because env variables can't be taken as input
# This is needed for the next step with releasing to GitHub
- name: Find release type
Expand All @@ -179,7 +179,7 @@ jobs:
dbt_core-${{github.event.inputs.version_number}}-py3-none-any.whl
dbt-postgres-${{github.event.inputs.version_number}}.tar.gz
dbt-core-${{github.event.inputs.version_number}}.tar.gz

pypi-release:
name: Pypi release

Expand All @@ -188,12 +188,12 @@ jobs:
needs: github-release

environment: PypiProd
steps:
steps:
- uses: actions/download-artifact@v2
with:
name: dist
path: 'dist'

- name: Publish distribution to PyPI
uses: pypa/[email protected]
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Docker images for dbt are used in a number of important places throughout the dbt ecosystem. This is how we keep those images up-to-date.

# **when?**
# This is triggered manually
# This is triggered manually

# **next steps**
# - build this into the release workflow (or conversly, break out the different release methods into their own workflow files)
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
name: Set up docker image builder
runs-on: ubuntu-latest
needs: [get_version_meta]
steps:
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

Expand Down Expand Up @@ -110,4 +110,4 @@ jobs:
build-args: |
${{ steps.build_arg.outputs.build_arg_name }}_ref=${{ steps.build_arg.outputs.build_arg_value }}@v${{ github.event.inputs.version_number }}
tags: |
ghcr.io/dbt-labs/${{ github.event.inputs.package }}:latest
ghcr.io/dbt-labs/${{ github.event.inputs.package }}:latest
14 changes: 7 additions & 7 deletions .github/workflows/schema-check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# **what?**
# Compares the schema of the dbt version of the given ref vs
# Compares the schema of the dbt version of the given ref vs
# the latest official schema releases found in schemas.getdbt.com.
# If there are differences, the workflow will fail and upload the
# diff as an artifact. The metadata team should be alerted to the change.
Expand Down Expand Up @@ -37,20 +37,20 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Checkout dbt repo
uses: actions/[email protected]
with:
path: ${{ env.DBT_REPO_DIRECTORY }}

- name: Checkout schemas.getdbt.com repo
uses: actions/[email protected]
with:
uses: actions/[email protected]
with:
repository: dbt-labs/schemas.getdbt.com
ref: 'main'
ssh-key: ${{ secrets.SCHEMA_SSH_PRIVATE_KEY }}
path: ${{ env.SCHEMA_REPO_DIRECTORY }}

- name: Generate current schema
run: |
cd ${{ env.DBT_REPO_DIRECTORY }}
Expand All @@ -59,7 +59,7 @@ jobs:
pip install --upgrade pip
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
# Do a git diff to find any changes
# Ignore any date or version changes though
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/structured-logging-schema-check.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This Action checks makes a dbt run to sample json structured logs
# and checks that they conform to the currently documented schema.
#
#
# If this action fails it either means we have unintentionally deviated
# from our documented structured logging schema, or we need to bump the
# version of our structured logging and add new documentation to
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test/.actrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
2 changes: 1 addition & 1 deletion .github/workflows/test/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.secrets
.secrets
2 changes: 1 addition & 1 deletion .github/workflows/test/.secrets.EXAMPLE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
GITHUB_TOKEN=GH_PERSONAL_ACCESS_TOKEN_GOES_HERE
GITHUB_TOKEN=GH_PERSONAL_ACCESS_TOKEN_GOES_HERE
2 changes: 1 addition & 1 deletion .github/workflows/test/inputs/release_docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"version_number": "1.0.1",
"package": "dbt-postgres"
}
}
}
20 changes: 10 additions & 10 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# **what?**
# This workflow will take a version number and a dry run flag. With that
# it will run versionbump to update the version number everywhere in the
# it will run versionbump to update the version number everywhere in the
# code base and then generate an update Docker requirements file. If this
# is a dry run, a draft PR will open with the changes. If this isn't a dry
# run, the changes will be committed to the branch this is run on.

# **why?**
# This is to aid in releasing dbt and making sure we have updated
# This is to aid in releasing dbt and making sure we have updated
# the versions and Docker requirements in all places.

# **when?**
# This is triggered either manually OR
# This is triggered either manually OR
# from the repository_dispatch event "version-bump" which is sent from
# the dbt-release repo Action

Expand All @@ -25,10 +25,10 @@ on:
is_dry_run:
description: 'Creates a draft PR to allow testing instead of committing to a branch'
required: true
default: 'true'
default: 'true'
repository_dispatch:
types: [version-bump]

jobs:
bump:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -57,26 +57,26 @@ jobs:
run: |
python3 -m venv env
source env/bin/activate
pip install --upgrade pip
pip install --upgrade pip

- name: Create PR branch
if: ${{ steps.variables.outputs.IS_DRY_RUN == 'true' }}
run: |
git checkout -b bumping-version/${{steps.variables.outputs.VERSION_NUMBER}}_$GITHUB_RUN_ID
git push origin bumping-version/${{steps.variables.outputs.VERSION_NUMBER}}_$GITHUB_RUN_ID
git branch --set-upstream-to=origin/bumping-version/${{steps.variables.outputs.VERSION_NUMBER}}_$GITHUB_RUN_ID bumping-version/${{steps.variables.outputs.VERSION_NUMBER}}_$GITHUB_RUN_ID

# - name: Generate Docker requirements
# run: |
# source env/bin/activate
# pip install -r requirements.txt
# pip install -r requirements.txt
# pip freeze -l > docker/requirements/requirements.txt
# git status

- name: Bump version
run: |
source env/bin/activate
pip install -r dev-requirements.txt
pip install -r dev-requirements.txt
env/bin/bumpversion --allow-dirty --new-version ${{steps.variables.outputs.VERSION_NUMBER}} major
git status

Expand Down
Loading