vatsrahul1001 opened a new issue, #49007:
URL: https://github.com/apache/airflow/issues/49007

   ### Apache Airflow version
   
   3.0.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   Previously, when a DAG had multiple versions due to changes (e.g., a task 
removed), running DAG runs would sometimes incorrectly use the latest 
serialized DAG, even if they were started with an older version. This caused 
tasks that should still run to be incorrectly marked as removed.
   
   The issue was caused by the scheduler not considering bundle_version when 
retrieving the DAG from the dagbag, defaulting to the latest available version.
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   
   Using the dag below in a git bundle, create a run, then comment out the 
first section, uncomment the second quickly while the first is still in the 
sleep task. Run the task and you will see the astronomer task marked removed.
   
   ```
   from airflow import DAG
   from airflow.providers.standard.operators.bash import BashOperator
   
   with DAG(dag_id="demo"):
       # First run
       sleep = BashOperator(task_id="sleep", bash_command="sleep 300")
       hello = BashOperator(task_id="hello", bash_command="echo 'Hello'")
       astronomer = BashOperator(task_id="astronomer", bash_command="echo 
'Astonomer'")
   
       sleep >> hello >> astronomer
   
       # Second run
       #sleep = BashOperator(task_id="sleep", bash_comma
   ```
   
   
![Image](https://github.com/user-attachments/assets/8cf4810b-e184-4124-a3b5-3c1413f43484)
   
   ### Operating System
   
   Linux
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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