Fix!: Add project in environment statements for consistent multi-repo plans#4966
Fix!: Add project in environment statements for consistent multi-repo plans#4966themisvaltinos merged 1 commit intomainfrom
Conversation
| ) | ||
|
|
||
| # Load environment statements from state for projects not in current load | ||
| if any(self._projects): |
There was a problem hiding this comment.
this is kind of a side note, but how do you delete a project?
There was a problem hiding this comment.
is a migration necessary for this?
There was a problem hiding this comment.
this is kind of a side note, but how do you delete a project?
good question, I was wondering the same. so I believe the only way currently is to remove from the project we want to remove the local models, macros, audits, before all/after all hooks and then run plan including this project in the command
There was a problem hiding this comment.
is a migration necessary for this?
i was thinking not since with the current logic multi-repo setups using environment statements wouldn’t work correctly as when someone ran a plan with all projects and then again with individual ones as their statements would be deleted as described in the issue. and since the state doesn’t have the information to tell us which project the hooks belong to, we’d need to reload each project from scratch to determine where they belong so without running plan we couldn't load this information in the state's statements
There was a problem hiding this comment.
let's add a to do to delete projects i guess
This update adds the
projectinformation if it's available in a multi-repo setup in the environment statements so that plans triggered from one repo retain the other repos statements from state (mirroring the logic we have for models of a multi repo setup), fixes: #4952