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.
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
fix #7502: write run_results.json for run operation #7655
fix #7502: write run_results.json for run operation #7655
Changes from 7 commits
a500e37
17d5e0d
252d4bc
8ce74ff
99c4523
f50328f
ac5e0c0
c3163d8
c38d618
e9cfe93
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 am assuming you don't need to define the name here? the
RESULT_FILE_NAME
should be defined somewhere else?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.
Nope, they're defined inline:
dbt-core/core/dbt/task/runnable.py
Line 58 in dffbb6a
dbt-core/core/dbt/task/freshness.py
Line 30 in dffbb6a
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.
Maybe we should put those constants in base task file or somewhere and import them in other tasks so the string is only being defined once. I will leave it to you to either do it here, a follow up PR, or not do anything.
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'll leave it as-is for now.
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.
Why this test is added? Seems like a test for Run not runOperation
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.
The
run-operation
is a pre-hook on the model, so I'm testing two things:run_results.json
I'm going to leave this test in unless you have a strong objection here.
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.
Leaving the test makes sense! Can we rename the test to something like run model with operation and add a bit more comment about why run operation should not be in results in this case?
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.
@jtcohen6 Can you confirm this is the expected behavior here? If not, I can file a follow-up ticket to fix.
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.
Discussed live: Macros run as pre/post hooks on a single model aren't recorded in
run_results.json
— that tracks for me, given how the run results artifact works today. (Run results also don't account for multi-step materializations.)