Deploy dbt model dependencies before building daily models #467
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in https://github.com/ccao-data/aws-infrastructure/pull/26#discussion_r1609011282, there's currently an edge case in our dbt model dependency deployment pipeline that could bite us in the future. The problem is the combination of these three aspects of the pipeline:
build-and-test-dbt
workflow, which runs on PRs being merged to the main branchbuild-daily-dbt-models
workflow, which is scheduled to run once a dayAs such, it's possible for
build-daily-dbt-models
to run without model dependencies existing, if they happen to have expired before it runs.This PR fixes this edge case by updating
build-daily-dbt-models
to deploy model dependencies in the same way thatbuild-and-test-dbt
does.I tested this PR by manually dispatching
build-daily-dbt-models
from this branch. (I ran the action just long enough to confirm that the deployment step succeeds, but cancelled it at that point, so the workflow appears to have failed.) Here's evidence that the deployment step succeeds: https://github.com/ccao-data/data-architecture/actions/runs/9193740823/job/25286017600#step:5:28