Skip to content
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

stacks: allow removed blocks to target components in nested stacks #36727

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

liamcervante
Copy link
Member

This PR updates removed blocks in stacks so that you can target components within nested stacks. This means that users can change input values into embedded stacks that might edit the number of components internally, and add removed blocks within the root stack that target any components removed by the change.

Unfortunately, this is a very complicated change - so perhaps I can sit down with anyone who wants to review this and go through it with them.

The general approach is that the from attribute of removed blocks now resolves to a full absolute address. Stack instances are now initialised with any external removed blocks in the constructor. So parent stacks pass in any removed blocks they have that target child stacks directly into the child stack. Then the removed blocks are still processed by the stack that actually contains the components that they target, this allows us to ensure that component and removed blocks don't target the same instance easily, and that removed blocks defined locally don't clash with removed blocks defined externally.

There is a "very large ™️" change to the plan_test file, that involves moving tests around to group similar tests into the same execution block to simplify things overall. For that, I am sorry.

@liamcervante liamcervante requested a review from a team as a code owner March 20, 2025 12:25
@liamcervante liamcervante added the no-changelog-needed Add this to your PR if the change does not require a changelog entry label Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog-needed Add this to your PR if the change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant