From 71ce84740892f3c0b7127cd44193734b560c8c4f Mon Sep 17 00:00:00 2001 From: dom phan Date: Tue, 14 Jan 2025 09:11:25 -0800 Subject: [PATCH] fix(weave_query): Handle stale file handle os errors on table load --- weave_query/weave_query/ops_domain/table.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/weave_query/weave_query/ops_domain/table.py b/weave_query/weave_query/ops_domain/table.py index 07e16546c9a5..49496dadaecd 100644 --- a/weave_query/weave_query/ops_domain/table.py +++ b/weave_query/weave_query/ops_domain/table.py @@ -856,6 +856,13 @@ def file_table(file: artifact_fs.FilesystemArtifactFile) -> typing.Optional[Tabl return Table(_get_table_like_awl_from_file(file).awl) except FileNotFoundError as e: return None + # Prevent a panel crash from stale file handle errors + # There are rare stale file handle errors that cause panel crashes as noted: + # https://wandb.atlassian.net/browse/WB-22355 + except OSError as e: + import errno + if e.errno == errno.ESTALE: + return None @op(name="file-partitionedTable")