From 9d4736d07d76b1d7440e48ce1feb55aa88026473 Mon Sep 17 00:00:00 2001 From: Staci Cooper Date: Fri, 12 Apr 2024 11:15:08 -0700 Subject: [PATCH] Report at most 5 failed task logs --- catalog/dags/providers/provider_dag_factory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog/dags/providers/provider_dag_factory.py b/catalog/dags/providers/provider_dag_factory.py index 752b42faea8..ae44788c2db 100644 --- a/catalog/dags/providers/provider_dag_factory.py +++ b/catalog/dags/providers/provider_dag_factory.py @@ -584,10 +584,10 @@ def report_aggregate_reingestion_errors( message = ( f"Ingestion errors were encountered in {len(failed_pull_data_tasks)}" - f" ingestion days while running the `{provider_conf.dag_id}` DAG. See the following" + f" ingestion days while running the `{provider_conf.dag_id}` DAG. See the" " logs for details:\n" ) + "\n".join( - f" - <{task.log_url}|{task.task_id}>" for task in failed_pull_data_tasks + f" - <{task.log_url}|{task.task_id}>" for task in failed_pull_data_tasks[:5] ) slack.send_alert(message, provider_conf.dag_id, "Aggregate Reingestion Error")