-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Include children when targeting resources with children. #7605
Conversation
5b6afb5
to
bd0348c
Compare
--target-dependents
to include children.9ea9bb0
to
fb57f06
Compare
fb57f06
to
14a4b7b
Compare
@pgavlin I know we discussed solving this at the CLI level - is there any drawback to fixing it here? |
14a4b7b
to
2f5ef02
Compare
Tagged @lukehoban and @infin8x to consider the change from default behavior and how we want to handle that. |
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.
Excellent tests!
One nit + one suggestion re: finding the transitive children of a resource.
6577c63
to
6492796
Compare
6492796
to
08d9eaf
Compare
Description
Prior to this change, when a component was targeted without including all of its children in the list of targets, it would result in an error like below:
However, when a component is targeted, it is logical that the user intended to also target the component's children, since the component itself is a wrapper for all of its children. This PR changes the behavior to include children when a component is targeted instead of erroring.
Note: This changes the default behavior of
--target
to include a component's children. Should this be behind a flag (should we be including this in--target-dependents
)? Do we want some way to preserve the old behavior?Fixes #4032
Checklist