Page MenuHomePhabricator

[services] consolidate ddb client code, small refactor
ClosedPublic

Authored by varun on Jul 25 2022, 12:49 PM.
Tags
None
Referenced Files
F3376444: D4626.diff
Tue, Nov 26, 11:57 PM
Unknown Object (File)
Sat, Nov 23, 10:46 AM
Unknown Object (File)
Sat, Nov 23, 9:33 AM
Unknown Object (File)
Mon, Nov 11, 3:56 AM
Unknown Object (File)
Sat, Nov 9, 3:34 PM
Unknown Object (File)
Sat, Nov 9, 3:21 PM
Unknown Object (File)
Sat, Nov 9, 2:57 PM
Unknown Object (File)
Sat, Nov 9, 1:21 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
No Lint Coverage
Unit
No Test Coverage

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.