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.
TEST=unittest + trybot
Commit-Ready: Yu-Ju Hong <email@example.com>
Reviewed-by: Yu-Ju Hong <firstname.lastname@example.org>
Tested-by: Yu-Ju Hong <email@example.com>
2 files changed