I have an EmailOperator that is set to trigger if any of its parents fail.
some_task= BashOperator(
task_id='some_task',
bash_command='bash /some/path/to/script.sh'),
execution_timeout=timedelta(minutes=30),
dag=dag)
email_on_dest_fail = EmailOperator(
task_id='email_alert',
to=['me@dev.org'],
subject='airflow error',
html_content='Error detected from parent, see run_id={{run_id}} in airflow for more information',
cc=[],
trigger_rule=TriggerRule.ONE_FAILED,
dag=dag
Is there a way to include the (possibly truncated) log output of the first failing parent task in the body of the sent email?