-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[native] Update
updateRolesAndPermissions
to only handle `LegacyRaw…
…ThreadInfos` Summary: Similar to what we did in D10283, we're "lying" to `flow` and saying that `updatedRolesAndPermissions` (which we also rename `legacyUpdateRolesAndPermissions`) accepts `RawThreadInfos` instead of just `LegacyRawThreadInfos`. However, we call `assertAllThreadInfosAreLegacy` right at the start of `legacyUpdateRolesAndPermissions` to ensure that only `LegacyRawThreadInfos` are passed to this function. It could be argued that this is worse than D10283, because it's unlikely that we'd want to run the `convertThreadStoreThreadInfosToNewIDSchema` migration again, whereas it's VERY likely that we'll want to run `updateRolesAndPermissions` in the future. I will introduce a new version of `updateRolesAndPermissions` that'll handle `MinimallyEncodedRawThreadInfos` (by going through and converting all to `LegacyRawThreadInfos` which is what the logic in this migration requires since that's what eg `getRolePermissionBlobs` and `makePermissionsBlob` deal with. I'll put that up as a followup diff in this stack (probably before landing anything). However, as of this diff we're now at 0 `flow` issues in `native`/`web`/`keyserver`/`lib`. --- Depends on D10283 Test Plan: CI, `flow`, etc. I think in the future it would be nice to have unit tests for migrations. Reviewers: ashoat, ginsu, tomek, rohan Reviewed By: ashoat Differential Revision: https://phab.comm.dev/D10284
- Loading branch information
1 parent
24bd20b
commit b506bf3
Showing
3 changed files
with
30 additions
and
14 deletions.
There are no files selected for viewing
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
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
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