ephraimbuddy commented on issue #57618:
URL: https://github.com/apache/airflow/issues/57618#issuecomment-3665287828
log:
```log
{"timestamp":"2025-12-17T12:41:01.323063Z","level":"warning","event":"Starting
call to 'airflow.sdk.api.client.Client.request', this is the 1st time calling
it.","logger":"airflow.sdk.api.client","filename":"before.py","lineno":42}
{"timestamp":"2025-12-17T12:41:02.457592Z","level":"error","event":"API
server
error","status_code":409,"detail":{"detail":{"reason":"invalid_state","message":"TI
was not in the running state so it cannot be
updated","previous_state":"success"}},"message":"Server returned
error","logger":"supervisor","filename":"supervisor.py","lineno":629}
{"timestamp":"2025-12-17T12:41:02.472787Z","level":"error","event":"Top
level
error","logger":"task","filename":"task_runner.py","lineno":1505,"error_detail":[{"exc_type":"AirflowRuntimeError","exc_value":"API_SERVER_ERROR:
{'status_code': 409, 'message': 'Server returned error', 'detail': {'detail':
{'reason': 'invalid_state', 'message': 'TI was not in the running state so it
cannot be updated', 'previous_state':
'success'}}}","exc_notes":[],"syntax_error":null,"is_cause":false,"frames":[{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py","lineno":1498,"name":"main"},{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py","lineno":1057,"name":"run"},{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/comms.py","lineno":207,"name":"send"},{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/comms.py","lineno":271,"name":"_get_response"},{"filename":"/opt/airflow/task-sdk/src/airflow/sdk/execution_ti
me/comms.py","lineno":258,"name":"_from_frame"}],"is_group":false,"exceptions":[]}]}
Traceback (most recent call last):
File "/usr/python/lib/python3.10/runpy.py", line 196, in
_run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/python/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File
"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/execute_workload.py",
line 126, in <module>
main()
File
"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/execute_workload.py",
line 122, in main
execute_workload(workload)
File
"/opt/airflow/task-sdk/src/airflow/sdk/execution_time/execute_workload.py",
line 66, in execute_workload
supervise(
File "/opt/airflow/task-sdk/src/airflow/sdk/execution_time/supervisor.py",
line 2067, in supervise
exit_code = process.wait()
File "/opt/airflow/task-sdk/src/airflow/sdk/execution_time/supervisor.py",
line 1040, in wait
self.update_task_state_if_needed()
File "/opt/airflow/task-sdk/src/airflow/sdk/execution_time/supervisor.py",
line 1054, in update_task_state_if_needed
self.client.task_instances.finish(
File "/opt/airflow/task-sdk/src/airflow/sdk/api/client.py", line 228, in
finish
self.client.patch(f"task-instances/{id}/state",
content=body.model_dump_json())
File "/home/airflow/.local/lib/python3.10/site-packages/httpx/_client.py",
line 1218, in patch
return self.request(
File
"/home/airflow/.local/lib/python3.10/site-packages/tenacity/__init__.py", line
338, in wrapped_f
return copy(f, *args, **kw)
File
"/home/airflow/.local/lib/python3.10/site-packages/tenacity/__init__.py", line
477, in __call__
do = self.iter(retry_state=retry_state)
File
"/home/airflow/.local/lib/python3.10/site-packages/tenacity/__init__.py", line
378, in iter
result = action(retry_state)
File
"/home/airflow/.local/lib/python3.10/site-packages/tenacity/__init__.py", line
400, in <lambda>
self._add_action_func(lambda rs: rs.outcome.result())
File "/usr/python/lib/python3.10/concurrent/futures/_base.py", line 451,
in result
return self.__get_result()
File "/usr/python/lib/python3.10/concurrent/futures/_base.py", line 403,
in __get_result
raise self._exception
File
"/home/airflow/.local/lib/python3.10/site-packages/tenacity/__init__.py", line
480, in __call__
result = fn(*args, **kwargs)
File "/opt/airflow/task-sdk/src/airflow/sdk/api/client.py", line 920, in
request
return super().request(*args, **kwargs)
File "/home/airflow/.local/lib/python3.10/site-packages/httpx/_client.py",
line 825, in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/home/airflow/.local/lib/python3.10/site-packages/httpx/_client.py",
line 914, in send
response = self._send_handling_auth(
File "/home/airflow/.local/lib/python3.10/site-packages/httpx/_client.py",
line 942, in _send_handling_auth
response = self._send_handling_redirects(
File "/home/airflow/.local/lib/python3.10/site-packages/httpx/_client.py",
line 999, in _send_handling_redirects
raise exc
File "/home/airflow/.local/lib/python3.10/site-packages/httpx/_client.py",
line 982, in _send_handling_redirects
hook(response)
File "/opt/airflow/task-sdk/src/airflow/sdk/api/client.py", line 182, in
raise_on_4xx_5xx
return get_json_error(response) or response.raise_for_status()
File "/opt/airflow/task-sdk/src/airflow/sdk/api/client.py", line 178, in
get_json_error
raise err
airflow.sdk.api.client.ServerResponseError: Server returned error
```
--
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]