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


##########
providers/common/ai/src/airflow/providers/common/ai/durable/storage.py:
##########
@@ -96,8 +96,21 @@ def _load_cache(self) -> dict[str, Any]:
             if not isinstance(cache, dict):
                 # JSON that is not an object holds no steps, just like a 
cut-off file.
                 raise ValueError("the journal file does not hold a JSON 
object")
-        except (FileNotFoundError, OSError, json.JSONDecodeError, ValueError):
+        except FileNotFoundError:
             cache = {}
+        except OSError:
+            log.warning(
+                "Durable: could not read the journal; failing this attempt so 
finished steps don't run again",
+                path=str(path),
+            )
+            raise
+        except (json.JSONDecodeError, ValueError):

Review Comment:
   Thanks for the review. Updated!
   Corrupt journals now raise `DurableJournalError` from the underlying error; 
storage read failures remain retryable



-- 
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