Page MenuHomePhabricator

[services] consolidate ddb client code, small refactor
ClosedPublic

Authored by varun on Jul 25 2022, 12:49 PM.
Tags
None
Referenced Files
F2153831: D4626.id14890.diff
Sun, Jun 30, 6:02 PM
F2147726: D4626.id14893.diff
Sun, Jun 30, 2:44 AM
F2145210: D4626.id14994.diff
Sat, Jun 29, 9:38 PM
Unknown Object (File)
Wed, Jun 26, 3:28 PM
Unknown Object (File)
Fri, Jun 21, 4:45 PM
Unknown Object (File)
Fri, Jun 21, 4:45 PM
Unknown Object (File)
Fri, Jun 21, 4:45 PM
Unknown Object (File)
Fri, Jun 21, 4:45 PM

Details

Summary

consolidated some of the client code to minimize the number of calls we make to DynamoDB. also changed the PAKE_USER_ prefix to USER in constants.rs since the table holds more than just PAKE data now.

Test Plan

cargo build, tested that the update expression worked by creating, updating an item in the DDB table

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Jul 25 2022, 1:02 PM

fix update expression syntax

karol added inline comments.
services/identity/src/database.rs
84–86 ↗(On Diff #14893)

Clever solution, nice.

125 ↗(On Diff #14893)

How does it work? I mean, don't we need some sort of delimiter for multiple ops?

tomek added inline comments.
services/identity/src/database.rs
90–98 ↗(On Diff #14893)

When only one arm of match expression does useful job, we should use if let instead

This revision is now accepted and ready to land.Jul 26 2022, 6:38 AM
services/identity/src/database.rs
90–98 ↗(On Diff #14893)

will fix before landing

125 ↗(On Diff #14893)

I originally thought we needed a comma delimiter but turns out the keyword SET is enough for the parser to split up the expression

This revision was landed with ongoing or failed builds.Jul 26 2022, 10:41 AM
This revision was automatically updated to reflect the committed changes.