]> khamidou — GitHub mirrors - arcanist.git/commit
Fix handling of View Policy in CLI upload workflow for small, unique files
authorepriestley <git@epriestley.com>
Wed, 17 Aug 2016 13:55:48 +0000 (06:55 -0700)
committerepriestley <git@epriestley.com>
Wed, 17 Aug 2016 16:04:01 +0000 (09:04 -0700)
commit6507be27aeb90fe32ad9d45f97bdd61e173fd378
tree8d50eec631607182bc171a8fdbde5ecb6b9c6613
parentd0957c344156356123048be2219fb95a54c89a85
Fix handling of View Policy in CLI upload workflow for small, unique files

Summary:
Ref T7148. When uploading files from the CLI with a particular view policy, we may not respect it if the file is unique (so the data isn't already known) and small (so it doesn't invoke the chunker).

This is rare (and may never have happened outside of testing) because:

  - production dumps are always larger than the minimum chunk size;
  - only cluster stuff uses `setViewPolicy()`;
  - the default policy is "Administrators" anyway, which is safe.

However, I caught it in local testing, so fix it up.

Test Plan: Used `bin/host upload --file ...` to upload a small, unique file. Verified it uploaded with the correct custom view policy ("No One") rather than the default view policy ("Administrators").

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T7148

Differential Revision: https://secure.phabricator.com/D16408
src/upload/ArcanistFileUploader.php