Ivan Zaikin
12/08/2021, 10:00 AMprefect==2.0a5
in Docker.
Here is my Dockerfile:
FROM python:3.8
RUN adduser prefect
USER prefect
WORKDIR /home/prefect
COPY --chown=prefect:prefect <http://requirements.in|requirements.in> ./
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV PATH="/home/prefect/.local/bin:${PATH}"
RUN pip install --user --no-cache-dir -r <http://requirements.in|requirements.in>
COPY --chown=prefect:prefect flow.py flow_deployment.py ./
Inside the container I create a deployment and several flow runs, but all of them are marked as “late”. Here is the terminal output:
$ prefect orion start --host 0.0.0.0 --log-level DEBUG
Starting Orion API server...
INFO: Started server process [71]
INFO: Waiting for application startup.
09:54:06.189 | Scheduler service scheduled to start in-app
09:54:06.189 | MarkLateRuns service scheduled to start in-app
INFO: Application startup complete.
INFO: Uvicorn running on <http://0.0.0.0:4200> (Press CTRL+C to quit)
09:54:06.501 | Finished monitoring for late runs.
09:54:06.538 | Scheduled 0 runs.
Starting agent connected to <http://0.0.0.0:4200/api/>...
Agent started! Checking for flow runs...
09:54:07.298 | Submitting flow run 'f0855bd3-2eab-4346-ad3a-2e237a688faa'
09:54:07.298 | Submitting flow run '521624eb-cec8-4f9b-9e92-f203e104586a'
09:54:07.298 | Submitting flow run 'f25da7b6-7893-4107-aaa3-df22377e2ccf'
09:54:07.299 | Submitting flow run '2895bdfa-082c-43b5-afc2-d0dcc269bf51'
09:54:07.299 | Submitting flow run '2b445dbd-58b4-4acb-89b7-1f6782dc0ec9'
09:54:07.300 | Completed submission of flow run 'f0855bd3-2eab-4346-ad3a-2e237a688faa'
09:54:07.300 | Completed submission of flow run '521624eb-cec8-4f9b-9e92-f203e104586a'
09:54:07.300 | Completed submission of flow run 'f25da7b6-7893-4107-aaa3-df22377e2ccf'
09:54:07.300 | Completed submission of flow run '2895bdfa-082c-43b5-afc2-d0dcc269bf51'
09:54:07.300 | Completed submission of flow run '2b445dbd-58b4-4acb-89b7-1f6782dc0ec9'
09:54:08.969 | Flow run '521624eb-cec8-4f9b-9e92-f203e104586a' exited with exception: KeyError('__main__')
09:54:08.975 | Flow run '2895bdfa-082c-43b5-afc2-d0dcc269bf51' exited with exception: KeyError('__main__')
09:54:08.976 | Flow run 'f25da7b6-7893-4107-aaa3-df22377e2ccf' exited with exception: KeyError('__main__')
09:54:08.979 | Flow run '2b445dbd-58b4-4acb-89b7-1f6782dc0ec9' exited with exception: KeyError('__main__')
09:54:08.980 | Flow run 'f0855bd3-2eab-4346-ad3a-2e237a688faa' exited with exception: KeyError('__main__')
Is there a way to debug these KeyErrors?Anna Geller
DaskExecutor(cluster_kwargs=dict(processes=False))
Ivan Zaikin
12/08/2021, 10:18 AMAnna Geller
prefect deployment execute deployment_name
Does this trigger a deployment without issues?Ivan Zaikin
12/08/2021, 10:22 AM/home/prefect/.local/lib/python3.8/site-packages/prefect/cli/deployment.py:115: RuntimeWarning: coroutine 'create_then_begin_flow_run' was never awaited
flow(**parameters)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Ivan Zaikin
12/08/2021, 10:23 AMAnna Geller
Ivan Zaikin
12/09/2021, 1:51 AM» prefect deployment execute 'jira/daily'
/Users/i/.pyenv/versions/3.8.10/envs/prefect/lib/python3.8/site-packages/prefect/cli/deployment.py:115: RuntimeWarning: coroutine 'create_then_begin_flow_run' was never awaited
flow(**parameters)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Ivan Zaikin
12/09/2021, 2:16 AMIvan Zaikin
12/09/2021, 10:18 AMAnna Geller
Anna Geller
Ivan Zaikin
12/09/2021, 10:20 AM» sqlite3 --version
3.28.0 2019-04-15 14:49:49 378230ae7f4b721c8b8d83c8ceb891449685cd23b1702a57841f1be40b5daapl
Anna Geller
Anna Geller
prefect orion reset-db
and then try to rerun the flow and restart Orion.
I will nevertheless get back to you once I got response from the team.Ivan Zaikin
12/09/2021, 10:24 AMAnna Geller
3.36.0 2021-06-18
Can you try to upgrade sqlite, reset the db, restart Orion and see if that was the issue?Anna Geller
Ivan Zaikin
12/09/2021, 3:26 PM22:25:21.706 | Submitting flow run '1425a95e-059a-4cb9-9898-082539e04e3a'
22:25:21.706 | Completed submission of flow run '1425a95e-059a-4cb9-9898-082539e04e3a'
22:25:22.742 | Flow run '1425a95e-059a-4cb9-9898-082539e04e3a' exited with exception: KeyError('__main__')
22:25:26.096 | Finished monitoring for late runs.
Zanie
Zanie
pip show distributed
give?Ivan Zaikin
12/10/2021, 1:38 AM» pip show distributed
Name: distributed
Version: 2021.11.2
Summary: Distributed scheduler for Dask
Home-page: <https://distributed.dask.org>
Author:
Author-email:
License: BSD
Location: /Users/i/.pyenv/versions/3.10.0/envs/prefect-py310/lib/python3.10/site-packages
Requires: click, cloudpickle, dask, jinja2, msgpack, psutil, pyyaml, setuptools, sortedcontainers, tblib, toolz, tornado, zict
Required-by: prefect
Ivan Zaikin
12/13/2021, 2:56 AMIvan Zaikin
12/13/2021, 3:07 AMprefect==2.0a6
Zanie
Zanie
Ivan Zaikin
12/14/2021, 7:51 AMZanie
Zanie