Page MenuHomePhabricator

[backup] Log upload endpoint
ClosedPublic

Authored by michal on Dec 22 2023, 7:59 AM.
Tags
None
Referenced Files
F3504350: D10456.diff
Fri, Dec 20, 8:43 AM
Unknown Object (File)
Tue, Dec 17, 9:05 PM
Unknown Object (File)
Fri, Dec 13, 9:57 PM
Unknown Object (File)
Mon, Dec 2, 3:04 PM
Unknown Object (File)
Sun, Dec 1, 1:59 AM
Unknown Object (File)
Sun, Nov 24, 12:46 AM
Unknown Object (File)
Nov 16 2024, 7:34 PM
Unknown Object (File)
Nov 16 2024, 7:34 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
No Lint Coverage
Unit
No Test Coverage

Event Timeline

services/backup/src/http/handlers/log.rs
85

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

services/backup/src/http/handlers/log.rs
62–63

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.