Faris Elghlan

10/29/2020, 11:05 AM
Hello, I just started out experimenting with Prefect and tried deploying the server on Azure. I think I got everything working now, but I did encounter two issues along the way that I want to share (could make the lives easier for future Prefect users). I am using version 0.13.12 1. I'm using a managed postgre database on Azure, which requires an '@' sign in the username (example: "user@server-name"). For the Hasura deployment I had to escape the '@' sign in the postgres connection string (example: "user%40server-name"), but this doesn't work for the GraphQL deployment (using a % sign is not suported); exception: "Error: invalid interpolation syntax in <connection string>". I did find a workaround for this issue: I'm now escaping the % sign for the GraphQL deployment (example: "user%%40server-name"). It would be nice if this could be done automatically. The full connection string now looks like this: "postgresql://<user%%40server-name>:<password>@<server-name>;db-name&gt;?sslmode=require" 2. After deploying, the "default" tenant was not created. When there are no tenants, clicking on the "Dashboard" button in the UI does not load the dashboard page or produce any error (nothing happens). This was difficult to debug, as I had no idea what was wrong/why nothing happened. Eventually I did manage to find the issue by attempting to create a new project, which returned an HTTP response containing the text: "Variable "$tenantId" of non-null type "UUID!" must not be null". (I fixed it by manually creating a tenant through the Prefect CLI: "prefect server create-tenant ...") It would be nice if there was some error message or other indication of what is wrong when there are no tenants. I am not sure why the "default" tenant was not created. When I started the server for the first time there were some issues with the postgre extensions (Prefect was unable to create them since it didn't have the right permissions, so I added them manually). Possible this caused some issues while initializing the DB.
👍 2