Skip to content

Commit

Permalink
[AIRFLOW-5653] Log caught AirflowSkipException in task instance log (a…
Browse files Browse the repository at this point in the history
…pache#6330)

[AIRFLOW-5653] Log caught AirflowSkipException in task instance log

Logging any caught AirflowSkipException with message in models/taskinstance.py
to remove confusion due to no task skipping information in the logs
  • Loading branch information
rajatsri28 authored and aoen committed Oct 14, 2019
1 parent c082065 commit 1a4c164
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion airflow/models/taskinstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,10 @@ def signal_handler(signum, frame):
Stats.incr('ti_successes')
self.refresh_from_db(lock_for_update=True)
self.state = State.SUCCESS
except AirflowSkipException:
except AirflowSkipException as e:
# log only if exception has any arguments to prevent log flooding
if e.args:
self.log.info(e)
self.refresh_from_db(lock_for_update=True)
self.state = State.SKIPPED
except AirflowRescheduleException as reschedule_exception:
Expand Down

0 comments on commit 1a4c164

Please sign in to comment.