Hui Zheng
10/05/2020, 11:05 PMget_timestamp()
to init_flow_run()
. It runs fine with docker storage locally, but after I pushed the new flow to the prefect-cloud, I encountered this error
Unexpected error while running flow: KeyError('Task slug init_flow_run-1 not found in the current Flow; this is usually caused by changing the Flow without reregistering it with the Prefect API.')
flow.storage.build(push=True)
flow.register(
project_name='prefect-cloud-project-test`
set_schedule_active=False
)
labels = [target_release, environment]
flow.environment = LocalEnvironment(labels=labels)
flow.storage = Docker(
registry_url=registry_url,
dockerfile='flow.Dockerfile',
image_name=schedule_type,
image_tag=target_release,
env_vars={
....
}
)
Kyle Moon-Wright
10/05/2020, 11:19 PMinit_flow_run-1
slug. Your newly built image is in your container registry after re-registering your flow to Cloud?Hui Zheng
10/06/2020, 2:01 PMinit_flow_run
is the new task name, the get_timestamp
is the old task name, do you suggest that the error indicates the new name is registered with prefect-cloud, but somehow is not found in the actual docker container when k8e agent execute it? So, it’s likely that the k8e job didn’t pull and use the correct version of docker image?Kyle Moon-Wright
10/06/2020, 7:09 PM