Hi, I have a prefect-orion 2.50. prefect-agent 2.5.0 and MinIO running on openshift. I have written a simple .py to create a deployment. The files are uploaded to minio and the script returns me a deployment ID but it doesnt seem to be registered on the server: the UI deployment panel is still blank. Any idea how to debug ? I’ve been trying for hours but couldnt solve it. thanks
✅ 2
z
Zanie
10/07/2022, 7:26 PM
👋 Have you set your
PREFECT_API_URL
to the server’s IP? (including port and
/api
)
Zanie
10/07/2022, 7:28 PM
You also need to set the
PREFECT_ORION_UI_API_URL
to your server’s IP on the server so that the UI directs client traffic to the correct API.
l
Luca Schneider
10/07/2022, 7:34 PM
it seems that
os.environ['PREFECT_API_URL']=…
was not enough
Luca Schneider
10/07/2022, 7:34 PM
i had to use the CLI
prefect config set PREFECT_API_URL=…
and it worked…
👍 1
z
Zanie
10/07/2022, 7:37 PM
We don’t load settings from environment variables after import (generally) because we need to isolate settings at a more granular level than that.
👍 2
p
Pekka
11/01/2022, 2:05 PM
Hello. Raising this thread from the dead. 🧟♂️ - had to resort to this same solution - this is not great because I wanted to write tests where the deployments get tested with S3 locally but then the final placement changes.
z
Zanie
11/01/2022, 3:02 PM
I’m a little confused by the problem here. Can you not set an environment variable before the script is run or use a different profile or use our
temporary_settings
context manager?
🙌 1
p
Pekka
11/01/2022, 3:13 PM
why yes sir;
Copy code
with prefect.settings.temporary_settings(updates={prefect.settings.PREFECT_API_URL: '<http://localhost:4200/api/'}>):
would be the Perfect solution
Pekka
11/01/2022, 3:14 PM
why this was not suggested to the previous person I don't know. would have done that.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.