Alec Mazzuckelli
01/23/2024, 5:22 PMselect * from deployment I get no results. Anyone see this before? Basic prefect server start on a machine with a sqlite db at ~/.prefect/prefect.dbJake Kaplan
01/23/2024, 5:24 PMAlec Mazzuckelli
01/23/2024, 5:27 PMsqlite+aiosqlite:////~/.prefect/prefect.db so that’s where I thought the server would be connecting. Which is the db I’m querying manually. Any suggestions on how to investigate further?Jake Kaplan
01/23/2024, 5:30 PMJake Kaplan
01/23/2024, 5:31 PM~/.prefect/prefect.db or even with the full path and exclude the dialect (sqlite+aiosqlite)Alec Mazzuckelli
01/23/2024, 5:33 PMsqlite3 ~/.prefect/prefect.db . I can see all of the tables, but most are empty. alembic_version returns a commit, but selecting from deployment, flow, flow_run give no resultsJake Kaplan
01/23/2024, 5:36 PMPREFECT_API_DATABASE_*** settingJake Kaplan
01/23/2024, 5:37 PMAlec Mazzuckelli
01/23/2024, 5:38 PMJake Kaplan
01/23/2024, 5:39 PMAlec Mazzuckelli
01/23/2024, 5:45 PMprefect server start --port 4201
prefect config set PREFECT_API_URL="<http://127.0.0.1:4201/api>"
prefect agent start --pool default-agent-pool
Deployment.build_from_flow() # many of these
Deployment.apply() # ^^ all of these
I run this in a script. Looking to see if that sets any env vars that would be relevantJake Kaplan
01/23/2024, 5:51 PMexport PREFECT_API_DATABASE_CONNECTION_URL="xxx" will override any defaults or even prefect config set PREFECT_API_DATABASE_CONNECTION_URL="xxx"Alec Mazzuckelli
01/23/2024, 5:56 PMsqlite+aiosqlite:////~/.prefect/prefect.db is causing an issue? sqlite3 /~/.prefect/prefect.db gives an errorAlec Mazzuckelli
01/23/2024, 6:09 PMJake Kaplan
01/23/2024, 6:19 PMprefect deployment lsJake Kaplan
01/23/2024, 6:20 PMprefect config view --show-secrets --show-sources --show-defaultsAlec Mazzuckelli
01/23/2024, 6:38 PMprefect deployment ls also returns nothing when the server is goingAlec Mazzuckelli
01/23/2024, 6:39 PMJake Kaplan
01/23/2024, 6:41 PMPREFECT_API_DATABASE_CONNECTION_URLAlec Mazzuckelli
01/23/2024, 6:41 PMNoneAlec Mazzuckelli
01/23/2024, 6:42 PMls yields no resultsAlec Mazzuckelli
01/23/2024, 6:42 PMAlec Mazzuckelli
01/23/2024, 6:47 PMls errors since it can’t reach the api. The config value still comes through as ='None' (from defaults) . So it was also ‘None’ with the server on? I got the connection url by entering a python shell and printing PREFECT_API_DATABASE_CONNECTION_URL.value() to get the sqlite+…Alec Mazzuckelli
01/24/2024, 2:21 PMAlec Mazzuckelli
01/24/2024, 2:29 PM/root/.prefect/prefect.db. I guess my install script was running as root whereas I thought it was running as a user. I guess I stopped the server and restarted with the user so ~ expanded to /user/ rather than /root/ . SSH on EMR is fun.. Anyways appreciate the help, I know these issues are basically impossible without a much fuller picture of what’s going onJake Kaplan
01/24/2024, 2:32 PMAlec Mazzuckelli
01/24/2024, 2:39 PM