Add a new file listing all uploaded files in a Google Storage bucket

This change records all uploaded files to a Google Storage (GS) bucket
in a file "UPLOADED", which resides in that bucket, too.

Currently, the devserver relies on "ls" to get a list of payloads to
download from a GS bucket. This occasionally causes a race condition
where "ls" does not list all uploaded files. The root cause of this is
that GS guarantees only eventual consistency for file metadata, i.e., we
do not know when it will give us the full list of files through "ls".

To avoid constantly polling GS until the list shows up, this change adds
and updates a file called "UPLOADED" in the bucket so that devserver can
retreive it for the list of uploaded files.

BUG=chromium-os:32361
TEST=unittest + trybot

Change-Id: Id328a92b6337c7cc7afa21676d8ff50c82861f37
Reviewed-on: https://gerrit.chromium.org/gerrit/30124
Commit-Ready: Yu-Ju Hong <yjhong@chromium.org>
Reviewed-by: Yu-Ju Hong <yjhong@chromium.org>
Tested-by: Yu-Ju Hong <yjhong@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30745
2 files changed