You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "github-actions[bot] (via GitHub)" <gi...@apache.org> on 2026/04/03 19:05:14 UTC

[PR] [v3-2-test] Return 410 Gone for heartbeat when cleared TI exists in TIH (#61631) [airflow]

github-actions[bot] opened a new pull request, #64693:
URL: https://github.com/apache/airflow/pull/64693

   * Return 410 Gone for heartbeat when TI was cleared and moved to TIH
   
   When a running task instance is cleared, its previous try is archived
   to the Task Instance History table and the TI receives a new UUID.
   Subsequent heartbeats from the old process get a 404 because the old
   UUID no longer exists in the TI table.
   
   This change improves the error handling by checking the TIH table when
   a heartbeat TI is not found. If the UUID exists in TIH, return 410
   Gone instead of 404 Not Found, giving the client a more specific
   signal that the task was cleared rather than never existing.
   
   - Server: check TIH on heartbeat NoResultFound, return 410 if found
   - Supervisor: handle 410 Gone same as 404/409 (terminate process)
   - Keep 404 for TIs that genuinely never existed
   
   closes: #53140
   
   * Update task_instances.py
   
   Co-authored-by: Amogh Desai <am...@gmail.com>
   
   * Update task_instances.py
   
   Co-authored-by: Amogh Desai <am...@gmail.com>
   
   * Update test_task_instances.py
   
   Co-authored-by: Amogh Desai <am...@gmail.com>
   
   * fix(api): use task_instance_id in heartbeat 410 path and align detail message
   
   - Replace undefined ti_id_str with task_instance_id in TIH query and log
   - Use task_instance_id (UUID) for TIH.task_instance_id comparison
   - Set 410 Gone detail message to match test expectation
   
   ---------
   (cherry picked from commit ce1270b96fd22165f76e437d57eb812abb6691a3)
   
   Co-authored-by: André Ahlert <an...@aex.partners>
   Co-authored-by: Amogh Desai <am...@gmail.com>


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [v3-2-test] Return 410 Gone for heartbeat when cleared TI exists in TIH (#61631) [airflow]

Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on PR #64693:
URL: https://github.com/apache/airflow/pull/64693#issuecomment-4184853581

   Leaveing as draft until 3.2.0 released.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [v3-2-test] Return 410 Gone for heartbeat when cleared TI exists in TIH (#61631) [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #64693:
URL: https://github.com/apache/airflow/pull/64693


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org