Skip unresolved group members during optimistic publish replay - #32485
Skip unresolved group members during optimistic publish replay#32485MaxRink wants to merge 6 commits into
Conversation
d0f5603 to
da58a4d
Compare
I'm wondering how this can happen? Sounds like inconsistency in the |
eced5d6 to
d9c015c
Compare
7354dc3 to
0b6899f
Compare
luantaraschi
left a comment
There was a problem hiding this comment.
I found one mismatch between the patch and the issue it claims to fix. In the Zigbee2MQTT 2.10.1 source referenced by #31951, line 192 is endpointOrGroupID = localTarget.ID. The reported Shelly failure therefore occurs after re.endpoint(endpointName) returns undefined. This patch and its regression test exercise a different path: scene_recall on a group with an unresolved entry in converter-produced membersState.
I ran the new targeted test and pnpm run check; both passed. The defensive group handling looks consistent, but the test does not reproduce the switch_type_sw1 or switch_mode_sw1 failure from #31951. Could you either add a reproduction for that Shelly endpoint path, or remove Fixes #31951 and link this change to the unresolved-group scenario it covers?
Avoid per-member warning logs when unresolved members are skipped and reuse Group.membersDevices() for membersState replay in publish.
0b6899f to
75ef67c
Compare
Per the message in this thread, optimistic group publish could crash while replaying membersState if one group member no longer resolves.
This adds a defensive guard so unresolved group members are skipped with a warning instead of dereferencing undefined.ID.
Fixes #31951.