Azure / Azure/azure-storage-python
list_blobs() crashes due to response from blob storage not containing Creation-Time
- Ngôn ngữ chính
- Python
- Star
- 343
- Fork
- 243
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
### Which service(blob, file, queue) does this issue concern?
blob
### Which version of the SDK was used? Please provide the output of `pip freeze`.
azure-storage-blob==2.1.0
azure-storage-common==2.1.0
azure-common==1.1.23
### What problem was encountered?
Call to `list_blobs(container_name)` throws an error in the end when the blobs have been created by the client on an **IoTEdgeBlobStorage**. The issue is that the Creation-Time appears to be empty when the request returns from the **IoTEdge module.** eg:
`
test.txt
Tue, 20 Aug 2019 08:12:37 GMT
0x8D7254629E53C01
32
application/octet-stream
DdOF7ew/k5qHSdf00h0hzg==
BlockBlob
unlocked
available
false
`
If you look at `azure/storage/blob/_deserialization.py` on you see something like `setattr(blob.properties, info[1], info[2](property_element.text))`
if the Creation-Time is empty this property_element.text is None which makes the call to the `info[2] (parser.parse)` crash
### Have you found a mitigation/solution?
Yes and no. You could test to see if property_element.text is empty or not. But I don't know if this is the way to go. It's maybe better to make sure that the blob storage returns a Creation-Time property.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu trong azure/storage/blob/_deserialization.py và lần theo quá trình phân tích phản hồi của list_blobs xung quanh thuộc tính Creation-Time. Tái hiện lỗi bằng một phản hồi Blob có Creation-Time rỗng, sau đó xác định cách xử lý mong đợi và xác minh rằng list_blobs hoàn tất mà không làm parser bị crash.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- azure, python
- Lĩnh vực
- backend, cloud
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100