[moblab] Enable version preconditions when uploading to cloud storage.

The cloud API provides a way to ensure that the version of the file you
are writing is as expected, but the python API does not expose that feature.

From https://github.com/googleapis/google-cloud-python/issues/4490 there
is a workaround which this implements until the feature makes it into the
API

TEST=local moblabs
BUG=chromium:825013

Change-Id: Ida717cc3542359ac4c3724619c31653d6db8dc1a
Reviewed-on: https://chromium-review.googlesource.com/1459904
Commit-Ready: Keith Haddow <haddowk@chromium.org>
Tested-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Matt Mallett <mattmallett@chromium.org>
1 file changed