I'm having trouble creating Deployments in Orion. ...
# ask-community
c
I'm having trouble creating Deployments in Orion. I've tried two methods: 1. The method described in the docs. 2. Programmatically using
OrionClient.create_deployment(...)
In both cases, it supposedly succeeds, but it's not showing up in the UI. I've also tried copying the simple example in the docs verbatim, but no dice.
Copy code
$ prefect version
2.0a5
$ prefect deployment create ./my_flow_deployment.py
Loading deployments from python script at 'my_flow_deployment.py'...
Created deployment 'my-first-deployment' for flow 'Addition Machine'
note: I'm able to run flows and see them show up in the UI.
z
Hi! If your deployment does not have a schedule attached to it, it won’t show up in the UI. This is an issue we’re fixing at this moment 🙂 if it does have a schedule attached, can you share it?
c
Oh gotcha. I tried attaching
CronSchedule(cron="0 0 * * *")
to it but its still not showing up
Copy code
DeploymentSpec(
    flow_location=f"{this_dir}/my_flow.py",
    name="my-first-deployment",
    parameters={"nums": [1, 2, 3, 4]},
    schedule=CronSchedule(cron="0 0 * * *"),
)
my_flow.py
is the one in the docs
Also, the flow doesn't even show up in the UI (unless I run it via python)
z
If you run
prefect deployment ls
does it list your deployment?
c
Yep! I see a bunch of them actually (including the ones I created through the
OrionClient
)
Copy code
$ prefect deployment ls
Addition Machine/my-first-deployment
Addition Machine/my-first-deployment-2
run_export/ScheduledExport(25, 102714, 4951)
run_export/ScheduledExport(customer_id=25, export_settings_id=10775, segment_id=125399)
... 25 more ...
z
Interesting
If you do
Copy code
PREFECT_LOGGING_DEFAULT_LEVEL=DEBUG prefect orion start
then
Copy code
PREFECT_ORION_HOST="<http://127.0.0.1:4200/api/>" prefect deployment create ./my_flow_deployment.py
Do you see a log of the deployment being created in the server process?
c
Even with debug logging on, the only relevant log I see is
Copy code
INFO:     127.0.0.1:60644 - "POST /api/deployments/ HTTP/1.1" 200 OK
but still doesn't show up in the UI
Seeing a lot of these errors in the Orion log - not sure if this is relevant
z
Ah it looks like you don’t have the required sqlite version
What does
python -c "import sqlite3; print(sqlite3.sqlite_version_info)"
get you?
c
😮 I've got:
Copy code
$ python -c "import sqlite3; print(sqlite3.sqlite_version_info)"
(3, 28, 0)
$ sqlite3 --version
3.28.0 2019-04-15 14:49:49 378230ae7f4b721c8b8d83c8ceb891449685cd23b1702a57841f1be40b5daapl
docs say 3.24+ I thinks
z
Yeah, I’ve got 3.24 in the docs but it looks like I may have been wrong; that syntax error is generally an indication that a feature we need is missing
c
ah gotcha. what version should I try?
z
Anyway, I can reproduce not seeing the deployment in the UI with a Cron schedule. Changing your code to do an
IntervalSchedule
fixes it, so I presume this is actually a UI bug.
I have 3.36 and know that works.
👍 1
The error is unrelated to not seeing the deployment, but will probably break other things.
c
Cool, I verified changing to
IntervalSchedule
also fixed it on my end
Thanks for looking into this! Should I file a bug?
z
I can open them
v
[
c
any pointers on how to get python to use a newer version of sqlite? I've been able to install a new version of sqlite but python is still picking up the old one
Copy code
$ python -c "import sqlite3; print(sqlite3.sqlite_version_info)"
(3, 28, 0)
$ sqlite3 -version
3.37.0 2021-11-27 14:13:22 bd41822c7424d393a30e92ff6cb254d25c26769889c1499a18a0b9339f5d6c8a
I think sqlite lib is loaded dynamically, so it must still be looking at the system install.
z
I know conda will make sure this behaves