sla_miss.execution_date is incorrect for daily dagruns
See original GitHub issueApache Airflow version
2.2.4 (latest released)
What happened
When inspecting metadata in airflow tables about sla stuff found that
- in case of daily DAG’s schedule
execution_dateattribute forsla_missis filled with unexpected value. Seems likedata_interval_end
- in case of hourly schedule
sla_miss.execution_dateare as expected (equals to DAGRun’sdata_interval_start/logical_date/execution_date)

this prevents to create any custom SLA analisys dashboards/metrics because unable to join sla_miss and dag_run/task_instance in direct and clear way
clicking on daily task’s link on SLA Miss dashboard forwarding to task instance which was never executed (because it is in “future”) and have no runtime metrics in Task instance details
All screenshots are taken @ 2022-03-25 17:xx:xx Z

What you think should happen instead
sla_miss.execution_date should be same as dag_run.execution_date in all cases
How to reproduce
setup a dag with any daily schedule
setup an SLA on task
wait sla miss to trigger
observe in SLA Miss dashboard - incorrect incorrect execution date
Operating System
amazon linux
Deployment
Official Apache Airflow Helm Chart
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project’s Code of Conduct
Issue Analytics
- State:
- Created a year ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
airflow.models.dag — Airflow Documentation
This calculates what time interval the next DagRun should operate on (its execution date) and when it can be scheduled, according to the...
Read more >Unable to run Airflow Tasks due to execution date and start date
So, when you schedule your dag, any dag_run's execution_date will be smaller than its start time. For daily, there will be 24 hours...
Read more >API Reference - Apache Airflow Documentation - Read the Docs
In Airflow, the daily task stamped with execution_date 2016-01-01 can only start ... execution_date – The execution date of the DagRun to find....
Read more >Data Pipelines with Apache Airflow - BI Consult
the main interface for users to monitor DAG runs and their results. Pipeline as DAG. Task 1. Task 2. Task 3. Task 4....
Read more >API Reference — Airflow Documentation
If you are looking to delay a task, for example running a daily task at 2AM, ... :param execution_date: The execution date of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We should advertise 2.4 as “SLA now actually works!”
Actully - If you are much into it and REALLY want to dig into it and see if you can incrementally improve it - I think that might be a super-valuable contribution to the community 😃. So if you have the will, I am happy to help with reviews and comments 😃. Just ping me in the PRs.