amoghrajesh commented on code in PR #56443:
URL: https://github.com/apache/airflow/pull/56443#discussion_r2512978228
##########
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")
+ status.HTTP_410_GONE: {"description": "Task Instance no longer exists,
it may have moved to the Task Instance History table"},
Review Comment:
This is added here by mistake?
##########
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")
+ status.HTTP_410_GONE: {"description": "Task Instance no longer exists,
it may 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",
+ status.HTTP_410_GONE: {"description": "Task Instance no longer exists,
it may have moved to the Task Instance History table"},
Review Comment:
Formatting looks off -- static checks will fail
--
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]