Eric
09/02/2020, 12:42 AMclient.set_flow_run_state(flow_run_id="<flow_run_id>", state=PAUSE)
). The flow-run state on UI is set to PAUSE and the task B continues to execute until the end. But once the task B is finished, I use client.set_flow_run_state
to set this flow-run back to running (or resume). Task C will get this error (I throw it to thread) and the whole flow-run is still running (Task C is pending), it seems like an abnormal state because this flow-run will keep running but do nothing.
May I ask if this is normal? Thanks πFailed to set task state with error: ClientError([{'message': 'State update failed for task run ID 3a05c8b8-e5b7-4952-b0ee-d3122b8d009c: provided a running state but associated flow run 1cb102f5-d7eb-4282-a6b7-e25a7bd97ab6 is not in a running state.', 'locations': [{'line': 2, 'column': 5}], 'path': ['set_task_run_states'], 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': 'State update failed for task run ID 3a05c8b8-e5b7-4952-b0ee-d3122b8d009c: provided a running state but associated flow run 1cb102f5-d7eb-4282-a6b7-e25a7bd97ab6 is not in a running state.'}}}])
Traceback (most recent call last):
File "/Users/xy.l./.local/share/virtualenvs/data_platform-a2_zvZ3_/lib/python3.7/site-packages/prefect/engine/cloud/task_runner.py", line 116, in call_runner_target_handlers
cache_for=self.task.cache_for,
File "/Users/xy.l./.local/share/virtualenvs/data_platform-a2_zvZ3_/lib/python3.7/site-packages/prefect/client/client.py", line 1303, in set_task_run_state
version=version,
File "/Users/xy.l./.local/share/virtualenvs/data_platform-a2_zvZ3_/lib/python3.7/site-packages/prefect/client/client.py", line 287, in graphql
raise ClientError(result["errors"])
prefect.utilities.exceptions.ClientError: [{'message': 'State update failed for task run ID 3a05c8b8-e5b7-4952-b0ee-d3122b8d009c: provided a running state but associated flow run 1cb102f5-d7eb-4282-a6b7-e25a7bd97ab6 is not in a running state.', 'locations': [{'line': 2, 'column': 5}], 'path': ['set_task_run_states'], 'extensions': {'code': 'INTERNAL_SERVER_ERROR', 'exception': {'message': 'State update failed for task run ID 3a05c8b8-e5b7-4952-b0ee-d3122b8d009c: provided a running state but associated flow run 1cb102f5-d7eb-4282-a6b7-e25a7bd97ab6 is not in a running state.'}}}]
Chris White
09/02/2020, 12:49 AMRunning
state, then task runs are not allowed to enter Running
states themselves, as this is the only state that signifies to Prefect that work is allowed to continueEric
09/02/2020, 2:09 AM