HomePhabricator

Fix handling of View Policy in CLI upload workflow for small, unique files

Description

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