-
Notifications
You must be signed in to change notification settings - Fork 157
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
feat!: filter package components with strategy interface #2321
Conversation
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
✅ Deploy Preview for zarf-docs canceled.
|
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong opinion on whether filter implementations return the strategy interface or the implementation struct.
My preference would be to return the concrete implementation struct because it makes the code a bit easier to navigate imo. For example, when I click into Apply()
in vs code in the client code, it takes me to the interface method signature instead of the implementation. It would be nice to be taken directly to the implementation, but not a big enough reason to outweigh other factors.
Co-authored-by: Lucas Rodriguez <lucas.rodriguez9616@gmail.com>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small things mostly questions on my end
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Signed-off-by: razzle <harry@razzle.cloud>
Description
Consolidate component filtering logic into a
filters
package. Each filter is an implementation ofPublic construction functions return instances of this interface not instances of their underlying structs. Consumers should be fully cognizant of which filter they are using, and should not be making a common wrapper function (eg.
NewFilter(args...)
to dynamically return a filter.ex:
BREAKING CHANGES: This changes the interface signatures on
sources.PackageSource
to reflect the new behavior whereupon thezarf.yaml
is loaded into memory within the sources load operations. This allows forfilter
ing to take place during load and for thezarf.yaml
in memory to reflect these filter operations.Related Issue
Fixes #2320
Type of change
Checklist before merging