amoghrajesh commented on code in PR #56443:
URL: https://github.com/apache/airflow/pull/56443#discussion_r2451258378


##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -577,7 +577,7 @@ def ti_skip_downstream(
     "/{task_instance_id}/heartbeat",
     status_code=status.HTTP_204_NO_CONTENT,
     responses={
-        status.HTTP_404_NOT_FOUND: {"description": "Task Instance not found"},
+        status.HTTP_410_GONE: {"description": "Task Instance not found, might 
have moved to the Task Instance History table"},

Review Comment:
   ```suggestion
           status.HTTP_410_GONE: {"description": "Task Instance no longer 
exists, it may have moved to the Task Instance History table"},
   ```



##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -605,12 +605,12 @@ def ti_heartbeat(
             "Retrieved current task state", state=previous_state, 
current_hostname=hostname, current_pid=pid
         )
     except NoResultFound:
-        log.error("Task Instance not found")
+        log.error("Task Instance not found in Task Instance table, might have 
moved to the Task Instance History table")
         raise HTTPException(
-            status_code=status.HTTP_404_NOT_FOUND,
+            status_code=status.HTTP_410_GONE,
             detail={
                 "reason": "not_found",
-                "message": "Task Instance not found",
+                "message": "Task Instance not found, might have moved to the 
Task Instance History table",

Review Comment:
   ```suggestion
           status.HTTP_410_GONE: {"description": "Task Instance no longer 
exists, it may have moved to the Task Instance History table"},
   ```



##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -605,12 +605,12 @@ def ti_heartbeat(
             "Retrieved current task state", state=previous_state, 
current_hostname=hostname, current_pid=pid
         )
     except NoResultFound:
-        log.error("Task Instance not found")
+        log.error("Task Instance not found in Task Instance table, might have 
moved to the Task Instance History table")

Review Comment:
   ```suggestion
           status.HTTP_410_GONE: {"description": "Task Instance no longer 
exists, it may have moved to the Task Instance History table"},
   ```



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