fix(deploy): override actions wait commands#4531
Conversation
Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
✅ Deploy Preview for zarf-docs canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
AustinAbro321
left a comment
There was a problem hiding this comment.
Functionality looks good, some comments on architecture
src/api/v1alpha1/package.go
Outdated
| return slices.Collect(maps.Keys(uniqueNamespaces)) | ||
| } | ||
|
|
||
| // UpdateAllComponentNamespaces updates all existing chart/manifest namespaces to the provided one |
There was a problem hiding this comment.
Given that we're taking the stance that it's a bug that wait actions are not updated. I'd be in favor of either removing it or adding "original" as a parameter instead of a separate "UpdateAllComponentNamespacesByName".
Another option to avoid a breaking change would to deprecate this function and point to UpdateAllComponentNamespacesByName
| } | ||
|
|
||
| // UpdateAllComponentNamespacesByName updates all matching namespaces to the provided one | ||
| func (pkg ZarfPackage) UpdateAllComponentNamespacesByName(original, target string) { |
There was a problem hiding this comment.
I feel that pkg/packager may be a better place for this function. We're de-coupling the function from the logic of namespace overrides. For instance, charts or manifest namespaces won't be updated if they don't equal the original. In practice this won't ever happen, though I can see why this might be added to this function given that it's in the data layer.
Still, this feels like a code smell to me, I think we might be better served by moving this function to the logic layer (pkg/packager), given that it's use case is tightly coupled to the namespace overrides logic. Having the function at this layer will also reduce duplication as we introduce new API versions.
Signed-off-by: Brandt Keller <brandt.keller@defenseunicorns.com>
Description
Currently namespace overrides only detects and/or modifies charts and manifests. This PR adds support for actions wait definitions.
Related Issue
Fixes #4388
Checklist before merging