ephraimbuddy commented on issue #48719:
URL: https://github.com/apache/airflow/issues/48719#issuecomment-3427143560

   So, I was able to reproduce this differently by changing the task name 
during a run on a local bundle and the behaviour is normal.
   
   To reproduce, run this dag in a breeze env:
   
   ```python
   from airflow.sdk import DAG
   
   from airflow.providers.standard.operators.bash import BashOperator
   
   with DAG(
       dag_id="bug",
       is_paused_upon_creation=False,
       schedule="@once",
   ):
       BashOperator(task_id="bash", bash_command="sleep 600")
   ```
   Once it starts running, change the task_id to "bash1". You will get the 
following warnings and error messages:
   
   
   **Scheduler:**
   
   ```
   2025-10-21T14:43:53.623499Z [error    ] Failed to get task for ti 
<TaskInstance: bug.bash scheduled__2025-10-21T14:43:18.495718+00:00 [running]>. 
Marking it as removed. [airflow.models.dagrun.DagRun] loc=dagrun.py:1329
   ```
   
   <img width="494" height="72" alt="Image" 
src="https://github.com/user-attachments/assets/8890d112-e3bc-4f97-b527-2d48ad7d3c90";
 />
   
   
   **API Server:**
   
   ```
   2025-10-21T14:43:54.556323Z [warning  ] Task not in running state      
[airflow.api_fastapi.execution_api.routes.task_instances] current_state=removed 
loc=task_instances.py:645 ti_id=019a0739-7a05-705d-8752-f6084a212b27
   ```
   <img width="626" height="60" alt="Image" 
src="https://github.com/user-attachments/assets/ae7d8cce-76b2-496c-9b90-8bf5f077f30e";
 />
   
   
   
   **Worker:**
   
   ```
   2025-10-21T14:43:54.561390Z [error    ] Server indicated the task shouldn't 
be running anymore [supervisor] detail={'detail': {'reason': 'not_running', 
'message': 'TI is no longer in the running state and task should terminate', 
'current_state': 'removed'}} loc=supervisor.py:1113 status_code=409 
ti_id=UUID('019a0739-7a05-705d-8752-f6084a212b27')
   2025-10-21T14:43:54.582946Z [info     ] Process exited                 
[supervisor] exit_code=0 loc=supervisor.py:712 pid=277 signal_sent=SIGTERM
   ```
   
   <img width="505" height="223" alt="Image" 
src="https://github.com/user-attachments/assets/c8da13ac-032e-48d5-9eaa-ecaf691ea79d";
 />
   
   
   While the behavior above is expected when a task is removed, it appears to 
occur in other situations as well. If you’ve encountered this, please search 
the components and share any related error or warning messages you find.
   
   


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