HomePhabricator
Diffusion Comm 84437bdc18b4

[identity] Fix log_out_user DDB expression error

Description

[identity] Fix log_out_user DDB expression error

Summary:
Noticed that log_out_user fails when deleting device from legacy DDB table. At least on Localstack.
The error thrown from update_item() call is as following:

ServiceError(ServiceError { source: UpdateItemError { kind: Unhandled(Unhandled { source: Error { code: Some("ValidationException"), message: Some("Invalid UpdateExpression: Internal server error"), ...)
`

Reading AWS docs, I noticed they either hardcode map keys or use expressio attribute names for map keys, not values. This solved the issue.
docs, example SO answer

Test Plan:
Error log diappears in D10422 Commtest CI job after I rebased on this diff.
That diff is the first one that uses log_out_user function.

Reviewers: varun, michal, kamil

Reviewed By: varun

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D10423

Details

Provenance
bartekAuthored on Dec 21 2023, 2:42 AM
Reviewer
varun
Differential Revision
D10423: [identity] Fix log_out_user DDB expression error
Parents
rCOMM1fb489207de6: [native-rust-library] Backup service config
Branches
Unknown
Tags
Unknown