Skip to content

Fix!: Add project in environment statements for consistent multi-repo plans#4966

Merged
themisvaltinos merged 1 commit intomainfrom
themis/multirepo_statements
Jul 14, 2025
Merged

Fix!: Add project in environment statements for consistent multi-repo plans#4966
themisvaltinos merged 1 commit intomainfrom
themis/multirepo_statements

Conversation

@themisvaltinos
Copy link
Contributor

This update adds the project information 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

)

# Load environment statements from state for projects not in current load
if any(self._projects):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is kind of a side note, but how do you delete a project?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is a migration necessary for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add a to do to delete projects i guess

@themisvaltinos themisvaltinos merged commit ff45e03 into main Jul 14, 2025
27 checks passed
@themisvaltinos themisvaltinos deleted the themis/multirepo_statements branch July 14, 2025 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-repo environment statements and dependencies change depending on which repo planned

2 participants