Riley Hun
08/11/2020, 11:39 PMfrom prefect import Flow
my_flow = Flow.load('thinknum-etl')
my_flow.run()
Chris White
/opt/prefect
in your Docker image for me?Riley Hun
08/11/2020, 11:45 PMChris White
Riley Hun
08/11/2020, 11:52 PMwith Flow("thinknum-etl") as flow:
token = token_task(
version=version
)
t = print_value(token)
storage = Docker(
image_name='flows-storage',
image_tag='latest',
dockerfile='./dockerfiles/thinknum/Dockerfile',
local_image=True,
env_vars=envs
)
flow.storage = storage
security = Security(tls_ca_file='certs/myca.pem',
tls_client_cert='certs/myca.pem',
tls_client_key='certs/mykey.pem',
require_encryption=True)
flow.environment.executor = DaskExecutor(address='<IP Address>', client_kwargs={'security': security})
flow.register(project_name='thinknum-etl', build=False)
Didn't get any any errors after registering the flow. Then I asked how to debug locally without using the UI, and was advised to run this:
from prefect import Flow
my_flow = Flow.load('thinknum-etl')
my_flow.run()
I imagine I am doing this incorrectly.Chris White
Riley Hun
08/12/2020, 12:04 AMChris White
Riley Hun
08/12/2020, 12:09 AMChris White
docker run -it IMAGE_NAME:TAG bash
and then you have an interactive shell to do anything you wantRiley Hun
08/12/2020, 12:20 AMChris White
~/.prefect/flows
?Riley Hun
08/12/2020, 12:34 AMChris White
/opt/prefect
now, but either way that does explain itRiley Hun
08/12/2020, 12:37 AMChris White
build=False
in your flow.register
which means your docker image isn’t even being builtRiley Hun
08/12/2020, 12:39 AMbuild=False?
. I only included it because it seemed like it was being commonly used in other code snippets from the slack history.itay livni
08/12/2020, 12:04 PMbuild=True
is when you want to update a flow with a new code. Thus creating a new version of the flow.