Page MenuHomePhabricator

[reports-service] Introduce database client
ClosedPublic

Authored by bartek on Aug 25 2023, 3:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 4, 1:40 PM
Unknown Object (File)
Thu, Apr 4, 1:40 PM
Unknown Object (File)
Thu, Apr 4, 1:40 PM
Unknown Object (File)
Thu, Apr 4, 1:39 PM
Unknown Object (File)
Thu, Apr 4, 1:28 PM
Unknown Object (File)
Feb 19 2024, 11:33 AM
Unknown Object (File)
Feb 19 2024, 11:06 AM
Unknown Object (File)
Feb 19 2024, 10:36 AM
Subscribers

Details

Summary

Similiar to other services, created a struct representing DynamoDB client.
Created basic interfaces to store and retrieve reports. They're very simple but sufficient for now.

Depends on D8939, D8895

Test Plan

Storing reports was tested in D8895, other methods are tested together with HTTP interface (later in the stack)

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 25 2023, 4:21 AM
jon added inline comments.
services/reports/src/database/client.rs
58 ↗(On Diff #30306)

should this go in constants?

102 ↗(On Diff #30306)

Potentially avoid forcing a Vec construction here if we take IntoIter<ReportItem>. But feel strongly about it, as DDB deals with Vec directly.

This revision is now accepted and ready to land.Aug 25 2023, 4:37 PM
services/reports/src/database/client.rs
102 ↗(On Diff #30306)

Good point