-
Notifications
You must be signed in to change notification settings - Fork 177
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 adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST
and LoadMethod.CUSTOM
#615
Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST
and LoadMethod.CUSTOM
#615
Conversation
…ibute is not assigned to the node correctly
👷 Deploy Preview for amazing-pothos-a3bca0 processing.
|
Thank you very much for working on this, @edgga ! Please let us know if you'd like reviews. We'll assume that while it is in the draft, it's a work in progress, and we shouldn't review it yet. |
Hello, @tatiana, I made a minor change that assigns tags to tests based on their parent model. It works as expected but I am not sure if this is the best approach. Would love to get some feedback! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #615 +/- ##
=======================================
Coverage 93.37% 93.38%
=======================================
Files 53 53
Lines 2113 2115 +2
=======================================
+ Hits 1973 1975 +2
Misses 140 140
☔ View full report in Codecov by Sentry. |
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.
@edgga This seems like a very pragmatic solution to the problem, and it seems it allows us to have consistent behaviour on test tag-selection when using all the supported LoadMethod
. Do you see any downside to this approach?
It would be great if we could add a test!
@tatiana I could not think of any downsides, but it's very possible I haven't thought about every existing use case. Right, I could add some tests, I would like to clarify - should I only add |
@edgga Since ATM, this change is meant to solve a custom selection issue, we can probably have it where you've implemented it, for now. In the future, if we see the need for it, we can move this change to the |
…sts based on the has_test attribute + specifying tag in manifest.json for a couple of models.
@tatiana, I have added a pretty basic test that checks the general functionality of the has_test attribute update when node selection based on a TAG is used. Not sure if that's enough though. If you have any pointers on what else I need to do to get this merged, I am all ears, I would love to have this merged next week. |
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.
@edgga thank you very much. This is looking very good!
I left a minor comment, and we'll release this as part of 1.2.2, next week.
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.
Thank you very much, @edgga !
LoadMethod.DBT_MANIFEST
and LoadMethod.CUSTOM
…nd `LoadMethod.CUSTOM` (#615) Resolving issues with the DBT_MANIFEST/CUSTOM load methods when the has_test attribute is not assigned to the node correctly. ## Description When a tag selector is used, all tests are filtered out because of the DbtResourceType.TEST node does not have any information about tags. To bypass this limitation - tags are assigned to tests based on their parent model. ## Related Issue(s) Closes: #580 Co-authored-by: edgarasnavickas <[email protected]> (cherry picked from commit 58de67e)
Bug fixes * Support ProjectConfig.dbt_project_path = None & different paths for Rendering and Execution by @MrBones757 in #634 * Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST and LoadMethod.CUSTOM by @edgga in #615 Others * Add pre-commit hook for McCabe max complexity check and fix errors by @jbandoro in #629 * Update contributing docs for running integration tests by @jbandoro in #638 * Fix CI issue running integration tests by @tatiana in #640 and #644 * pre-commit updates in #637
…nd `LoadMethod.CUSTOM` (#615) Resolving issues with the DBT_MANIFEST/CUSTOM load methods when the has_test attribute is not assigned to the node correctly. ## Description When a tag selector is used, all tests are filtered out because of the DbtResourceType.TEST node does not have any information about tags. To bypass this limitation - tags are assigned to tests based on their parent model. ## Related Issue(s) Closes: #580 Co-authored-by: edgarasnavickas <[email protected]> (cherry picked from commit 58de67e)
Bug fixes * Support ProjectConfig.dbt_project_path = None & different paths for Rendering and Execution by @MrBones757 in #634 * Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST and LoadMethod.CUSTOM by @edgga in #615 Others * Add pre-commit hook for McCabe max complexity check and fix errors by @jbandoro in #629 * Update contributing docs for running integration tests by @jbandoro in #638 * Fix CI issue running integration tests by @tatiana in #640 and #644 * pre-commit updates in #637
Bug fixes * Support ProjectConfig.dbt_project_path = None & different paths for Rendering and Execution by @MrBones757 in #634 * Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST and LoadMethod.CUSTOM by @edgga in #615 Others * Add pre-commit hook for McCabe max complexity check and fix errors by @jbandoro in #629 * Update contributing docs for running integration tests by @jbandoro in #638 * Fix CI issue running integration tests by @tatiana in #640 and #644 * pre-commit updates in #637 (cherry picked from commit fa0620a)
Bug fixes * Support ProjectConfig.dbt_project_path = None & different paths for Rendering and Execution by @MrBones757 in astronomer#634 * Fix adding test nodes to DAGs built using LoadMethod.DBT_MANIFEST and LoadMethod.CUSTOM by @edgga in astronomer#615 Others * Add pre-commit hook for McCabe max complexity check and fix errors by @jbandoro in astronomer#629 * Update contributing docs for running integration tests by @jbandoro in astronomer#638 * Fix CI issue running integration tests by @tatiana in astronomer#640 and astronomer#644 * pre-commit updates in astronomer#637 (cherry picked from commit fa0620a)
Resolving issues with the DBT_MANIFEST/CUSTOM load methods when the has_test attribute is not assigned to the node correctly.
Description
When a tag selector is used, all tests are filtered out because of the DbtResourceType.TEST node does not have any information about tags. To bypass this limitation - tags are assigned to tests based on their parent model.
Related Issue(s)
Closes #580
Breaking Change?
The change should not be breaking anything.
Checklist