Page MenuHomePhabricator

[services][blob] Add helpers and constants for Get RPC
ClosedPublic

Authored by bartek on Nov 22 2022, 12:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 15, 5:50 PM
Unknown Object (File)
Sun, Dec 15, 5:50 PM
Unknown Object (File)
Sun, Dec 15, 5:50 PM
Unknown Object (File)
Sun, Dec 15, 5:50 PM
Unknown Object (File)
Sun, Dec 15, 5:50 PM
Unknown Object (File)
Sun, Dec 15, 5:49 PM
Unknown Object (File)
Sun, Dec 15, 5:29 PM
Unknown Object (File)
Fri, Dec 6, 9:49 PM
Subscribers

Details

Summary
  • Added helper convenience functions to get S3 path from database
  • Copied constants from C++ service with comments

Depends on D5694

Test Plan

These functions are tested in next diff when they are used.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.

Made S3 helpers return Result<S3Path, Status>

bartek published this revision for review.Nov 22 2022, 8:29 AM
bartek edited the summary of this revision. (Show Details)
varun requested changes to this revision.Nov 23 2022, 12:27 AM

Think this could also be two or three diffs. No need to split it now, though.

You might have noticed that in the Identity service, the Status messages are vague (e.g. "internal error"). This is intentional, because we don't want to leak implementation details to the caller. I think we should amend all the Status messages in this diff to be much less specific. The current Status messages that you have should be logged instead of returned to the caller

services/blob/src/service.rs
60 ↗(On Diff #18724)

Do we really want to send the S3 path back to the caller? I doubt it

This revision now requires changes to proceed.Nov 23 2022, 12:27 AM

Made error messages more vague. Internal logging will be added later (ENG-2308).

(For what it's worth, I think this is fine as one diff... splitting diffs too much can make it harder to review)

This revision is now accepted and ready to land.Nov 28 2022, 11:06 PM