Page MenuHomePhabricator

Move Conduit file upload logic into a separate class
ClosedPublic

Authored by epriestley on May 26 2015, 3:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 16 2024, 2:25 PM
Unknown Object (File)
Dec 15 2023, 1:25 AM
Unknown Object (File)
Dec 15 2023, 1:25 AM
Unknown Object (File)
Dec 14 2023, 2:43 PM
Unknown Object (File)
Dec 13 2023, 12:20 PM
Unknown Object (File)
Nov 30 2023, 3:00 AM
Unknown Object (File)
Nov 28 2023, 10:32 PM
Unknown Object (File)
Nov 26 2023, 7:07 PM

Details

Summary

Ref T8259. Currently, arc upload uses new logic but arc diff uses older logic internally. This prevents arc diff from uploading files larger than 4MB to newer servers.

Split the upload logic apart so the two upload pathways can share it. Callers now build a list of FileDataRefs and hand them to an Uploader for upload.

Test Plan

Ran arc upload on:

  • One file.
  • Several files.
  • Small files.
  • Big files.
  • Directories.
  • Unreadable files.
  • Files full of random data.
  • The same file over and over again.
  • The same big file over and over again.
  • Artificially broke file.allocate and redid some of the simple cases (large/chunked aren't expected to work in this case).

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Move Conduit file upload logic into a separate class.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
joshuaspence added inline comments.
src/upload/ArcanistFileDataRef.php
117–127

You could almost use PhutilInvalidStateException here. In any case, I don't think that setData() or setPath() are translatable.

btrahan edited edge metadata.
btrahan added inline comments.
src/upload/ArcanistFileDataRef.php
56

array typehint maybs? i'm not quite sure how one would use this

This revision is now accepted and ready to land.May 27 2015, 5:03 PM
src/upload/ArcanistFileDataRef.php
56

This is just a blob of file data (e.g., from Filesystem::readFile()). I'll put a third diff in this sequence to finish the docs.

src/upload/ArcanistFileDataRef.php
56

Thanks!

This revision was automatically updated to reflect the committed changes.