Page MenuHomePhabricator

[reports-service] Endpoint for Redux Devtools import
ClosedPublic

Authored by bartek on Aug 28 2023, 2:51 AM.
Tags
None
Referenced Files
F2831194: D8972.id30634.diff
Fri, Sep 27, 10:56 PM
F2831193: D8972.id30430.diff
Fri, Sep 27, 10:56 PM
F2831149: D8972.id.diff
Fri, Sep 27, 10:56 PM
F2831118: D8972.diff
Fri, Sep 27, 10:50 PM
F2829526: D8972.id30430.diff
Fri, Sep 27, 4:25 PM
Unknown Object (File)
Sat, Sep 21, 5:34 AM
Unknown Object (File)
Mon, Sep 2, 10:39 AM
Unknown Object (File)
Sun, Sep 1, 7:10 PM
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