prev_execution_date_success deprication warning suggests using prev_data_interval_start_success which is not equivalent #36100
Labels
area:core
kind:bug
This is a clearly a bug
pending-response
stale
Stale PRs per the .github/workflows/stale.yml policy file
Apache Airflow version
2.7.3
What happened
While using this variable from context ex:
last_dag_success=context.get('prev_execution_date_success')
I get the below warning. This suggests using prev_data_interval_start_success however this is NOT an equivalent date_time. The first is the date_time for which the DAG most recently had a successful run including manual runs. The latter is the assumed last successful start of a run based on the data interval.{{logging_mixin.py:151}} WARNING - /usr/local/***/.local/lib/python3.11/site-packages/***/utils/context.py:314 AirflowContextDeprecationWarning: Accessing 'prev_execution_date_success' from the template is deprecated and will be removed in a future version. Please use 'prev_data_interval_start_success' instead.
What you think should happen instead
Reading documentation it seems like this should direct users to prev_start_date_success since that is defined as "Start date from prior successful DagRun (if available)." however that variable also doesn't seem to behave as expected. In my example dag below running the dag multiple times manually even though it succeeds this variable never updates from None
How to reproduce
Below sample dag that shows this behavior. Run it a couple of times and watch the date-times in the logs. Something is weird here.
Operating System
MWAA
Versions of Apache Airflow Providers
NA
Deployment
Official Apache Airflow Helm Chart
Deployment details
MWAA / Local runner testing 7.3
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: