maxcountryman opened a new pull request #16719:
URL: https://github.com/apache/airflow/pull/16719


   This protects against missing SLAs.
   
   For instance, if a task does not have an SLA then it's possible this will 
result in an error like so:
   
   TypeError: unsupported operand type(s) for +: 'DateTime' and 'NoneType'
     File "airflow/jobs/scheduler_job.py", line 565, in execute_callbacks
       self.manage_slas(dagbag.dags.get(request.dag_id))
     File "airflow/utils/session.py", line 70, in wrapper
       return func(*args, session=session, **kwargs)
     File "airflow/jobs/scheduler_job.py", line 433, in manage_slas
       if following_schedule + task.sla < timezone.utcnow():
   
   Here we simply skip tasks which do not have SLAs and avoid raising the 
exception in subsequent logic.
   
   Co-authored-by: Travis Jefferson <[email protected]>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to