Staging instance, all changes can be removed at any time

Skip to content

Handle TOCTOU in azure objstorage add()

There's an unavoidable race condition in the azure objstorage between the existence check and upload. When this race condition happens and we upload the same blob twice, one of the uploads is rejected with a ResourceExistsError.

This change brings the azure objstorage back to idempotence.

Fixes sentry error SWH-STORAGE-G6.

Test Plan

new tox test added, adding the same object twice (and forcing the ResourceExistsError).


Migrated from D3155 (view on Phabricator)

Merge request reports

Loading