Skip to content

Conversation

jrajahalme
Copy link
Member

@jrajahalme jrajahalme commented Jun 19, 2023

Keep track of all contributing rule's labels in merged map state entries. Without this it is impossible to reliably test DerivedFromRules in unit tests, as the value used for entries added by ToMapState depends on Go map iteration order which varies across runs.

Keep track of all contributing rule's labels in merged map state entries.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
@jrajahalme jrajahalme added kind/enhancement This would improve or streamline existing functionality. sig/policy Impacts whether traffic is allowed or denied based on user-defined policies. release-note/misc This PR makes changes that have no direct user impact. labels Jun 19, 2023
@jrajahalme jrajahalme requested a review from a team as a code owner June 19, 2023 09:06
@jrajahalme jrajahalme requested a review from aditighag June 19, 2023 09:06
@jrajahalme
Copy link
Member Author

/test

Copy link
Member

@aditighag aditighag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MergeReferences is in the hot path of policy computations logic.

Without this it is impossible to reliably test DerivedFromRules in unit tests

If this is only needed for unit tests, can we match DerivedFromRules in unit tests without relying on ordering? Also, I'm not seeing any Fixes tag, so is this change strictly required?

@github-actions
Copy link

This pull request has been automatically marked as stale because it
has not had recent activity. It will be closed if no further activity
occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. label Jul 28, 2023
@github-actions
Copy link

This pull request has not seen any activity since it was marked stale.
Closing.

@github-actions github-actions bot closed this Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement This would improve or streamline existing functionality. release-note/misc This PR makes changes that have no direct user impact. sig/policy Impacts whether traffic is allowed or denied based on user-defined policies. stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants