Skip to content

Commit

Permalink
Report at most 5 failed task logs
Browse files Browse the repository at this point in the history
  • Loading branch information
stacimc committed Apr 12, 2024
1 parent d6e9b7d commit 9d4736d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions catalog/dags/providers/provider_dag_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 9d4736d

Please sign in to comment.