Page MenuHomePhabricator

[backup] Log upload endpoint
ClosedPublic

Authored by michal on Dec 22 2023, 7:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jul 5, 8:48 PM
Unknown Object (File)
Fri, Jul 5, 1:38 PM
Unknown Object (File)
Thu, Jul 4, 12:05 PM
Unknown Object (File)
Thu, Jul 4, 10:38 AM
Unknown Object (File)
Thu, Jul 4, 10:27 AM
Unknown Object (File)
Sun, Jun 30, 9:59 PM
Unknown Object (File)
Sat, Jun 22, 8:23 AM
Unknown Object (File)
Sat, Jun 22, 8:23 AM
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.