Hi. I am wanna test local debugging based on this ...
# ask-community
h
Hi. I am wanna test local debugging based on this document: https://docs.prefect.io/core/advanced_tutorials/local-debugging.html#locally-check-your-flow-s-docker-storage I have created a task like this:
Copy code
import prefect
import time
from prefect import task, Flow
from prefect.environments.storage import Docker


@task()
def whoami():
    logger = prefect.context.get("logger")
    time.sleep(200)
    <http://logger.info|logger.info>('Hello world')
    return 'hello World'


storage = Docker()
flow = Flow("reddit-flow", storage=storage, tasks=[whoami])
built_storage = flow.storage.build(push=False)
print(built_storage.flows)
and run it
python code.py
and the image successfully created. but the flow doesn't exist inside the image. neither inside
/root/.prefect/
nor
/opt/prefect/flows/
. but when I change the code to register the flow, the created image has the flow. (also i think local debugging documentation is outdated) am I missing something? thank you in advance
👀 1
n
Hi @Hamed Sheykhlou - this looks like a bug in the documentation, I'll open a ticket for it 🙂
@Marvin open "Update local debugging docs"
h
Thanks. but what about the flow that not exists inside the image? am I mistake something or there is a bug?