Page MenuHomePhabricator
Feed Advanced Search

Oct 10 2023

michal added a comment to D9355: [blob] Delete S3 objects during cleanup.

If I understand correctly this will try to remove S3 blobs that might not exist (for holders can exist without having a blob uploaded and the logic will run for them too). Is this expected?

Oct 10 2023, 6:24 AM
michal accepted D9352: [blob] Add function to perform cleanup operation.
Oct 10 2023, 6:10 AM
michal accepted D9351: [blob] Implement cleanup helper functions.

LGTM, potentially we could add these optimisations:

  1. Return impl Iterator<> instead of Vec
  2. Return &'self str in blobs_to_find_holders

but I haven't analysed it very thoroughly so there might be lifetime/ergonomics issues

Oct 10 2023, 6:10 AM
michal accepted D9350: [blob] Add struct for representing unchecked blobs.
Oct 10 2023, 6:09 AM
michal accepted D9349: [blob] Add db helpers for cleanup.
Oct 10 2023, 2:43 AM
michal accepted D9348: [services-lib] Add function to batch get items.
Oct 10 2023, 2:33 AM

Oct 9 2023

michal updated the diff for D9329: [lib] Remove convertClientToServerInfos from spec.

Rebase

Oct 9 2023, 7:26 AM
michal updated the diff for D9328: [lib] Use new hashing functions in state check.

Rebase

Oct 9 2023, 7:25 AM
michal updated the diff for D9327: [lib] Add hash functions to state sync spec.

Rebase

Oct 9 2023, 7:24 AM
michal added inline comments to D9267: [keyserver] Add new hashing to keyserver state check.
Oct 9 2023, 7:24 AM
michal updated the diff for D9267: [keyserver] Add new hashing to keyserver state check.

Create a new function in spec that combines fetch and getServerInfosHash so flow doesn't complain

Oct 9 2023, 7:23 AM
michal updated the diff for D9265: [lib/web/native] Add IntegrityStore.

Fixed an issue where the integrity handler would run before the threads were fetched from db.

Oct 9 2023, 7:22 AM

Oct 5 2023

michal requested review of D9267: [keyserver] Add new hashing to keyserver state check.
Oct 5 2023, 6:05 AM

Oct 4 2023

michal accepted D9353: [lib] Refactor actions in activity-actions.js.
Oct 4 2023, 7:04 AM
michal accepted D9240: [lib][web][native] Refactor actions in message-actions.js.
Oct 4 2023, 7:00 AM
michal accepted D9225: [lib] Create function for extracing keyserver id from object id.
Oct 4 2023, 6:54 AM
michal accepted D9217: [lib] Add logic for handling faonut actions.
Oct 4 2023, 6:52 AM
michal added inline comments to D9265: [lib/web/native] Add IntegrityStore.
Oct 4 2023, 6:45 AM
michal updated the diff for D9265: [lib/web/native] Add IntegrityStore.

Change dependencies arrays, fix interval, clearTimeout as effect cleanup, fix array type.

Oct 4 2023, 6:45 AM
michal updated the diff for D9329: [lib] Remove convertClientToServerInfos from spec.

Rebase

Oct 4 2023, 6:27 AM
michal updated the diff for D9328: [lib] Use new hashing functions in state check.

Comments

Oct 4 2023, 6:27 AM
michal added inline comments to D9327: [lib] Add hash functions to state sync spec.
Oct 4 2023, 6:02 AM
michal updated the diff for D9327: [lib] Add hash functions to state sync spec.

Update to new threadHashingStatus

Oct 4 2023, 6:02 AM
michal added inline comments to D9267: [keyserver] Add new hashing to keyserver state check.
Oct 4 2023, 4:40 AM
michal added inline comments to D9265: [lib/web/native] Add IntegrityStore.
Oct 4 2023, 4:31 AM
michal updated the diff for D9265: [lib/web/native] Add IntegrityStore.

Added comments and migrations. Extracted array chunking logic to utils. Fix issues with new action and types.

Oct 4 2023, 4:31 AM
michal added a comment to D9145: [web] Remove intial redux state from website responders.

We've talked about this, but heads-up that in terms of sequencing, I'm thinking of that one as a sort of a "follow-up" to the multi-keyserver launch... we could launch with the expectation that users input keyserver URLs manually.

Oct 4 2023, 3:08 AM

Oct 3 2023

michal added inline comments to D9145: [web] Remove intial redux state from website responders.
Oct 3 2023, 1:43 AM

Oct 2 2023

michal accepted D9282: [reports-service] Obtain service-to-service token for anonymous requests.
Oct 2 2023, 6:44 AM

Sep 29 2023

michal planned changes to D9291: [keyserver] Stop accepting http cookies.

Setting as "plan changes" so it's not landed by mistake

Sep 29 2023, 7:06 AM
michal requested review of D9329: [lib] Remove convertClientToServerInfos from spec.
Sep 29 2023, 5:55 AM
michal requested review of D9328: [lib] Use new hashing functions in state check.
Sep 29 2023, 5:53 AM
michal requested review of D9327: [lib] Add hash functions to state sync spec.
Sep 29 2023, 5:38 AM
michal added inline comments to D9267: [keyserver] Add new hashing to keyserver state check.
Sep 29 2023, 5:24 AM
michal updated the diff for D9267: [keyserver] Add new hashing to keyserver state check.

Rebase

Sep 29 2023, 3:34 AM
michal updated the summary of D9267: [keyserver] Add new hashing to keyserver state check.
Sep 29 2023, 3:33 AM
michal accepted D9317: [Tunnelbroker] close RabbitMQ queue when client disconnects.

This should probably be error! instead of debug! right?

Sep 29 2023, 2:36 AM
michal added inline comments to D9316: [Tunnelbroker] always persist WebSocket messages in database.
Sep 29 2023, 2:26 AM
michal accepted D9314: [Tunnelbroker] add WebSocket version of MessageToDevice.
Sep 29 2023, 2:14 AM
michal accepted D9312: [Commtest] add mock olm accounts, configure creating authenticated device.
Sep 29 2023, 2:08 AM
michal accepted D9311: [Commtest] fix Clippy warnings and typos.
Sep 29 2023, 2:00 AM
michal accepted D9310: [Commtest] extract code to create a socket session with Tunnelbroker.
Sep 29 2023, 1:58 AM

Sep 28 2023

michal updated the diff for D9265: [lib/web/native] Add IntegrityStore.

Spacing out hashes calculations on web page load and login/register.

Sep 28 2023, 9:39 AM
michal updated the summary of D9265: [lib/web/native] Add IntegrityStore.
Sep 28 2023, 9:37 AM
michal planned changes to D9267: [keyserver] Add new hashing to keyserver state check.
Sep 28 2023, 5:32 AM
michal planned changes to D9265: [lib/web/native] Add IntegrityStore.
Sep 28 2023, 5:32 AM

Sep 26 2023

michal requested changes to D9217: [lib] Add logic for handling faonut actions.

I just realized a problem with approach: we don't want to send all of the input to all of the keyservers. For example in D9240, in fetchSingleMostRecentMessagesFromThreads we want to send each keyserver only the ids that it "owns". Otherwise we could expose private date to other keyservers. We need some logic to split a single request into multiple request, one for each keyserver.

Sep 26 2023, 3:20 AM
michal requested changes to D9240: [lib][web][native] Refactor actions in message-actions.js.

Requesting changes because I have a few smaller comments

Sep 26 2023, 3:15 AM
michal added inline comments to D9282: [reports-service] Obtain service-to-service token for anonymous requests.
Sep 26 2023, 2:16 AM
michal accepted D9281: [blob][reports] Provide identity service endpoint.
Sep 26 2023, 2:00 AM
michal accepted D9280: [services-lib] Introduce AuthService for token verification.
Sep 26 2023, 1:44 AM
michal accepted D9279: [services-lib] Add fn to verify services token.
Sep 26 2023, 1:41 AM
michal added a comment to D9291: [keyserver] Stop accepting http cookies.

Yeah, the electron clients are bit bigger problem... There is a task for the reload prompt: ENG-961 but it wasn't prioritized. For this task I guess we could just leave this diff on phab for some time to let clients migrate? For the desktop app we could even make a "dummy" release to force a reload but not sure if that's worth it.

Sep 26 2023, 1:25 AM

Sep 25 2023

michal requested review of D9291: [keyserver] Stop accepting http cookies.
Sep 25 2023, 7:55 AM
michal requested review of D9290: [keyserver] Stop sending http cookies.
Sep 25 2023, 7:52 AM
michal requested review of D9288: [web] Use redux cookie for communication.
Sep 25 2023, 7:37 AM
michal requested review of D9287: [web] Migrate cookies to redux.
Sep 25 2023, 7:22 AM
michal accepted D9277: [services-lib] Reorganize auth module.
Sep 25 2023, 6:23 AM
michal accepted D9275: [services-lib] Let blob client use services token.
Sep 25 2023, 6:22 AM
michal added a comment to D9219: [native] Bump `react-native` to `0.70.9`.

Hey, I run yarn cleaninstall and got a warning:

Warning: patch-package detected a patch file version mismatch
Sep 25 2023, 6:04 AM

Sep 22 2023

michal accepted D9246: [native][web] Fix keyserver store tranform error.

Is my understanding correct that there is still a toplevel connection field in redux state? Should we remove it inside of this migration?

Sep 22 2023, 8:13 AM
michal added a comment to D9265: [lib/web/native] Add IntegrityStore.

I also tested another idea: let's do all "batch hashing" (where we hash all items of a store) on the keyserver side. So during login the keyserver would send client all thread hashes. The client would only update the hashes during thread ops. That means we should optimise the keyserver-side calculations, so we should do the schema conversion on the client. I tested it and got:

  • Do the hashing (without conversion) on the keyserver during login => I got ~0.5s for 7300 threads (not sure how that would translate to the actual keyserver though)
  • From previous testing: updating one hash with conversion on native should take about ~10ms, but it should be a few threads at most at one time
Sep 22 2023, 6:49 AM
michal requested review of D9267: [keyserver] Add new hashing to keyserver state check.
Sep 22 2023, 6:20 AM
michal requested review of D9266: [lib/keyserver] Make Info generic mandatory in state sync specs.
Sep 22 2023, 4:05 AM
michal requested review of D9265: [lib/web/native] Add IntegrityStore.
Sep 22 2023, 4:03 AM
michal added a comment to D9256: [web/native] Add threadHashes to threadStore.

Alternative approach in D9265

Sep 22 2023, 3:46 AM
michal added a comment to D9255: [native] Use threadInfo in setClientDBStoreActionType.

Alternative approach in D9265

Sep 22 2023, 3:46 AM
michal planned changes to D9256: [web/native] Add threadHashes to threadStore.
Sep 22 2023, 3:07 AM
michal planned changes to D9255: [native] Use threadInfo in setClientDBStoreActionType.
Sep 22 2023, 3:07 AM
michal added a comment to D9262: [lib] Add `ThreadActivityStore` to Redux.

Yeah, you are correct. Basically if the value you would add previously put in website-responders is:

  • some default value than it should go to web/redux/default-state
  • value calculated on the keyserver than it should go in getInitialReduxStateResponder (+ some dummy default in default-state so flow doesn't complain)
Sep 22 2023, 1:03 AM

Sep 21 2023

michal requested review of D9256: [web/native] Add threadHashes to threadStore.
Sep 21 2023, 8:14 AM
michal added a comment to D9255: [native] Use threadInfo in setClientDBStoreActionType.

Selector performance:
From looking at the code, we always select by state.threadStore.threadInfos, so there should be no issue. I've put up the next diff (D9256) which contains the actual changes to the threadStore: the newly added threadHashes are always updated at the same time as threadInfos inside of the threadStoreOpsHandlers.

Sep 21 2023, 8:00 AM
michal accepted D9242: [services-lib] Use constant-time-eq for token verification.

Ok, seems like constant_time_eq checks the lengths inside, from looking at the code

Sep 21 2023, 6:22 AM
michal requested review of D9255: [native] Use threadInfo in setClientDBStoreActionType.
Sep 21 2023, 4:44 AM
michal requested review of D9253: [lib/keyserver] Improve state sync types.
Sep 21 2023, 4:08 AM

Sep 20 2023

michal added inline comments to D9217: [lib] Add logic for handling faonut actions.
Sep 20 2023, 6:01 AM
michal accepted D9241: [services-lib] Add enum for authorization tokens.

Just some nits

Sep 20 2023, 5:46 AM
michal accepted D9243: [services-lib] Support auth token in HTTP middleware.
Sep 20 2023, 5:45 AM
michal added a comment to D9242: [services-lib] Use constant-time-eq for token verification.

I'm not really familiar with this stuff, so I might be completely wrong but:

Sep 20 2023, 5:40 AM
michal accepted D9226: [lib] Update KeyserverCall type.

Nice!

Sep 20 2023, 3:28 AM
michal added a comment to D9225: [lib] Create function for extracing keyserver id from object id.

This does not handle pending threads (more precisely sidebars created from a message). It's might be fine depending on the use case but I it feel like it should have a code comment in that case. Also agree with @tomek comments.

Sep 20 2023, 3:17 AM
michal added a comment to D9217: [lib] Add logic for handling faonut actions.

Overall looks good but I have a question. In the test plan you write:

const searchMessagesActionObj: KeyserverCall<
  [SearchMessagesRequest],
  SearchMessagesResponse,
> = {
  actionFunc: searchMessages,
  config: { keyserverSelection: 'fanout' },
};

but shouldn't the return type be [SearchMessagesResponse] as it's a fanout action?

Sep 20 2023, 3:10 AM
michal accepted D9143: [lib] Add memoization to useKeyserverCall.
Sep 20 2023, 3:03 AM

Sep 19 2023

michal added a comment to D9121: [lib] Create useKeyserverCall.

Made a task about validators ENG-4982 because I have more context on them.

Sep 19 2023, 12:48 AM

Sep 18 2023

michal accepted D9121: [lib] Create useKeyserverCall.

Unfortunate that we can't use ReturnType<T> and Parameters<T> from new versions of flow, might simplify it a little

Sep 18 2023, 5:49 AM

Sep 15 2023

michal updated the diff for D9109: [web] Enable db for all users.

Return instead of modifying

Sep 15 2023, 6:38 AM
michal updated the diff for D9148: [web/keyserver] Handle different thread ids in url.

Fixes

Sep 15 2023, 6:35 AM
michal updated the diff for D9141: [web] Use new intial redux state.

Fixes

Sep 15 2023, 6:30 AM
michal updated the diff for D9109: [web] Enable db for all users.

Small fixes and early return

Sep 15 2023, 5:44 AM
michal updated the diff for D9108: [web] Initialize database at startup on safari.

Set DatabaseModule fields to optional and add invariants

Sep 15 2023, 5:38 AM
michal added inline comments to D9143: [lib] Add memoization to useKeyserverCall.
Sep 15 2023, 3:57 AM

Sep 14 2023

michal accepted D9200: [Tunnelbroker] add authentication tests.
Sep 14 2023, 3:41 AM
michal accepted D8918: [Tunnelbroker] Authenticate connecting devices.
Sep 14 2023, 3:40 AM

Sep 13 2023

michal added inline comments to D9145: [web] Remove intial redux state from website responders.
Sep 13 2023, 10:05 AM
michal added a comment to D9140: [web] Add setInitialReduxState action.

Improved error handling in D9141. It will bubble up any errors to the error boundary.

Sep 13 2023, 9:49 AM
michal updated the diff for D9141: [web] Use new intial redux state.

Changed the component to function instead of arrow function. Added the error handling so any errors from the promise will bubble up to ErrorBoundary and display the "Something went wrong, please reload" page. We don't really have a any other good way to handle errors here.

Sep 13 2023, 9:45 AM
michal added inline comments to D9108: [web] Initialize database at startup on safari.
Sep 13 2023, 9:29 AM
michal updated the diff for D9108: [web] Initialize database at startup on safari.

Fixed window.status -> this.status issue

Sep 13 2023, 9:29 AM
michal accepted D9176: [docker-compose] Match version tags with terraform.
Sep 13 2023, 7:42 AM
michal accepted D9177: [terraform] Remove references to legacy services.
Sep 13 2023, 7:27 AM