Page MenuHomePhabricator

[identity] Add function to remove holders for devices
ClosedPublic

Authored by bartek on Oct 9 2024, 1:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 11:07 AM
Unknown Object (File)
Thu, Dec 19, 11:07 AM
Unknown Object (File)
Thu, Dec 19, 11:07 AM
Unknown Object (File)
Thu, Nov 28, 11:27 PM
Unknown Object (File)
Nov 21 2024, 7:58 PM
Unknown Object (File)
Nov 21 2024, 7:23 PM
Unknown Object (File)
Nov 21 2024, 6:18 PM
Unknown Object (File)
Nov 21 2024, 1:04 PM
Subscribers

Details

Summary

Created a blob submodule in Identity for blob service actions.
Created function that calls Blob remove-multiple-holders endpoint for all holders prefixed by given device IDs.
Used exponential backoff to retry eventual failed holders.

Depends on D13648, D13649, D13643

Test Plan

Took a test from D13648 test plan, moved to Identity and called the new function in place of the direct BlobServiceClient call

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Oct 9 2024, 2:29 AM
bartek added inline comments.
services/identity/src/comm_service/blob.rs
32–35

This causes instant failure return when await? returns err, ignoring exponential backoff.
I'm wondering if sth like this wouldn't be better:

let remaining = match blob_client.remove_multiple_holders(request.clone()).await {
    Ok(response) => response.failed_requests.into(),
    Err(_) => request,
  };

So we retry on HTTP call failure too.

kamil added inline comments.
services/identity/src/comm_service/blob.rs
26

looks like needs to be updated following https://phab.comm.dev/D13648#inline-77564

32–35

I think this makes more sense

This revision is now accepted and ready to land.Oct 10 2024, 2:34 AM

Address feedback - retry RPC fails too