Skip to content

Commit

Permalink
correctly return empty list for log paths when missing ds_root or ds_…
Browse files Browse the repository at this point in the history
…type
  • Loading branch information
saikonen committed Aug 16, 2024
1 parent 159f714 commit ec48884
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/ui_backend_service/data/cache/get_log_file_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def log_size_exceeded_blurb(task: Task, logtype: str, max_size: int):
return blurb


def fetch_logs(task: Task, to_path: str, logtype: str, force_reload: bool = False):
def fetch_logs(task: Task, to_path: str, logtype: str, force_reload: bool = False) -> List[str]:
# TODO: This could theoretically be a part of the Metaflow client instead.
paths = []
stream = 'stderr' if logtype == STDERR else 'stdout'
Expand Down Expand Up @@ -243,7 +243,7 @@ def fetch_logs(task: Task, to_path: str, logtype: str, force_reload: bool = Fals
ds_type = meta_dict.get("ds-type")
ds_root = meta_dict.get("ds-root")
if ds_type is None or ds_root is None:
return
return []

attempt = task.current_attempt

Expand Down

0 comments on commit ec48884

Please sign in to comment.