Page MenuHomePhabricator

[reports-service] Endpoint for Redux Devtools import
ClosedPublic

Authored by bartek on Aug 28 2023, 2:51 AM.
Tags
None
Referenced Files
F3515775: D8972.id30430.diff
Sun, Dec 22, 10:12 AM
Unknown Object (File)
Sat, Dec 14, 11:56 PM
Unknown Object (File)
Sat, Dec 14, 11:56 PM
Unknown Object (File)
Sat, Dec 14, 11:55 PM
Unknown Object (File)
Sat, Dec 14, 11:39 PM
Unknown Object (File)
Tue, Dec 10, 2:03 AM
Unknown Object (File)
Mon, Nov 25, 12:25 PM
Unknown Object (File)
Mon, Nov 25, 10:08 AM
Subscribers

Details

Summary

Keyserver has an endpoint for importing Redux Devtools state. This diff adds a similar endpoint to reports-service.

The function for modifying JSON is based on: this keyserver function.

Depends on D8971

Test Plan
  1. Uploaded an error report to the service
  2. Opened the endpoint in the browser - a report-{uuid}.json file was downloaded
  3. I was able to open the file in Redux Devtools and browse the state

For non-error reports, the service returned HTTP 415.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Aug 28 2023, 3:00 AM
michal added inline comments.
services/reports/src/service.rs
198 ↗(On Diff #30430)

If _persist doesn't exists will it create it be default or will this throw an error?

This revision is now accepted and ready to land.Aug 28 2023, 6:51 AM
services/reports/src/service.rs
198 ↗(On Diff #30430)

It will be created