Slackbot
05/10/2023, 3:17 PMDaniel Lomartra
05/10/2023, 5:29 PMDeceivious
05/10/2023, 7:15 PMSubmission failed. kubernetes.client.exceptions.ApiException: (500) Reason: Internal Server Error HTTP response headers: HTTPHeaderDict({'Audit-Id': '6d00e224-73e9-4d44-bfce-d0589101f116', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Warning': '299 - "unknown field \\"spec.template.spec.parallelism\\"", 299 - "unknown field \\"spec.template.spec.completions\\""', 'X-Kubernetes-Pf-Flowschema-Uid': 'e8e112c2-396a-440d-a000-51271ccde7dd', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'a49f8ad5-8431-4216-90ae-cd35c64b0736', 'Date': 'Wed, 10 May 2023 18:30:59 GMT', 'Content-Length': '161'}) HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"rpc error: code = Unknown desc = exec (try: 500): database is locked","code":500}
Braun Reyes
05/10/2023, 7:53 PMshekhar koirala
05/10/2023, 8:53 PM/usr/bin/python: No module named prefect.engine.__main__; 'prefect.engine' is a package and cannot be directly executed
jhenry
05/10/2023, 9:22 PMCharles Leung
05/10/2023, 9:25 PMNicholas Torba
05/11/2023, 1:36 AMAbhishek Mitra
05/11/2023, 5:29 AMSQLAlchemyConnector
block and fetch it directly from AWS Secrets?Ritabrata Moitra
05/11/2023, 6:14 AMYou'll need Docker Engine installed and running on the same machine as your agent
My agent runs on EKS using the official helm chart, but fails with RuntimeError: Could not connect to Docker
Do I need to install DockerEngine separately on the agent?
2. Can someone point me towards resources on running flows embedded in ECR images through ECS? ( My agent would continue to run on EKS though )
Any help would be largely appreciated 🙏Mohammad Kaif Rizvi
05/11/2023, 6:57 AMFilip Panovski
05/11/2023, 8:45 AMFlow run infrastructure exited with non-zero status code 1.
The only log message I can see in the console is Downloading flow code from storage at None
. The parent flow works correctly. Are there any server-side logs I can potentially take a look at here? I'm using Prefect 2.8.5
, but I'll try upgrading to >=2.10.7
(couldn't until now because of the pinned fsspec
version up 2.10.7
) to see if that might help. Weirdly, it worked the day before and there have been no changes to the storage blocks...Andreas
05/11/2023, 10:03 AMJared Robbins
05/11/2023, 3:13 PMMalavika S Menon
05/11/2023, 3:22 PMmy_network_graph = {
"task_1": [],
"task_2": [],
"task_3": ["task_1", "task_2"],
"task_4": ["task_3"],
"task_5": ["task_4"],
}
This is the graph mentioned in the example, if I change this to include
my_network_graph = {
"task_5": ["task_4"],
"task_1": [],
"task_2": [],
"task_3": ["task_1", "task_2"],
"task_4": ["task_3"],
}
then task 5 would be executed first regardless of its dependency on task 4. I want to give a dictionary with deps, but the order of keys in the dictionary shouldnt matter. This becomes especially important in my use case where I have 100+ nodes in the graph, and its complicated to chart out the deps such that all upstream deps are mentioned before in the dictionary. How can I solve this?Malavika S Menon
05/11/2023, 3:29 PMHans Lellelid
05/11/2023, 5:44 PMFile "/opt/executor/.venv/lib/python3.10/site-packages/prefect/client/orchestration.py", line 460, in create_flow_run_from_deployment
json=flow_run_create.dict(json_compatible=True),
│ └ <function PrefectBaseModel.dict at 0xffffa59ff2e0>
└ DeploymentFlowRunCreate(state=StateCreate(type=StateType.SCHEDULED, name='Scheduled', message=None, data=None, state_details=...
File "/opt/executor/.venv/lib/python3.10/site-packages/prefect/server/utilities/schemas.py", line 293, in dict
return json.loads(self.json(*args, **kwargs))
│ │ │ │ │ └ {}
│ │ │ │ └ ()
│ │ │ └ <function PrefectBaseModel.json at 0xffffa59ff250>
│ │ └ DeploymentFlowRunCreate(state=StateCreate(type=StateType.SCHEDULED, name='Scheduled', message=None, data=None, state_details=...
│ └ <function loads at 0xffffb5241090>
└ <module 'json' from '/usr/local/lib/python3.10/json/__init__.py'>
File "/opt/executor/.venv/lib/python3.10/site-packages/prefect/server/utilities/schemas.py", line 247, in json
return super().json(*args, **kwargs)
│ └ {}
└ ()
File "/opt/executor/.venv/lib/python3.10/site-packages/pydantic/main.py", line 504, in json
return self.__config__.json_dumps(data, default=encoder, **dumps_kwargs)
│ │ │ │ │ └ {}
│ │ │ │ └ functools.partial(<function custom_pydantic_encoder at 0xffffb440e4d0>, {<class 'pydantic.types.SecretField'>: <function Pref...
│ │ │ └ {'state': {'type': StateType.SCHEDULED, 'name': 'Scheduled', 'message': None, 'data': None, 'state_details': {'flow_run_id': ...
│ │ └ <function orjson_dumps at 0xffffa59fee60>
│ └ <class 'pydantic.config.Config'>
└ DeploymentFlowRunCreate(state=StateCreate(type=StateType.SCHEDULED, name='Scheduled', message=None, data=None, state_details=...
File "/opt/executor/.venv/lib/python3.10/site-packages/prefect/server/utilities/schemas.py", line 126, in orjson_dumps
return orjson.dumps(v, default=default).decode()
│ │ │ └ functools.partial(<function custom_pydantic_encoder at 0xffffb440e4d0>, {<class 'pydantic.types.SecretField'>: <function Pref...
│ │ └ {'state': {'type': StateType.SCHEDULED, 'name': 'Scheduled', 'message': None, 'data': None, 'state_details': {'flow_run_id': ...
│ └ <built-in function dumps>
└ <module 'orjson' from '/opt/executor/.venv/lib/python3.10/site-packages/orjson/__init__.py'>
TypeError: Type is not JSON serializable: WrappedFloat
In this case, I have a fairly complex graph of Pydantic objects, but specifically the one causing issue is defined something like this:
class WrappedFloat(float):
...
class MyObject(MyBaseModel):
probability: WrappedFloat = WrappedFloat(1.0)
Obviously that is simplified, but effectively removing the WrappedFloat value fixes the issue ... but this is definitely a code quality compromise to change this just so that Prefect can serialize it. Pydantic itself does not complain about serializing this; base classes of known types are supported (thanks to, I believe, https://github.com/pydantic/pydantic/pull/1291)
Are there other workarounds we should pursue? Thanks in advance!Blake Stefansen
05/11/2023, 6:36 PMrun_deployment()
. I will await
for all of these flow runs to complete, at which point I check if all of the futures have a state of "Completed".
However, this deployment I'm running also creates a sublow just before the parent flow completes, and I would like to check if the state of the subflows are complete as well. The future ( parent flow ) returns a state when the parent flow completes, but I have no way to check if the subflow completes
QUESTION
Is there a way to use the response of the run_deployment()
method to check if a subflow is Complete? How can I programmatically get the state of a sublow if a subflow is created with run_deployment()
?Kimi
05/12/2023, 1:11 AMKimi
05/12/2023, 1:14 AM#!/bin/bash
directories=$(find "$SCHEDULER_DEPLOYMENT_PATH" -type d -not -name "__pycache__" -not -path "$SCHEDULER_DEPLOYMENT_PATH")
for directory in ${directories}; do
files=$(find "$directory/deployment.py");
python "$files";
done;
Abhishek Mitra
05/12/2023, 5:46 AMGiacomo Chiarella
05/12/2023, 6:41 AMasmundo
05/12/2023, 8:35 AMCheck compatibility with Prefect 2.9
Process completed with exit code 1.
Check compatibility with Prefect 2.10
Process completed with exit code 1.
Check compatibility with Prefect 2.6
Process completed with exit code 1.
Check compatibility with Prefect 2.8
Process completed with exit code 1.
Check compatibility with Prefect 2.7
Process completed with exit code 1.
I am not able find out what is not compatible. Could you please give me an hint?Deceivious
05/12/2023, 9:57 AMtesting
.
@flow
def flow():
#SOME STUFF HERE
normal_function()
#SOME OTHER STUFF HERE
def normal_function():
return some_task()
@task
def some_task():
return True
Rafał Bielicki
05/12/2023, 11:40 AMMarius Vollmer
05/12/2023, 12:37 PMTabari Brannon
05/12/2023, 12:58 PM@flow
def georgia_table_flow(files):
truncate = truncate_tables(files)
import_stg = import_data(files)
alter_import = switcheroo(files)
@flow
def georgia_etl():
table_flows = [georgia_table_flow(file) for file in files]
georgia_etl()
These are my flows and my sub flow. I am having two problems 1. I want to name my subflow based upon where my main flow is in the loop this will be helpful to identify business logic tied to the subflow. Secondly when one of my subflows failes it stops the main flow. Is there away to allow the rest of the subflows to continue to run. Thanks!Tomas Moreno
05/12/2023, 1:31 PMPREFECT__CLOUD__REQUEST_TIMEOUT=60
in our CICD env, but I see timeouts happening in 14s sometimes. anyone have any tips on what could be going on?Zachary Loertscher
05/12/2023, 1:51 PMFileNotFoundError: [Errno 2] No such file or directory: 'git'
. It was working fine, until we re-deployed a fresh EC2, and now it's not working. Is there any kind of configuration I'm missing, other than having a git-hub block & having prefect-github
installed on the EC2?
Any help is so appreciated!
(Full stack trace in thread)Anna Gerlich
05/12/2023, 1:59 PM