Page MenuHomePhabricator

[identity] Add function to remove holders for devices
Needs ReviewPublic

Authored by bartek on Wed, Oct 9, 1:34 AM.
Tags
None
Referenced Files
F2929010: D13650.id.diff
Wed, Oct 9, 10:15 AM
F2929003: D13650.id45000.diff
Wed, Oct 9, 10:12 AM
F2928821: D13650.id.diff
Wed, Oct 9, 7:43 AM
Subscribers

Details

Reviewers
varun
will
kamil
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.Wed, Oct 9, 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.