<@ULVA73B9P> I am new to prefect an I did all the ...
# ask-marvin
s
@Marvin I am new to prefect an I did all the steps of the gitHub read me the deployment and server is running and showing me logs in the terminal but the UI does not pick up any runs - it just stands at 0 runs even though a deployment is scheduled every minute. what could be wrong?
m
First, let's determine which version of Prefect you are using, as the steps to troubleshoot this issue might vary between versions. Could you please check whether you're using Prefect 2.x or 3.x? You can usually find this information in the
pyproject.toml
or
requirements.txt
file, or by running
prefect version
in your command line. Once we have this information, I'll search the relevant documentation and resources for possible solutions.
n
hi @Simon - if you're not using
.serve
(which doesnt require a worker) have you started a worker that will listen for / execute scheduled runs?
s
Version: 3.0.10 API version: 0.8.4 Python version: 3.12.6 Git commit: Built: Tue, Oct 15, 2024 1:31 PM OS/Arch: darwin/arm64 Profile: local Server type: server Pydantic version: 2.9.2
n
also just fyi marvin only responds if you do an app_mention (i.e. @Marvin) just saying hello, give a haiku about prefect workers
m
In Prefect's realm bright, Workers hum with silent grace, Flows in time take flight.
s
@Nate thanks, I tried it with a worker and even a worker pool and strted it with "prefect worker start --pool 'Test123'"
n
so im noticing now you said you followed the readme, does that mean that you ran this?
Copy code
if __name__ == "__main__":
    github_stars.serve(
        name="first-deployment",
        cron="* * * * *",
        parameters={"repos": ["PrefectHQ/prefect"]}
    )
i.e. using
.serve
? in that case, you don't need a worker, that process will listen for scheduled runs
s
yes exactly I just tried the demo from the read me but it looks just like the UI is not connected to what is happening in the terminal
n
can you run
prefect config view
?
maybe we should add that to the readme as a sanity check
s
prefect config view šŸš€ you are connected to: http://127.0.0.1:4200 PREFECT_PROFILE='local' PREFECT_API_URL='http://127.0.0.1:4200/api' (from env)
n
that makes sense! ok so when you go into the UI after running that
.serve
, do you see a deployment? do you see a deployment when you do
prefect deployment ls
?
s
on the terminal I see the 3 attempts I did, crating it with
prefect deploy
but on the UI it is still on "*Create a deployment to get started"* even though the schedule is currently running
n
oh! sorry I think you might be hitting a small related to recent setting changes that we just fixed and will release later today can you try the following? •
export PREFECT_UI_API_URL=<http://127.0.0.1:4200/api>
• restart your server,
prefect server start
s
nice, now the UI is working thanks šŸ˜„
n
great! sorry about that - fix should go out for that in just a bit with
prefect==3.0.11
(i.e. setting the ui url yourself shouldnt be required)
if you're a visual learner, I am working on a intro series to prefect here - any and all feedback welcome!
šŸ™Œ 1