Page MenuHomePhabricator

[services] derive serialize/deserialize for WorkflowInProgress enum
ClosedPublic

Authored by varun on Feb 23 2024, 11:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 8, 11:05 AM
Unknown Object (File)
Tue, May 7, 9:54 PM
Unknown Object (File)
Tue, May 7, 6:05 PM
Unknown Object (File)
Tue, May 7, 6:04 PM
Unknown Object (File)
Tue, May 7, 9:31 AM
Unknown Object (File)
Apr 9 2024, 12:59 AM
Unknown Object (File)
Apr 9 2024, 12:59 AM
Unknown Object (File)
Apr 9 2024, 12:59 AM
Subscribers

Details

Summary

we need to serialize/deserialize this enum so we can store it in and then retrieve and deserialize it from DynamoDB

Depends on D11150

Test Plan
  • call login start RPC, log the serialized and deserialized values
  • successfully log in
  • call register start RPC, log the serialized and deserialized values
  • successfully register
  • call update password start RPC, log the serialized and deserialized values
  • successfully change password

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 24 2024, 12:05 AM
Harbormaster failed remote builds in B27136: Diff 37553!
Harbormaster returned this revision to the author for changes because remote builds failed.Feb 26 2024, 2:03 PM
Harbormaster failed remote builds in B27186: Diff 37624!
varun requested review of this revision.Mar 5 2024, 9:16 PM

fix serialization/deserialization of Login struct

michal added inline comments.
services/identity/src/constants.rs
161 ↗(On Diff #37875)

Duration::from_secs() is const so we could use it here, I find it clearer.

shared/grpc_clients/src/identity/device.rs
60–68 ↗(On Diff #37875)

Can we use try_from for this?

This revision is now accepted and ready to land.Mar 6 2024, 4:10 AM
services/identity/src/constants.rs
161 ↗(On Diff #37875)

Ah, it's from chrono and not std but I think it still applies.

services/identity/src/constants.rs
161 ↗(On Diff #37875)

sure, i'll do the same for NONCE_TTL_DURATION as well

shared/grpc_clients/src/identity/device.rs
60–68 ↗(On Diff #37875)

yeah good call