Closed Swiftyos closed 7 months ago
I'm still hitting intermittent errors:
2024-04-04 10:32:51 Please make sure your database server is running at `postgres`:`5432`.
2024-04-04 10:32:51 Traceback (most recent call last):
2024-04-04 10:32:51 File "/app/codex/develop/routes.py", line 41, in create_deliverable
2024-04-04 10:32:51 completed_app = await architect_agent.develop_application(
2024-04-04 10:32:51 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-04 10:32:51 File "/app/codex/develop/agent.py", line 125, in develop_application
2024-04-04 10:32:51 await asyncio.gather(*tasks)
2024-04-04 10:32:51 File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asyncio.py", line 54, in _coro_creating_hub_and_span
2024-04-04 10:32:51 reraise(*_capture_exception(hub))
2024-04-04 10:32:51 File "/usr/local/lib/python3.11/site-packages/sentry_sdk/_compat.py", line 127, in reraise
2024-04-04 10:32:51 raise value
2024-04-04 10:32:51 File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asyncio.py", line 52, in _coro_creating_hub_and_span
2024-04-04 10:32:51 result = await coro
2024-04-04 10:32:51 ^^^^^^^^^^
2024-04-04 10:32:51 File "/app/codex/develop/agent.py", line 62, in process_api_route
2024-04-04 10:32:51 available_types = {
2024-04-04 10:32:51 ^
2024-04-04 10:32:51 File "/app/codex/develop/agent.py", line 66, in <dictcomp>
2024-04-04 10:32:51 for dep_type in await get_object_type_deps(obj.id, object_type_ids)
2024-04-04 10:32:51 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-04 10:32:51 File "/app/codex/develop/compile.py", line 230, in get_object_type_deps
2024-04-04 10:32:51 obj = await ObjectType.prisma().find_unique_or_raise(
2024-04-04 10:32:51 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-04 10:32:51 File "/usr/local/lib/python3.11/site-packages/prisma/actions.py", line 6591, in find_unique_or_raise
2024-04-04 10:32:51 resp = await self._client._execute(
2024-04-04 10:32:51 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-04 10:32:51 File "/usr/local/lib/python3.11/site-packages/prisma/client.py", line 531, in _execute
2024-04-04 10:32:51 return await self._engine.query(builder.build(), tx_id=self._tx_id)
2024-04-04 10:32:51 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-04 10:32:51 File "/usr/local/lib/python3.11/site-packages/prisma/engine/query.py", line 244, in query
2024-04-04 10:32:51 return await self.request(
2024-04-04 10:32:51 ^^^^^^^^^^^^^^^^^^^
2024-04-04 10:32:51 File "/usr/local/lib/python3.11/site-packages/prisma/engine/http.py", line 141, in request
2024-04-04 10:32:51 return utils.handle_response_errors(resp, errors_data)
2024-04-04 10:32:51 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-04 10:32:51 File "/usr/local/lib/python3.11/site-packages/prisma/engine/utils.py", line 184, in handle_response_errors
2024-04-04 10:32:51 raise prisma_errors.DataError(data[0])
2024-04-04 10:32:51 prisma.errors.DataError: Can't reach database server at `postgres`:`5432`
The docker setup was not working for me as the app could not communicate with the Postgres server.
To fix this for me I've done the following:
In addition, I've added an updated .env.example file and updated all the commands to use the env var defined in the file