-
Notifications
You must be signed in to change notification settings - Fork 4
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
Define GitHub actions workflows for building and testing dbt #50
Define GitHub actions workflows for building and testing dbt #50
Conversation
4dbf505
to
f833271
Compare
5f43129
to
3ff6d98
Compare
7be8890
to
567f63f
Compare
…test_dbt workflow
567f63f
to
98a42ef
Compare
…tions-workflows-for-building-the-dbt-dag-and-running-tests
This is finally ready for a review! Probably best if both @dfsnow and @wrridgeway take a look, since the workflows introduced in this PR will operate as the runners of our data integrity tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall amazing work @jeancochrane! This couldn't have been easy to debug. Just a couple outstanding blockers and we're good to go.
inputs: | ||
dbt_project_dir: | ||
description: Path to the directory containing the dbt project. | ||
required: false | ||
default: ./dbt | ||
requirements_file_path: | ||
description: Path to Python requirements file. | ||
required: false | ||
default: ./dbt/requirements.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually didn't know you could re-use in-repo actions. I sillily used a composable workflow in PTAXSIM instead. Will fix: ccao-data/ptaxsim#15. Thanks for teaching me something today!
dbt/models/default/schema.yml
Outdated
@@ -31,15 +31,15 @@ models: | |||
- pin | |||
- year | |||
config: | |||
error_if: ">280655" | |||
error_if: ">280659" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (non-blocking): Some of these are likely just under-specified tests, but I agree it's going to be a problem. Grab @wrridgeway this week for a review/debugging session of the current tests. He knows more than anyone but Mirella about the horrors of our changing data.
4148bb1
to
cef322a
Compare
This is necessary to support running test_dbt_models against the data-catalog branch, which is our plan while we continue to develop on that long-lived branch.
Closing this temporarily to test the new |
This is ready for another look @dfsnow! I took just about all of your advice; the only thread with an open question is #50 (comment). |
…et HEAD_REF env var It turns out that we can't override the GITHUB_HEAD_REF variable in a GitHub Actions workflow, which means we can't set it in order to treat the data-catalog branch environment as a CI target. To get around this, this commit changes up the generate_schema_name macro to read from a new HEAD_REF env var instead of GITHUB_HEAD_REF, and then factors out a configure_dbt_environment composite action that our dbt workflows can use to set this environment variable appropriately.
Alright @dfsnow, this is ready again! I made one change that wasn't part of our PR discussion after realizing that we can't override the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @jeancochrane, thanks for making those changes! Merge at your leisure
This PR sets up GitHub Actions workflows for two particular cases that we want to support when building and testing dbt:
build_and_test_dbt
)test_dbt_models
)service-sqoop-iasworld
to run tests after pulling in new data (see e.g.: [Data catalog] Updaterun.sh
to run dbt tests via the GitHub Actions API after import service-sqoop-iasworld#1)Closes #31.