https://prefect.io logo
#prefect-community
Title
# prefect-community
d

David Beck

05/17/2022, 10:20 PM
Hi all! for some reason, I have a Task class that doesn't seem to be registered with my test flow to Prefect Cloud. Our set up is a CI/CD process which packages flows with KubernetesRun config. When registering, there are no obvious errors or logs indicating the necessary files for the Task are left out or anything of that sort. What can I do to troubleshoot this further?
k

Kevin Kho

05/17/2022, 10:23 PM
Do you get something like a healthcheck is failing when you register?
d

David Beck

05/17/2022, 10:26 PM
There is some kind of warning it looks like:
but that's not for the task that is not registering. However it is the one to follow after it
k

Kevin Kho

05/17/2022, 10:28 PM
Am confused how you know there is an issue then? Does it just error at runtime?
d

David Beck

05/17/2022, 10:32 PM
no it just doesn't exist in my task list:
Here's the code:
TestOtelLogHandler does not show up in the tasks nor is it run when the flow is run
k

Kevin Kho

05/17/2022, 10:34 PM
Oh you shouldn’t call
.run()
. The Flow block will do it for you. Just do:
Copy code
my_task = TestOtelLogHandler()
with Flow(..) as flow:
    my_task
otherwise it will run during registration time, not during flow execution time
d

David Beck

05/17/2022, 10:36 PM
ah okay. How then can I preserve order of that task run? I want to insure that first task is first no matter what since it sets up a special logger
k

Kevin Kho

05/17/2022, 10:39 PM
You need to set it as an upstream like this
👍 1
3 Views