fat-catTW commented on code in PR #76381:
URL: https://github.com/apache/airflow/pull/76381#discussion_r4506472574


##########
providers/common/ai/src/airflow/providers/common/ai/durable/storage.py:
##########
@@ -92,8 +92,16 @@ def _load_cache(self) -> dict[str, Any]:
         path = self._get_path()
         try:
             self._cache = json.loads(path.read_text())
-        except (FileNotFoundError, OSError, json.JSONDecodeError, ValueError):
+        except FileNotFoundError:
             self._cache = {}
+        except OSError:
+            log.warning(
+                "Durable: could not read the journal; failing this attempt so 
finished steps don't run again"
+            )
+            raise
+        except (json.JSONDecodeError, ValueError):
+            log.warning("Durable: journal is corrupt; failing this attempt so 
finished steps don't run again")

Review Comment:
   That make sense. `path=str(path)` added!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to