Describe the bug
Many errors are unexpectedly produced when calling az storage blob delete-batch with the --if-unmodified-since flag.
ERROR: Client-Request-ID=b4fd2390-cb17-11ec-b930-0242ac110006 Retry policy did not allow for a retry: Server-Timestamp=Tue, 03 May 2022 19:32:01 GMT, Server-Request-ID=3c922cd2-901e-005a-7824-5f7387000000, HTTP status code=412, Exception=The condition specified using HTTP conditional header(s) is not met. ErrorCode: ConditionNotMetConditionNotMetThe condition specified using HTTP conditional header(s) is not met.RequestId:3c922cd2-901e-005a-7824-5f7387000000Time:2022-05-03T19:32:02.2897008Z.
To Reproduce
- Create a storage account
- Upload some files to the
$web container
- Run the following command:
az storage blob delete-batch \
--account-name "$STORAGE_ACCOUNT_NAME" \
--source '$web' \
--if-unmodified-since $(date -d "1 day ago" '+%Y-%m-%dT%H:%MZ')
Expected behavior
All files older 1 day ago are deleted, all files younger than 1 day ago remain. No errors are produced.
Environment summary
pip / 2.29.2 / CentOS7 / bash
Additional context
It appears to be a regression of #5286