Page MenuHomePhabricator

[lib] Fix state check with new ID schema
ClosedPublic

Authored by michal on Jun 28 2023, 4:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 2:25 PM
Unknown Object (File)
Sat, Nov 23, 2:25 PM
Unknown Object (File)
Sat, Nov 23, 1:20 PM
Unknown Object (File)
Nov 18 2024, 2:41 AM
Unknown Object (File)
Nov 11 2024, 12:48 AM
Unknown Object (File)
Nov 11 2024, 12:48 AM
Unknown Object (File)
Nov 11 2024, 12:47 AM
Unknown Object (File)
Nov 5 2024, 2:11 AM
Subscribers

Details

Summary

https://linear.app/comm/issue/ENG-245/make-sure-state-sync-mechanism-works-after-client-id-migration
There was bug in the id schema conversion during the state check. The async function returned by the getClientResponsesSelector modified the arguments gotten from the input selectors. That meant if the async function was called multiple times (and redux state didn't change so it wasn't regenerated) it would try to convert the already converted state. This diff moves the conversion outside of the async function so it's done only once.

Test Plan

Check that if the state sync runs for the second time without redux changes no errors are thrown. (that was what was triggering the errors without this diff)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable