Page MenuHomePhabricator

[lib] Replace sendReports keyserver call with Reports service
ClosedPublic

Authored by bartek on Aug 30 2023, 11:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 30, 2:54 PM
Unknown Object (File)
Wed, Oct 30, 2:54 PM
Unknown Object (File)
Wed, Oct 30, 2:54 PM
Unknown Object (File)
Wed, Oct 30, 2:54 PM
Unknown Object (File)
Wed, Oct 30, 2:51 PM
Unknown Object (File)
Oct 1 2024, 9:27 PM
Unknown Object (File)
Sep 27 2024, 2:25 AM
Unknown Object (File)
Sep 10 2024, 9:06 AM
Subscribers

Details

Summary

Call the function in the Reports service instead of the keyserver.
The higher-order-function for callServerEndpoint will be removed in the next diff.

Depends on D9042

Test Plan

Ensured reporting is enabled in settings, then:

  • On native, went to dev options and clicked "Trigger a crash" - got an error report in reports service.
  • I sent some multimedia messages to generate media mission reports. They appeared in reports service.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Aug 31 2023, 12:10 AM
tomek added inline comments.
lib/actions/report-actions.js
14 ↗(On Diff #30617)

Do you think we should have a similar timeout for the new call?

This revision is now accepted and ready to land.Aug 31 2023, 5:28 AM
lib/actions/report-actions.js
14 ↗(On Diff #30617)

Good idea. Do we have any helper utilities for timeouts? Fetch doesn't seem to have built-in support for them.

We can use abortController for that, but since this fetch is in lib and can be called from anywhere, I need to check how it is supported across platforms, especially React Native

lib/actions/report-actions.js
14 ↗(On Diff #30617)

I don't think we have some utils for this. In a couple of places, we're using Promise.race, but using AbortController sounds a lot better.

lib/actions/report-actions.js
14 ↗(On Diff #30617)

Created D9073 to address this.