Slackbot
01/04/2023, 7:02 PMscott
01/04/2023, 11:26 PMTibs
01/05/2023, 5:29 AMbrett
01/05/2023, 5:57 PMBen Muller
01/05/2023, 6:22 PMÓscar Reyes
01/05/2023, 8:29 PMMatt Racki
01/05/2023, 8:27 PMAx
01/05/2023, 10:39 PMpython3 test.py
Traceback (most recent call last):
File "/Users/ax/prefect/test.py", line 9, in <module>
flow = Flow("hello-flow", tasks=[hello_task])
File "/Users/ax/prefect/env/lib/python3.10/site-packages/prefect/context.py", line 176, in __register_init__
__init__(__self__, *args, **kwargs)
TypeError: Flow.__init__() got an unexpected keyword argument 'tasks'
Ax
01/05/2023, 10:39 PMAx
01/05/2023, 11:04 PMAx
01/05/2023, 11:20 PMAndy Yeung
01/06/2023, 10:06 AMparallel_subflows = [
subflow1(ref_id),
subflow2(ref_id)
]
await asyncio.gather(*parallel_subflows)
but I can't control the random generated flow run name in this way. How can I configure the flow run parameter of the subflow?
Jacob Gora
01/06/2023, 7:35 PMSiva Balusu
01/07/2023, 3:10 AMFlow could not be retrieved from deployment.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/prefect/engine.py", line 260, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
File "/usr/local/lib/python3.10/site-packages/prefect/client/utilities.py", line 47, in with_injected_client
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/prefect/deployments.py", line 167, in load_flow_from_flow_run
await storage_block.get_directory(from_path=deployment.path, local_path=".")
File "/usr/local/lib/python3.10/site-packages/prefect/filesystems.py", line 463, in get_directory
return await self.filesystem.get_directory(
File "/usr/local/lib/python3.10/site-packages/prefect/filesystems.py", line 308, in get_directory
return self.filesystem.get(from_path, local_path, recursive=True)
File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 113, in wrapper
return sync(self.loop, func, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 98, in sync
raise return_result
File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 53, in _runner
result[0] = await coro
File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 551, in _get
rpaths = await self._expand_path(rpath, recursive=recursive)
File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 751, in _expand_path
out = await self._expand_path([path], recursive, maxdepth)
File "/usr/local/lib/python3.10/site-packages/fsspec/asyn.py", line 775, in _expand_path
raise FileNotFoundError(path)
FileNotFoundError: ['prefect-bucket/prefect_test2']
Siva Balusu
01/07/2023, 3:10 AMSiva Balusu
01/07/2023, 3:10 AMSiva Balusu
01/07/2023, 3:10 AMI have no name!@prefect-agent-656bfcdc7d-pqjzx:~$ pip list | grep "prefect"
prefect 2.7.1
prefect-aws 0.2.3
prefect-dask 0.2.2
prefect-kv 0.1.0
prefect-snowflake 0.25
Michael Viescas
01/07/2023, 4:59 AMrun: | cat <<EOF > ecs_block.py from prefect_aws.ecs import ECSTask
Michael Viescas
01/07/2023, 5:10 AM- name: Prefect ECS block
run: |
cat <<EOF > ecs_block.py
from prefect_aws.ecs import ECSTask
block_ = "$BLOCK"
ecs = ECSTask.load(block_)
ecs.image = "${{ steps.build-image.outputs.image }}"
ecs.save(block_, overwrite=True)
EOF
python ecs_block.py
Does the ECSTask block still support changing the image after loading it from an existing block? I'm having trouble finding it when looking at the documentation here:
https://prefecthq.github.io/prefect-aws/ecs/#prefect_aws.ecs.ECSTask.image
Prefect Version: 2.7.7Elliott Wilson
01/07/2023, 5:49 PMChristopher Boyd
01/09/2023, 2:52 PMBen Muller
01/09/2023, 6:49 PMDownloading flow code from storage at ''
Florian Giroud
01/10/2023, 1:09 PMStéphan Taljaard
01/10/2023, 2:02 PMTadej Svetina
01/11/2023, 6:57 PMShayne Hodge
01/12/2023, 8:57 PMdata = {
'parameters': params,
'flow_id': 'cfd9e6db...',
'deployment_id': '24583f30...4',
'infrastructure_document_id': '0181dc52...',
# tried without the next key entirely, and in "PENDING"
"state": {"type": "RUNNING"}
}
r = <http://requests.post|requests.post>(PREFECT2_URL, json=data, headers={'Authorization': f'Bearer {api_key}'})
The flow is created, but it doesn't pick up the work queue properly, and so it just stays in the state but nothing happens. See below, the green run was triggered in the UI, the other two were sent in as "SCHEDULED" and "RUNNING", respectively.
Any suggestions on getting this to run would be much appreciated. Thanks!Luis Pinto
01/13/2023, 6:54 PMChris Whatley
01/15/2023, 1:13 PMBen Muller
01/19/2023, 2:44 AMRendering the template exceeded the CPU, memory, or time limit.
Template source:
Flow run {{ flow.name }}/{{ flow_run.name }} entered state {{ flow_run.state.name }} at {{ flow_run.state.timestamp }}.
Flow ID: {{ flow_run.flow_id }}
Flow run ID: {{ flow_run.id }}
Flow run URL: {{ flow_run|ui_url }}
State message: {{ flow_run.state.message }}
Show less
Giuliano Mega
01/20/2023, 11:44 AM--- Orion logging error ---
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/prefect/logging/handlers.py", line 151, in send_logs
await client.create_logs(self._pending_logs)
File "/usr/local/lib/python3.10/site-packages/prefect/client/orion.py", line 1830, in create_logs
await <http://self._client.post|self._client.post>(f"/logs/", json=serialized_logs)
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1848, in post
return await self.request(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/usr/local/lib/python3.10/site-packages/prefect/client/base.py", line 253, in send
response.raise_for_status()
File "/usr/local/lib/python3.10/site-packages/httpx/_models.py", line 745, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '429 Too Many Requests' for url '<https://api.prefect.cloud/api/accounts/[account]/workspaces/[workspace]/logs/>'
For more information check: <https://httpstatuses.com/429>
Worker information:
Approximate queue length: 0
Pending log batch length: 458
Pending log batch size: 164880
The log worker has tried to send these logs 4 times and will now drop them.
which I guess isn't my fault as the Prefect agent is in control of rate limiting calls to the logging API. Looking into Prefect Cloud's UI it indeed seems to be dropping logs, which I don't think was happening before. Is this a known issue? Anything I can do to mitigate?