fix: add cluster wait actions to RequiresCluster - #5225
Conversation
Signed-off-by: Micah Nagel <micah.nagel@defenseunicorns.com>
✅ Deploy Preview for zarf-docs canceled.
|
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
| hasRepos := len(c.Repos) > 0 | ||
| hasDataInjections := len(c.DataInjections) > 0 | ||
| hasHealthChecks := len(c.HealthChecks) > 0 | ||
| hasClusterWait := c.Actions.hasClusterWait() |
There was a problem hiding this comment.
Agree on the correctness here - a component that has a cluster wait DOES require cluster access.
I am stewing on how to capture the implications of requiring state now. As this change now requires setting up state when the wait action doesn't strictly require as much...
There was a problem hiding this comment.
I think this may require broader changes as the use of component.RequiresCluster is used during deploy/remove to manage state - whereas I don't think that a component solely comprised of a cluster wait should need state to be initialized (or the requirements such as RBAC) to do so.
I think we may want to distinguish as much between "needs cluster" and "needs state" but that is broader to your changes.
I believe currently a cluster wait can run without requiring zarf initialization and this would break that as-is.
Description
Cluster wait actions also require a cluster but were missing from the
RequiresClusterchecks in both api versions.Checklist before merging