feat!: filter package components with strategy interface#2321
Merged
Conversation
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
✅ Deploy Preview for zarf-docs canceled.
|
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
lucasrod16
reviewed
Feb 26, 2024
Contributor
lucasrod16
left a comment
There was a problem hiding this comment.
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.
AustinAbro321
requested changes
Mar 1, 2024
Co-authored-by: Lucas Rodriguez <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Member
AustinAbro321
left a comment
There was a problem hiding this comment.
A few small things mostly questions on my end
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
lucasrod16
previously approved these changes
Mar 18, 2024
Racer159
suggested changes
Mar 19, 2024
Racer159
suggested changes
Mar 19, 2024
Signed-off-by: razzle <[email protected]>
Signed-off-by: razzle <[email protected]>
AustinAbro321
previously approved these changes
Mar 20, 2024
Signed-off-by: razzle <[email protected]>
Racer159
approved these changes
Mar 21, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Consolidate component filtering logic into a
filterspackage. 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.PackageSourceto reflect the new behavior whereupon thezarf.yamlis loaded into memory within the sources load operations. This allows forfiltering to take place during load and for thezarf.yamlin memory to reflect these filter operations.Related Issue
Fixes #2320
Type of change
Checklist before merging