Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

[MISC] Fix Azure listings_expiry_time regression from PR #1826 (#1839)

Chandrasekharan Md6458460e89e
diff --git a/unstract/connectors/src/unstract/connectors/filesystems/azure_cloud_storage/azure_cloud_storage.py b/unstract/connectors/src/unstract/connectors/filesystems/azure_cloud_storage/azure_cloud_storage.py
index ecc92da48..9ffe02d76 100644
--- a/unstract/connectors/src/unstract/connectors/filesystems/azure_cloud_storage/azure_cloud_storage.py
+++ b/unstract/connectors/src/unstract/connectors/filesystems/azure_cloud_storage/azure_cloud_storage.py
@@ -41,13 +41,14 @@ class AzureCloudStorageFS(UnstractFileSystem):
self.bucket = settings.get("bucket", "")
# adlfs._ls_containers() unconditionally reads from DirCache after
# populating it — use_listings_cache=False makes the write a no-op,
- # causing a KeyError. Setting listings_expiry_time=0 allows writes
- # but expires entries immediately on subsequent reads.
+ # causing a KeyError. listings_expiry_time=0 also breaks because
+ # DirCache expires entries between the write and immediate read
+ # (even nanoseconds trigger expiry). Use 1s as the minimum safe value.
# Check https://github.com/fsspec/adlfs/issues/230 for more context.
self.azure_fs = AzureBlobFileSystem(
account_name=account_name,
credential=access_key,
- listings_expiry_time=0,
+ listings_expiry_time=1,
)
@staticmethod