Page MenuHomePhabricator

[reports-service] Endpoint for Redux Devtools import
ClosedPublic

Authored by bartek on Aug 28 2023, 2:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 19, 9:10 AM
Unknown Object (File)
Sun, May 19, 9:10 AM
Unknown Object (File)
Sun, May 19, 9:08 AM
Unknown Object (File)
Sun, May 19, 8:55 AM
Unknown Object (File)
Apr 4 2024, 11:15 AM
Unknown Object (File)
Apr 4 2024, 11:15 AM
Unknown Object (File)
Apr 4 2024, 11:14 AM
Unknown Object (File)
Apr 4 2024, 11:05 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