-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 RR_1.1 to add_all_groups to add right amount of groups per endpoint #25767
Fix RR_1.1 to add_all_groups to add right amount of groups per endpoint #25767
Conversation
This bring code in line to what is actually written in the RR_1.1 spec. There was a bug in add_all_groups that wrote all wrote all the groups to each of the endpoints instead, leading to writting more then the maximum of supported groups per fabric.
PR #25767: Size comparison from 934a6b1 to a384917 Decreases (2 builds for cc32xx, qpg)
Full report (5 builds for cc32xx, linux, qpg)
|
@@ -644,11 +644,17 @@ async def add_all_groups(self, | |||
|
|||
base_groups_per_endpoint: int = math.floor(groups_per_fabric / len(group_endpoints)) | |||
groups_remainder: int = groups_per_fabric % len(group_endpoints) | |||
fabric_group_index: int = 0 | |||
|
|||
group_id_list = [group_id for group_id in (group_key_map[client_idx])] |
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.
group_id_list = [group_id for group_id in (group_key_map[client_idx])] | |
group_id_list = list(group_key_map[client_idx]) |
might be clearer, but either way. And maybe call it group_id_list_copy
?
@@ -644,11 +644,17 @@ async def add_all_groups(self, | |||
|
|||
base_groups_per_endpoint: int = math.floor(groups_per_fabric / len(group_endpoints)) | |||
groups_remainder: int = groups_per_fabric % len(group_endpoints) | |||
fabric_group_index: int = 0 | |||
|
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.
After chatting on this issue we have filed https://github.com/CHIP-Specifications/chip-test-plans/issues/2502. As a result the code here will need to change again to properly test. As a results I am moving this PR to a draft to wait on feedback on if https://github.com/CHIP-Specifications/chip-test-plans/issues/2502 is in fact what we want Step 14 of this test to be actually doing.
LGTM % comment |
This PR is incorporated into #25789 which contains additional fixes to resolve the issue |
This bring code in line to what is actually written in the RR_1.1 spec. There was a bug in add_all_groups that wrote all wrote all the groups to each of the endpoints instead, leading to writting more then the maximum of supported groups per fabric.
One of the 4 PRs needed to fix #25532