Hello Roman Fedorenko
I see you're encountering a flickering issue when updating blob metadata with the Azure Storage Python SDK. It can be frustrating when the SDK reports success, but the metadata doesn't update as expected.
Check that you're using the latest version of the Azure Storage Blob Python SDK, as newer releases may resolve such issues.
- If you're working with asynchronous methods, make sure you're properly awaiting the set_blob_metadata call, as missing awaits can cause problems.
Make sure the metadata you're sending is correctly formatted as a dictionary of key-value pairs (strings). For example:
metadata = {"key1": "value1", "key2": "value2"}
await blob_client.set_blob_metadata(metadata)
If there's an active lease on the blob, include the correct lease ID in your metadata update call.
Consider using the if_unmodified_since parameter to ensure updates only occur if the blob hasn't changed since a certain time, which can help avoid conflicts.
After updating, double-check the metadata in the Azure Portal, as UI caching may delay visible changes. Also, enable logging in the SDK to capture any errors or useful details for troubleshooting.
And also check known issue also there in the below document:
https://free.blessedness.top/en-us/python/api/overview/azure/storage?view=azure-python#known-issues
https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/storage/azure-storage-blob/CHANGELOG.md
Hope the above answer helps! Please let us know do you have any further queries.
Please do not forget “up-vote” wherever the information provided helps you, this can be beneficial to other community members.