Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple initializations of DB during startup #545

Closed
lukehinds opened this issue Jan 10, 2025 · 0 comments · Fixed by #625
Closed

multiple initializations of DB during startup #545

lukehinds opened this issue Jan 10, 2025 · 0 comments · Fixed by #625

Comments

@lukehinds
Copy link
Contributor

Describe the issue

multiple initializations are happening because the DbCodeGate class (parent class of DbRecorder and DbReader) is being instantiated multiple times.

2025-01-10T13:22:41.3dZ [debug    ] Initializing DB from path: /Users/lhinds/repos/stacklok/codegate-repos/codegate/codegate_volume/db/codegate.db module=connection pathname=/Users/lhinds/repos/stacklok/codegate-repos/codegate/src/codegate/db/connection.py
2025-01-10T13:22:41.3dZ [debug    ] Initializing DB from path: /Users/lhinds/repos/stacklok/codegate-repos/codegate/codegate_volume/db/codegate.db module=connection pathname=/Users/lhinds/repos/stacklok/codegate-repos/codegate/src/codegate/db/connection.py
2025-01-10T13:22:41.3dZ [debug    ] Initializing DB from path: /Users/lhinds/repos/stacklok/codegate-repos/codegate/codegate_volume/db/codegate.db module=connection pathname=/Users/lhinds/repos/stacklok/codegate-repos/codegate/src/codegate/db/connection.py
2025-01-10T13:22:41.3dZ [debug    ] Initializing DB from path: /Users/lhinds/repos/stacklok/codegate-repos/codegate/codegate_volume/db/codegate.db module=connection pathname=/Users/lhinds/repos/stacklok/codegate-repos/codegate/src/codegate/db/connection.py
2025-01-10T13:22:41.3dZ [debug    ] load_ssl_context verify=True cert=None trust_env=True http2=False module=_config pathname=/Users/lhinds/repos/stacklok/codegate-repos/codegate/.venv/lib/python3.12/site-packages/httpx/_config.py
2025-01-10T13:22:41.3dZ [debug    ] load_verify_locations cafile='/Users/lhinds/repos/stacklok/codegate-repos/codegate/.venv/lib/python3.12/site-packages/certifi/cacert.pem' module=_config pathname=/Users/lhinds/repos/stacklok/codegate-repos/codegate/.venv/lib/python3.12/site-packages/httpx/_config.py
2025-01-10T13:22:41.3dZ [debug    ] Initializing DB from path: /Users/lhinds/repos/stacklok/codegate-repos/codegate/codegate_volume/db/codegate.db module=connection pathname=/Users/lhinds/repos/stacklok/codegate-repos/codegate/src/codegate/db/connection.py
2025-01-10T13:22:41.3dZ [debug    ] Using selector: KqueueSelector module=selector_events pathname=/Users/lhinds/.asdf/installs/python/3.12.8/lib/python3.12/asyncio/selector_events.py
2025-01-10T13:22:41.3dZ [info     ] Starting server                extra={'host': 'localhost', 'port': 8989, 'proxy_port': 8990, 'log_level': 'DEBUG', 'log_format': 'TEXT', 'prompts_loaded': 5, 'provider_urls': {'openai': 'https://api.openai.com/v1', 'anthropic': 'https://api.anthropic.com/v1', 'vllm': 'http://localhost:8000', 'ollama': 'http://localhost:11434'}, 'model_base_path': './codegate_volume/models', 'embedding_model': 'all-minilm-L6-v2-q5_k_m.gguf', 'certs_dir': './codegate_volume/certs', 'db_path': None, 'vec_db_path': './sqlite_data/vectordb.db'} module=cli origin=cli pathname=/Users/lhinds/repos/stacklok/codegate-repos/codegate/src/codegate/cli.py
2025-01-10T13:22:41.3dZ [debug    ] Initializing CopilotProvider   module=provider origin=copilot_proxy pathname=/Users/lhinds/repos/stacklok/codegate-repos/codegate/src/codegate/providers/copilot/provider.py

Steps to Reproduce

Start the server

Operating System

Microsoft Windows (Intel)

IDE and Version

N/A

Extension and Version

N/A

Provider

Other

Model

N/A

Logs

No response

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant