Hi all! for some reason, I have a Task class that ...
# prefect-community
d
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
Do you get something like a healthcheck is failing when you register?
d
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
Am confused how you know there is an issue then? Does it just error at runtime?
d
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
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
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
You need to set it as an upstream like this
đź‘Ť 1