Page MenuHomePhabricator

[backup] Log upload endpoint
ClosedPublic

Authored by michal on Dec 22 2023, 7:59 AM.
Tags
None
Referenced Files
F2903195: D10456.id35390.diff
Sat, Oct 5, 9:27 PM
Unknown Object (File)
Fri, Oct 4, 11:24 AM
Unknown Object (File)
Sat, Sep 7, 9:55 AM
Unknown Object (File)
Sat, Sep 7, 9:26 AM
Unknown Object (File)
Sat, Sep 7, 9:26 AM
Unknown Object (File)
Sat, Sep 7, 9:26 AM
Unknown Object (File)
Fri, Sep 6, 10:31 PM
Unknown Object (File)
Aug 28 2024, 7:33 PM
Subscribers

Details

Summary

ENG-5329 : Add endpoints for uploading a log

Add the actual logic for uploading a log

Depends on D10453

Test Plan
  • Modify the maximum size that we can keep in dynamodb to 200
  • Upload two logs:
UploadLogRequest {
  log_id: 11111,
  content: vec![1; 10],
  attachments: None,
}
UploadLogRequest {
  log_id: 22222,
  content: vec![2; 10000],
  attachments: Some(vec!["attachment".into()]),
}
  • Checked that I got two upload respones
  • Checked the db:
    • 11111 has content column with bytes
    • 22222 has attachments column with one BlobInfo and blobInfo column with a BlobInfo for content
  • Checked blob logs:
    • "Assign holder request" for hash "attachment"
    • Assign holder request and "Upload blob request" for content of the second request

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

services/backup/src/http/handlers/log.rs
85 ↗(On Diff #34993)

We need to wrap the future to get access to the actor context.

services/backup/src/http/handlers/log.rs
62–63 ↗(On Diff #34993)

Aren't these already Clone and have Arc inside?

This revision is now accepted and ready to land.Jan 5 2024, 2:08 AM
This revision was landed with ongoing or failed builds.Jan 8 2024, 7:20 AM
This revision was automatically updated to reflect the committed changes.