Tomer Cagan
02/24/2022, 1:18 PMAnna Geller
02/24/2022, 1:21 PMTomer Cagan
02/24/2022, 1:21 PM(venv) tomercagan@Tomers-MacBook-Pro prefect-play % prefect run --name "parent" --execute
Looking up flow metadata... Done
Creating run for flow 'parent'... Done
└── Name: classy-piculet
└── UUID: 10ea2885-93c6-4ca9-9053-9770ed0b4ae0
└── Labels: ['agentless-run-b8b53ae8']
└── Parameters: {}
└── Context: {}
└── URL: <http://localhost:8080/default/flow-run/10ea2885-93c6-4ca9-9053-9770ed0b4ae0>
Executing flow run...
└── 15:18:10 | INFO | Creating subprocess to execute flow run...
└── 15:18:10 | INFO | Beginning Flow run for 'parent'
└── 15:18:11 | INFO | Task 'create_flow_run': Starting task run...
└── 15:18:11 | INFO | Creating flow run 'classy-piculet-child' for flow 'child'...
└── 15:18:11 | INFO | Created flow run 'classy-piculet-child': <http://localhost:8080/default/flow-run/595921bf-7b99-406f-b71a-89e99c35797b>
└── 15:18:11 | INFO | Task 'create_flow_run': Finished task run for task with final state: 'Success'
└── 15:18:11 | INFO | Task 'get_task_run_result': Starting task run...
and it gets stack there for a while. Eventually I am getting this:
└── 14:52:21 | ERROR | Task 'get_task_run_result': Exception encountered during task execution!
Traceback (most recent call last):
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1377, in getresponse
response.begin()
File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 320, in begin
version, status, reason = self._read_status()
File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 281, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 54] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1377, in getresponse
response.begin()
File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 320, in begin
version, status, reason = self._read_status()
File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 281, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/prefect/engine/task_runner.py", line 876, in get_task_run_state
value = prefect.utilities.executors.run_task_with_timeout(
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/prefect/utilities/executors.py", line 468, in run_task_with_timeout
return task.run(*args, **kwargs) # type: ignore
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/prefect/tasks/prefect/flow_run.py", line 223, in get_task_run_result
flow_run = flow_run.get_latest()
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/prefect/backend/flow_run.py", line 414, in get_latest
return self.from_flow_run_id(
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/prefect/backend/flow_run.py", line 566, in from_flow_run_id
flow_run_data = cls._query_for_flow_run(where={"id": {"_eq": flow_run_id}})
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/prefect/backend/flow_run.py", line 608, in _query_for_flow_run
result = client.graphql(flow_run_query)
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/prefect/client/client.py", line 452, in graphql
result = <http://self.post|self.post>(
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/prefect/client/client.py", line 407, in post
response = self._request(
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/prefect/client/client.py", line 641, in _request
response = self._send_request(
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/prefect/client/client.py", line 506, in _send_request
response = <http://session.post|session.post>(
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/requests/sessions.py", line 577, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/Users/tomercagan/dev/venv/lib/python3.9/site-packages/requests/adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))
└── 14:52:24 | ERROR | Failed to set task state with error: ConnectionError(ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')))
And this continues on and onAnna Geller
02/24/2022, 1:23 PMTomer Cagan
02/24/2022, 1:27 PMAnna Geller
02/24/2022, 1:34 PMTomer Cagan
02/24/2022, 1:50 PM--execute
without first running a local agent.Anna Geller
02/28/2022, 1:32 PMTomer Cagan
02/28/2022, 1:37 PMAnna Geller
02/28/2022, 1:40 PMTomer Cagan
03/01/2022, 6:37 AMAnna Geller
03/01/2022, 10:55 AMTomer Cagan
03/03/2022, 6:47 AM--execute
is described, and in the latter, there is a box talking about agentless running ("Agentless flow run execution") - maybe there would be a good place to mention that calling a sub-flow with local execution would not work?Anna Geller
03/03/2022, 11:18 AMMarvin
03/03/2022, 11:21 AMTomer Cagan
03/03/2022, 11:52 AM