https://prefect.io logo
Title
v

Vitaly Shulgin

09/09/2020, 10:38 PM
import logging
import prefect
from prefect import task, Flow
from prefect.environments import LocalEnvironment

@task
def hello_task():
    pass

flow = Flow("hello-flow", tasks=[hello_task])
flow.environment = LocalEnvironment(labels=["any"])
flow.register(project_name="Hello")
c

Chris White

09/09/2020, 10:39 PM
Hi @Vitaly Shulgin - how are you running this flow in K8s? The code you have here will save your Flow to your local harddrive which is most likely not accessible to your K8s agent / job
v

Vitaly Shulgin

09/10/2020, 7:28 AM
Hello @Chris White, right, this is what I supposed, I did it (run) as follow: • configured server for prefect with
PREFECT__USER_CONFIG_PATH
server responds fine
Next, I executed locally the code above, flow created and visible in UI, I used quick-run to schedule it, agent took it, and started job, as I understood, code of task is not available in flow, even it just
pass
Next, I executed locally the code above, flow created and visible in UI, I used quick-run to schedule it, agent took it, and started job, as I understood, code of task is not available in flow, even it just
pass
FileNotFound is a little bit confusing, cause there is no action at all, so, which file it is trying to find? or directory
Flow Locations
hello-flow
/root/.prefect/flows/hello-flow.prefect
Who, or what must place it to that location?
and, is this location in job container?
and, how to configure agent to use some specific image for jobs (by default)
it is clear now
thanks
It's funny, it was named
lively-dragon
used docker storage
:upvote: 2