Page MenuHomePhabricator

[services] consolidate ddb client code, small refactor
ClosedPublic

Authored by varun on Jul 25 2022, 12:49 PM.
Tags
None
Referenced Files
F2171160: D4626.diff
Tue, Jul 2, 5:09 PM
F2166587: D4626.id.diff
Tue, Jul 2, 4:36 AM
Unknown Object (File)
Mon, Jul 1, 1:25 PM
Unknown Object (File)
Sun, Jun 30, 6:02 PM
Unknown Object (File)
Sun, Jun 30, 2:44 AM
Unknown Object (File)
Sat, Jun 29, 9:38 PM
Unknown Object (File)
Wed, Jun 26, 3:28 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
Branch
identity
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

Clever solution, nice.

125

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

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

will fix before landing

125

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.