GitHub user seunggihong added a comment to the discussion: Clearing tasks from 
old DAG runs resets start_date instead of preserving original

### This behavior is a bug and not intended

- Reported in **GitHub Issue #30124** as a bug. It was later fixed through **PR 
#30125**.  
- The key message was: *“When clearing tasks, the DagRun’s `state` and 
`start_date` should not be reset.”* This behavior has since been corrected.


### In which version was it fixed?

- The bug was observed in **Airflow 2.5.1**, and according to the issue 
discussion, it was fixed by **PR #30125**.  
- Therefore, starting from **version 2.5.1 and above** (e.g., 2.6.x, 2.7.x, 
3.x), this issue should no longer occur.

### Workarounds or alternative fields

- In **GitHub Discussions #25440**, similar confusion was raised. Many users 
agreed that it was counterintuitive for `start_date` to be updated on task 
clear/retry, and the discussion concluded that it should be fixed.  
- As alternatives, some fields were suggested:  
  - For **manual triggers**, you can rely on `execution_date`.  
  - For **scheduler-based runs**, you can use `data_interval_end`.  

### Recommendations
- Upgrade to **Airflow 2.5.1 or higher** (e.g., 2.6.x or later). This prevents 
`start_date` from being reset when clearing tasks, preserving the original 
execution history.  
- Additionally, if you need a reliable reference field, consider using 
`execution_date` or `data_interval_end`.

GitHub link: 
https://github.com/apache/airflow/discussions/55206#discussioncomment-14303247

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to