Shivam Bhatia
07/04/2022, 5:24 AMkomal azram
07/04/2022, 6:21 AMBlack Spy
07/04/2022, 7:37 AMTom Matthews
07/04/2022, 9:16 AMthreads
scheduler? 🙏Michele Rossi
07/04/2022, 9:33 AMJoshua Greenhalgh
07/04/2022, 9:36 AMRobin Weiß
07/04/2022, 1:20 PM...
File "/usr/local/lib/python3.9/site-packages/prefect/client.py", line 834, in read_work_queue_by_name
...
httpx.ReadTimeout
An exception occurred.
• The agent gives these weird log messages:
MarkLateRuns took 26.306307 seconds to run, which is longer than its loop interval of 5.0 seconds.
FlowRunNotifications took 30.444981 seconds to run, which is longer than its loop interval of 4 seconds.
MarkLateRuns took 30.619028 seconds to run, which is longer than its loop interval of 5.0 seconds.
My guess is that something is really slowing the container down so that it runs into connection timeout issues as it doesn’t reply in time. Does anyone have any idea where to look further? The error message unfortunately gives me zero insights on the matter 😞
Thanks!Rajvir Jhawar
07/04/2022, 1:29 PMSurya
07/04/2022, 4:01 PMShivam Bhatia
07/05/2022, 5:42 AM$ # start python REPL with native await functionality
$ python -m asyncio
>>> from prefect.client import get_client
>>> async with get_client() as client:
... response = await client.hello()
... print(response.json())
👋
and I got this error:
Traceback (most recent call last):
File "/usr/lib/python3.9/concurrent/futures/_base.py", line 440, in result
return self.__get_result()
File "/usr/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "<console>", line 1, in <module>
File "/home/shivam/.local/lib/python3.9/site-packages/prefect/client.py", line 111, in get_client
ctx = prefect.context.get_settings_context()
File "/home/shivam/.local/lib/python3.9/site-packages/prefect/context.py", line 272, in get_settings_context
raise MissingContextError("No settings context found.")
prefect.exceptions.MissingContextError: No settings context found.
Am I missing something in the setup?Georgi Yanev
07/05/2022, 7:38 AMRobin Weiß
07/05/2022, 8:05 AMprefect.exceptions.PrefectHTTPStatusError: Client error '422 Unprocessable Entity' for url '<https://api-beta.prefect.io/api/accounts/XXXXXXX/workspaces/XXXXXXXX/work_queues/name/k8s>'
Response: {'exception_message': 'Invalid request received.', 'exception_detail': [{'loc': ['path', 'account_id'], 'msg': 'value is not a valid uuid', 'type': 'type_error.uuid'}, {'loc': ['path', 'workspace_id'], 'msg': 'value is not a valid uuid', 'type': 'type_error.uuid'}, {'loc': ['path', 'account_id'], 'msg': 'value is not a valid uuid', 'type': 'type_error.uuid'}, {'loc': ['path', 'workspace_id'], 'msg': 'value is not a valid uuid', 'type': 'type_error.uuid'}, {'loc': ['path', 'workspace_id'], 'msg': 'value is not a valid uuid', 'type': 'type_error.uuid'}], 'request_body': None}
For more information check: <https://httpstatuses.com/422>
An exception occurred.
That error is just so weird that I have no ideas where to look. Any help would be greatly appreciated :)
The agent is in a crashloop because of this. I have followed https://discourse.prefect.io/t/how-to-deploy-a-prefect-2-0-agent-to-a-local-kubernetes-cluster-and-connect-it-to-cloud-2-0-backend/979 exactly. The only difference is that I updated to prefecthq/prefect:2.0b7-python3.9
because the b6 image gave me version incompatibility errors when using the CLI tool.redsquare
07/05/2022, 8:14 AMShivam Bhatia
07/05/2022, 8:16 AMFlorian Kühnlenz
07/05/2022, 1:05 PMUrban Škudnik
07/05/2022, 1:44 PMprefect
would start it's containers? Is that correct?
If so, what's the best path to have everything as a docker-compose file that developers can spin up on request? Ar there any samples for that use case?Tom Klein
07/05/2022, 2:27 PMnode:12-alpine
(which doesn’t seem to have pip
and possibly not python
either)
i tried to add:
RUN apk update
RUN apk add py-pip
RUN pip install prefect[github,aws,kubernetes,snowflake]
first steps finished fine, but the prefect installation seems to be taking forever (over 25 minutes already) and also has a lot of weird warning messages like:
Collecting snowflake-connector-python>=1.8.2
Downloading snowflake_connector_python-1.8.7-py2.py3-none-any.whl (168 kB)
Downloading snowflake_connector_python-1.8.6-py2.py3-none-any.whl (161 kB)
Downloading snowflake_connector_python-1.8.5-py2.py3-none-any.whl (159 kB)
Downloading snowflake_connector_python-1.8.4-py2.py3-none-any.whl (161 kB)
Downloading snowflake_connector_python-1.8.3-py2.py3-none-any.whl (158 kB)
Downloading snowflake_connector_python-1.8.2-py2.py3-none-any.whl (157 kB)
INFO: pip is looking at multiple versions of six to determine which version is compatible with other requirements. This could take a while.
or :
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this
run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: <https://pip.pypa.io/surveys/backtracking>
any ideas?datamongus
07/05/2022, 3:27 PMAustin Anderson
07/05/2022, 4:49 PMKevin
07/05/2022, 5:28 PMChris Reuter
07/05/2022, 5:54 PMIfeanyi Okwuchi
07/05/2022, 7:14 PM.map()
is trying to run the task more times than necessary and the 4th time, the index is a string. . product_categories
is a list containing 3 elements, flow_config
is a dictionary and product_category_variables
is also a dictionary. When the task runs in prefect cloud there are three successful task runs indexed 0, 1, 2 but then it tries to do another run with the index as a string and it fails saying
Task 'set_dynamic_config_settings['dataset_bucket_path']': Starting task run...
TypeError: list indices must be integers or slices, not str
The task set_dynamic_config_settings
looks like this within the flow definition
with Flow(name="flow-name") as:
product_category_variables = get_run_variables(
is_zero_nyp=is_zero_nyp_param,
bucket_base=flow_config["bucket_base"],
ltv_product_categories=product_categories,
return_type="vars",
)
final_config = set_dynamic_config_settings.map(
cfg=unmapped(flow_config),
product_category_variables=unmapped(product_category_variables),
product_category=product_categories,
upstream_tasks=[unmapped(product_category_variables)],
)
Mansour Zayer
07/05/2022, 7:30 PMwait_for_flow_run
, but I get asked for a flow_run_id
, while I don't have a flow_run_id
, I only have a flow_id
for the parent flow flow_AConstantino Schillebeeckx
07/05/2022, 9:17 PMMars
07/05/2022, 9:33 PMflow.run()
?
I’ve tried adding this code from the boto3 docs to my flow:
import boto3
boto3.set_stream_logger() # sets logging.DEBUG
However, ^ that code hasn’t changed the flow.run()
output.
For background, I’m trying to use localstack as an AWS stand-in for local pipeline development. The S3Download
task is giving me errors and I want to debug the boto3 connection to find out if the S3 service URL, bucket, and key are correct.Jeff Kehler
07/06/2022, 3:54 AMAndreas
07/06/2022, 10:38 AMprefect.client.create_flow_run_from_deployment()
is it possible to set the name for the flow_run? I know that there is such an option when calling create_flow_run(name="My flow run name")
that takes as input a flow_model, what about when creating a run from a deployment though?Surya
07/06/2022, 12:16 PMTom Klein
07/06/2022, 1:35 PMJosh Paulin
07/06/2022, 2:04 PMprefect.context.parameters
when setting a Result
location?Josh Paulin
07/06/2022, 2:04 PMprefect.context.parameters
when setting a Result
location?Kevin Kho
07/06/2022, 2:24 PM