Page MenuHomePhabricator

[keyserver] Change blob upload functions to return more usable results
ClosedPublic

Authored by tomek on Dec 1 2023, 3:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 6:26 AM
Unknown Object (File)
Fri, Nov 8, 3:44 AM
Unknown Object (File)
Thu, Nov 7, 7:30 AM
Unknown Object (File)
Tue, Oct 29, 11:18 AM
Unknown Object (File)
Oct 7 2024, 7:55 AM
Unknown Object (File)
Oct 4 2024, 3:12 AM
Unknown Object (File)
Oct 4 2024, 3:12 AM
Unknown Object (File)
Oct 4 2024, 3:12 AM
Subscribers

Details

Summary

We would like to be able to differentiate between hash in use and a plain failure and to achieve that we need a different API

Depends on D10099

Test Plan

Run a script and check if both SUCCESS and HASH_IN_USE results are returned

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested review of this revision.Dec 1 2023, 4:37 AM
keyserver/src/services/blob.js
36 ↗(On Diff #34100)

I don't think we should ignore status and statusText in case of failure since we loos some meaningful information on what actually failed and make debugging harder. Please update types so that we can return more details information if blob upload fails.

Adding @marcin as blocking to make sure his concern is somehow addressed

keyserver/src/services/blob.js
36 ↗(On Diff #34100)

Soon we'll have to support another status code here (401/403, see ENG-4765) so @marcin's comment makes sense.
I don't have a single idea what's the best way here, maybe this kind of union?
Also this touches a broader area - ENG-3841 and related tasks, so not sure what is actionable now.

I think @marcin and/or @bartek have more context here than I do, so I'll leave the review to them for this diff

marcin requested changes to this revision.Dec 14 2023, 7:16 AM

Request changes to add error information to objects returned from functions.

This revision now requires changes to proceed.Dec 14 2023, 7:16 AM

Include status and text in a result

This revision is now accepted and ready to land.Feb 5 2024, 2:06 AM