-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Adds 'buildable' selection mode #6366
Conversation
@@ -173,12 +174,14 @@ class BaseSelectionGroup(dbtClassMixin, Iterable[SelectionSpec], metaclass=ABCMe | |||
def __init__( | |||
self, | |||
components: Iterable[SelectionSpec], | |||
indirect_selection: IndirectSelection = IndirectSelection.Eager, |
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.
In case this is confusing - in selector.py
on line 138 we need to get the indirect selection method from a composite spec (a union, difference, or intersection). This change here, and the changes in cli.py, add the indirect selection method to these composite specs through the BaseSelectionGroup so we can get them at that line in selector.py. Previously the indirect selection method was only on the SelectionCriteria object.
It's possible I misunderstood how something works here, but I couldn't find an easier way to get the indirect selection method at that point.
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.
Thanks for this note, really helpful!
066f031
to
e1faafb
Compare
@AGPapa Excited about the work you've done on this! 🤩 |
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.
LGTM! Thanks @AGPapa for adding this new selection method!
@@ -173,12 +174,14 @@ class BaseSelectionGroup(dbtClassMixin, Iterable[SelectionSpec], metaclass=ABCMe | |||
def __init__( | |||
self, | |||
components: Iterable[SelectionSpec], | |||
indirect_selection: IndirectSelection = IndirectSelection.Eager, |
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.
Thanks for this note, really helpful!
resolves #6365
Description
This PR adds a new selection mode called 'buildable'. This selection mode runs tests if the test's parents are selected - or if the tests's parents are ancestors of what is selected. This change makes it easier to develop part of the graph and test changes on it. See the issue for a more detailed description.
I am able to make changes to this PR in response to feedback! As mentioned in the issue, I think that some or all of these changes could be made directly to the existing cautious mode, without making a new selection mode at all.
Checklist
buildable
indirect selection mode docs.getdbt.com#2568changie new
to create a changelog entry