#119 — SqlTableRouterPGVectorWrapper uses wrong DB credentials
Repo: Twill-AI/twill-llm-engine State: open | Status: open Assignee: Unassigned
Created: 2024-09-03 · Updated: 2024-09-03
Description
Found in and blocked by https://github.com/Twill-AI/facade/issues/93
STR:
- Login under “master” user locally or in staging. Make sure that Facade’s “.env” has
PG_LLM__USER=b_test_ro.ueeoretmizfbmzyxxqxl - Try to hit GIT /api/v1/master/sql_table_router/search with any parameters.
Expected: 200 code and empty list as a result. Actual: 500 code and response
{
"message": "(psycopg2.errors.InsufficientPrivilege) permission denied for schema facade_master\nLINE 2: CREATE TABLE facade_master.langchain_pg_collection (\n ^\n\n[SQL: \nCREATE TABLE facade_master.langchain_pg_collection (\n\tuuid UUID NOT NULL, \n\tname VARCHAR NOT NULL, \n\tcmetadata JSON, \n\tPRIMARY KEY (uuid), \n\tUNIQUE (name)\n)\n\n]\n(Background on this error at: https://sqlalche.me/e/20/f405)",
"stack": "Traceback (most recent call last):\n \n File \"/home/i4ellendger/code/twillpayments/facade/.venv/lib/python3.12/site-packages/sqlalchemy/engine/base.py\", line 1967, in _exec_single_context\n self.dialect.do_execute(\n \n File \"/home/i4ellendger/code/twillpayments/facade/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py\", line 941, in do_execute\n cursor.execute(statement, parameters)\n \npsycopg2.errors.InsufficientPrivilege: permission denied for schema facade_master\nLINE 2: CREATE TABLE facade_master.langchain_pg_collection (\n ^\n\n \n\nThe above exception was the direct cause of the following exception:\n\n \nTrace
## Notes
_Add implementation notes, blockers, and context here_
## Related
_Add wikilinks to related people, meetings, or other tickets_