notatallshaw-gts commented on PR #27111: URL: https://github.com/apache/airflow/pull/27111#issuecomment-1311920464
> I am not advocating for re-opening this issue now, but I wonder if it might still lack clarity? > > Contrary to what one would intuitively expect, isn't the SLA relative to the _next_ DAG run? The code calls `next_dagrun_info()` twice before any SLA check. The first time to calculate the end of the current interval, and the second time to calculate the end of the next interval, which could be one day in the future if the DAG is scheduled to run once a day. > > https://github.com/apache/airflow/blob/cc4cde987cbc073a223b531a7674856cb2847f9a/airflow/dag_processing/processor.py#L421 That looks like it's calling next only once? `next_dagrun_info` is the outer call and `get_run_data_interval` is the inner call. And isn't the fact it calls `next_dagrun_info` an artifact of Airflow's quirky execution date behavior? Traditionally you needed to calculate the execution date of the of the next dag run to understand the "real" time that current dag starts at. I wonder if this could now be replaced with using `data_interval_end` from the current dag? Which if so might be less error prone? I'm happy for another PR to be opened for either even better clarity or updating this logic to be more consistent. -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org