-
Notifications
You must be signed in to change notification settings - Fork 431
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
Fix Policies Cloning #3971
Merged
Merged
Fix Policies Cloning #3971
Conversation
This file contains 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
geyslan
force-pushed
the
fix-policies-clone
branch
from
April 11, 2024 18:30
6c03a52
to
e69964c
Compare
Use Set instead of Add to preserve the order of the policies. This also removes the unnecessary call to compute() method as it is already called by the Set inners.
To fill userlandPolicies, we need to iterate over the array of policies to preserve the order, since the map iteration order is not guaranteed.
Depending o the use case, the iteration of the policies can be done by allFromArray() or allFromMap().
geyslan
force-pushed
the
fix-policies-clone
branch
from
April 12, 2024 20:37
e69964c
to
9f2085f
Compare
It is a function type that can be used to handle the value of a filter when it is parsed. This also removes a dead code.
geyslan
force-pushed
the
fix-policies-clone
branch
from
April 12, 2024 20:50
9f2085f
to
6185bdc
Compare
geyslan
changed the title
fix(policy): Policies Clone method
fix(policy): Policies Cloning
Apr 12, 2024
yanivagman
approved these changes
Apr 15, 2024
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
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.
1. Explain what the PR does
6185bdc chore: improve Clone tests by using google/go-cmp
2273675 chore(filters): add ValueHandler function type
02e4a12 chore(policy): add inner methods for iteration
392535a fix(policy): iterate array to preserve order
239087a fix(policy): Policies Clone method
2273675 chore(filters): add ValueHandler function type
02e4a12 chore(policy): add inner methods for iteration
392535a fix(policy): iterate array to preserve order
239087a fix(policy): Policies Clone method
2. Explain how to test it
3. Other comments