What are the minimal Postgres and Hasura versions required for setting up Prefect Server in a Prefect version >= 1.2?

View in #prefect-ui on Slack

Konstantin @Konstantin: Hi, team Prefect! Updated prefect-core to 1.2.0 version. The problem is that I don’t see registered FLOWs in the UI

@Anna_Geller: if you meant that you upgraded Prefect Server, you likely have to run DB migration to migrate your data to the new backend and ensure that your flows are shown in the UI. This Discourse topic explains how to do it

Prefect Community: How to run Server database migrations manually?

Konstantin @Konstantin: it was easier for me to delete the base and recreate the flow, since the reversal occurs from the repository. That is, in my case, the base is clean. Flow registration was made for the first time

@Anna_Geller: not sure I understand, if you register for the first time, then only once you register and run the flow, you will see some runs in the UI

Konstantin @Konstantin: the fact of the matter is that I don’t see sweat in the UI

only projects are visible
Agents are also reflected in the UI
logs hasura:
{“type”:“http-log”,“timestamp”:“2022-04-12T13:22:42.995+0000”,“level”:“error”,“detail”:{“operation”:{“user_vars”:{“x-hasura-role”:“admin”},“error”:{“path”:“$.selectionSet.flow_run_aggregate.args.where.flow.project_id._eq”,“error”:“unexpected null value for type "uuid"”,“code”:“validation-failed”},“request_id”:“f66fd011-857d-452b-a212-e353852ba169”,“response_size”:152,“request_mode”:“error”},“request_id”:“f66fd011-857d-452b-a212-e353852ba169”,“http_info”:{“status”:400,“http_version”:“HTTP/1.1”,“url”:“/v1alpha1/graphql”,“ip”:“172.20.0.5”,“method”:“POST”,“content_encoding”:null}}}
{“type”:“http-log”,“timestamp”:“2022-04-12T13:22:42.995+0000”,“level”:“error”,“detail”:{“operation”:{“user_vars”:{“x-hasura-role”:“admin”},“error”:{“path”:“$.selectionSet.flow_run_aggregate.args.where.flow.project_id._eq”,“error”:“unexpected null value for type "uuid"”,“code”:“validation-failed”},“request_id”:“6217654b-6518-4a13-8f0a-116684f588c2”,“response_size”:152,“request_mode”:“error”},“request_id”:"6217654b-6518-4a13-8f0a-116684f^C

@Anna_Geller: Maybe it’s easier for you to use Prefect Cloud? there is a free tier that allows you to run 20,000 task runs for free each month

Konstantin @Konstantin: I would not give up so immediately, with such a powerful team as you, together, we can handle all the mountains. In the current one, I see the presence of a problem with the UI. Currently, the flow is reflected from the menu. By binding the project to the tenant. Checked that all registered jobs run at the scheduled time.

@Anna_Geller: Thank you for this compliment :smile:

Let’s take a step back then. How did you originally start your Prefect Server - can you share the command you used originally when you started Server? Did you use the default Postgres container or did you connect an external database?

If you haven’t configured any Postgres persistence, then your past flow run history won’t be visible in the UI. But you can reregister your flows then.

The easiest and cleanest approach would be to start from scratch with a fresh new Prefect install and start the Server using:

 prefect server start --expose --use-volume

this will save your data in the Docker volume ‘~/.prefect/pg_data’

Solution from the user

Konstantin @Konstantin: The issue was resolved. in one word “Important”, in prefect version 1.2.0 it is necessary: ​​hasura version ==2.1.1
postgres version == 11.

also: a variable has been added to hasura
HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE: “True”

Please, Prefect team, add all of these requirements to the description.
If handling a similar issue, refer users with a link to a working docker-compose.yml

for example, for me it gave a lot.

@Anna_Geller: Great to hear that! Thanks for sharing your solution. I will cross-post it on Discourse and keep in mind to share it when someone struggles with a similar problem.