mirror of
https://github.com/hanzoai/insights.git
synced 2026-10-30 16:15:31 +00:00
The fork half-carried the upstream vendor's name: env vars had been moved to DATASTORE_*, but every module path, identifier and doc string underneath still said ClickHouse. A fork that reads like someone else's product in every import is a vendored copy that never got renamed. insights/clickhouse/ -> insights/datastore/ insights/insightsql/functions/ -> .../functions/datastore/ products/live_debugger/backend/ -> .../backend/datastore/ docker/, docs/handbook/ -> datastore/ CLICKHOUSE_* identifiers -> DATASTORE_* (164 files) manage.py migrate_clickhouse -> migrate_datastore prose, comments, docstrings -> Datastore (1000+ files) The ORM moved with it: hanzoai/infi.clickhouse_orm now ships `datastore_orm`, so consumers write `from datastore_orm import ...` rather than threading the original vendor's `infi` org namespace through their imports. Repinned here to that revision. MIGRATION HISTORY. A package rename orphans the history table, because it keys on package_name: the runner then sees zero applied migrations, replays from 0001 and dies on 0026. That already happened once here, silently blocking every datastore migration until the rows were re-keyed by hand. So the rename carries its own fixup — migrate_datastore now adopts history from prior package names before migrating, idempotent and a no-op on a fresh database, with the list of former names as the single place a future rename has to touch. The history TABLE name is unchanged: it is persisted state, and renaming it is a data migration rather than a rename. Left with the vendor's name, because they are the vendor's: clickhouse-driver, clickhouse-pool and clickhouse-connect are third-party PyPI packages we do not fork, CLICKHOUSE_SKIP_USER_SETUP and CLICKHOUSE_SERVER_IMAGE configure the upstream server image, and clickhouse.com doc links point at the real engine's documentation. Verified: 4257 Python files parse with 0 syntax errors, no `insights.clickhouse` or `infi.clickhouse` references survive, and clickhouse_pool/_driver imports are untouched.
371 lines
12 KiB
JSON
371 lines
12 KiB
JSON
{
|
|
// Use IntelliSense to learn about possible attributes.
|
|
// Hover to view descriptions of existing attributes.
|
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
"version": "0.2.0",
|
|
"configurations": [
|
|
{
|
|
"name": "Frontend",
|
|
"command": "bin/start-frontend",
|
|
"request": "launch",
|
|
"type": "node-terminal",
|
|
"cwd": "${workspaceFolder}",
|
|
"presentation": {
|
|
"group": "main"
|
|
},
|
|
"skipFiles": ["${workspaceFolder}/node_modules/kea-typegen/**/*.js"]
|
|
},
|
|
{
|
|
"name": "Frontend (no typegen)",
|
|
"command": "bin/start-frontend",
|
|
"request": "launch",
|
|
"type": "node-terminal",
|
|
"cwd": "${workspaceFolder}",
|
|
"presentation": {
|
|
"group": "main"
|
|
},
|
|
"skipFiles": ["${workspaceFolder}/node_modules/kea-typegen/**/*.js"],
|
|
"env": {
|
|
"SKIP_TYPEGEN": "1"
|
|
}
|
|
},
|
|
{
|
|
"name": "Frontend (https)",
|
|
"command": "bin/start-frontend",
|
|
"request": "launch",
|
|
"type": "node-terminal",
|
|
"cwd": "${workspaceFolder}",
|
|
"presentation": {
|
|
"group": "main"
|
|
},
|
|
"env": {
|
|
"LOCAL_HTTPS": "1",
|
|
"JS_URL": "https://secure.insights.dev"
|
|
}
|
|
},
|
|
{
|
|
"name": "Backend",
|
|
"consoleName": "Backend",
|
|
"type": "debugpy",
|
|
"request": "launch",
|
|
"program": "${workspaceFolder}/manage.py",
|
|
"args": ["runserver"],
|
|
"django": true,
|
|
"env": {
|
|
"PYTHONUNBUFFERED": "1",
|
|
"DJANGO_SETTINGS_MODULE": "insights.settings",
|
|
"DEBUG": "1",
|
|
"DATASTORE_SECURE": "False",
|
|
"KAFKA_HOSTS": "localhost",
|
|
"DATABASE_URL": "postgres://insights:insights@localhost:5432/insights",
|
|
"SKIP_SERVICE_VERSION_REQUIREMENTS": "1",
|
|
"PRINT_SQL": "1",
|
|
"BILLING_SERVICE_URL": "https://billing.dev.insights.dev",
|
|
"CLOUD_DEPLOYMENT": "local"
|
|
},
|
|
"envFile": "${workspaceFolder}/.env",
|
|
"console": "integratedTerminal",
|
|
"cwd": "${workspaceFolder}",
|
|
"presentation": {
|
|
"group": "main"
|
|
}
|
|
},
|
|
{
|
|
"name": "Backend (with local billing)",
|
|
"consoleName": "Backend",
|
|
"type": "debugpy",
|
|
"request": "launch",
|
|
"program": "${workspaceFolder}/manage.py",
|
|
"args": ["runserver"],
|
|
"django": true,
|
|
"env": {
|
|
"PYTHONUNBUFFERED": "1",
|
|
"DJANGO_SETTINGS_MODULE": "insights.settings",
|
|
"DEBUG": "1",
|
|
"DATASTORE_SECURE": "False",
|
|
"KAFKA_HOSTS": "localhost",
|
|
"DATABASE_URL": "postgres://insights:insights@localhost:5432/insights",
|
|
"SKIP_SERVICE_VERSION_REQUIREMENTS": "1",
|
|
"PRINT_SQL": "1",
|
|
"BILLING_SERVICE_URL": "http://localhost:8100/",
|
|
"CLOUD_DEPLOYMENT": "local"
|
|
},
|
|
"console": "integratedTerminal",
|
|
"cwd": "${workspaceFolder}",
|
|
"presentation": {
|
|
"group": "main"
|
|
}
|
|
},
|
|
{
|
|
"name": "Celery Threaded Pool",
|
|
"consoleName": "Celery Threaded Pool",
|
|
"type": "debugpy",
|
|
"justMyCode": true,
|
|
"autoReload": {
|
|
"enable": true,
|
|
"include": ["insights/**/*.py"]
|
|
},
|
|
"request": "launch",
|
|
"program": "${workspaceFolder}/manage.py",
|
|
"args": ["run_autoreload_celery", "--type=worker"],
|
|
"console": "integratedTerminal",
|
|
"cwd": "${workspaceFolder}",
|
|
"env": {
|
|
"SKIP_ASYNC_MIGRATIONS_SETUP": "1",
|
|
"DEBUG": "1",
|
|
"BILLING_SERVICE_URL": "https://billing.dev.insights.dev",
|
|
"SKIP_SERVICE_VERSION_REQUIREMENTS": "1"
|
|
},
|
|
"presentation": {
|
|
"group": "main"
|
|
}
|
|
},
|
|
{
|
|
"name": "Celery Beat",
|
|
"consoleName": "Celery Beat",
|
|
"type": "debugpy",
|
|
"justMyCode": true,
|
|
"autoReload": {
|
|
"enable": true,
|
|
"include": ["insights/**/*.py"]
|
|
},
|
|
"request": "launch",
|
|
"program": "${workspaceFolder}/manage.py",
|
|
"args": ["run_autoreload_celery", "--type=beat"],
|
|
"console": "integratedTerminal",
|
|
"cwd": "${workspaceFolder}",
|
|
"env": {
|
|
"SKIP_ASYNC_MIGRATIONS_SETUP": "1",
|
|
"DEBUG": "1",
|
|
"BILLING_SERVICE_URL": "https://billing.dev.insights.dev",
|
|
"SKIP_SERVICE_VERSION_REQUIREMENTS": "1"
|
|
},
|
|
"presentation": {
|
|
"group": "main"
|
|
}
|
|
},
|
|
{
|
|
"name": "Nodejs Services",
|
|
"command": "bin/turbo --env-mode=loose --filter=@hanzo/nodejs start",
|
|
"request": "launch",
|
|
"type": "node-terminal",
|
|
"cwd": "${workspaceFolder}",
|
|
"env": {
|
|
"DATASTORE_SECURE": "False",
|
|
"DATABASE_URL": "postgres://insights:insights@localhost:5432/insights",
|
|
"KAFKA_HOSTS": "localhost:9092",
|
|
"WORKER_CONCURRENCY": "2",
|
|
"OBJECT_STORAGE_ENABLED": "True"
|
|
},
|
|
"presentation": {
|
|
"group": "main"
|
|
},
|
|
"envFile": "${workspaceFolder}/.env"
|
|
},
|
|
{
|
|
"name": "Temporal Worker",
|
|
"consoleName": "Temporal Worker",
|
|
"type": "debugpy",
|
|
"request": "launch",
|
|
"program": "${workspaceFolder}/manage.py",
|
|
"args": ["start_temporal_worker", "--task-queue", "${input:temporalTaskQueue}"],
|
|
"django": true,
|
|
"justMyCode": false,
|
|
"env": {
|
|
"PYTHONUNBUFFERED": "1",
|
|
"DJANGO_SETTINGS_MODULE": "insights.settings",
|
|
"DEBUG": "1",
|
|
"DATASTORE_SECURE": "False",
|
|
"KAFKA_HOSTS": "localhost",
|
|
"DATABASE_URL": "postgres://insights:insights@localhost:5432/insights",
|
|
"SKIP_SERVICE_VERSION_REQUIREMENTS": "1",
|
|
"PRINT_SQL": "1"
|
|
},
|
|
"console": "integratedTerminal",
|
|
"cwd": "${workspaceFolder}",
|
|
"presentation": {
|
|
"group": "main"
|
|
}
|
|
},
|
|
{
|
|
"name": "Backend (Attach to bin/start)",
|
|
"type": "debugpy",
|
|
"request": "attach",
|
|
"connect": {
|
|
"host": "localhost",
|
|
"port": 5678
|
|
},
|
|
"pathMappings": [
|
|
{
|
|
"localRoot": "${workspaceFolder}",
|
|
"remoteRoot": "${workspaceFolder}"
|
|
}
|
|
],
|
|
"justMyCode": false
|
|
},
|
|
{
|
|
"name": "Pytest: Current File",
|
|
"type": "debugpy",
|
|
"request": "launch",
|
|
"module": "pytest",
|
|
"args": ["${file}", "-vvv"],
|
|
"console": "integratedTerminal",
|
|
"justMyCode": true,
|
|
"envFile": "${workspaceFolder}/.env"
|
|
},
|
|
{
|
|
"name": "Frontend: Debug Jest Tests",
|
|
"type": "node-terminal",
|
|
"command": "pnpm test:unit --runInBand",
|
|
"request": "launch",
|
|
"cwd": "${workspaceFolder}"
|
|
},
|
|
{
|
|
"name": "(lldb) Attach",
|
|
"type": "cppdbg",
|
|
"request": "attach",
|
|
"program": "/Users/twixes/.pyenv/versions/3.10.10/envs/insights-3.10/bin/python",
|
|
"MIMode": "lldb"
|
|
},
|
|
{
|
|
"name": "Python C++ Debugger: Current File",
|
|
"type": "pythoncpp",
|
|
"request": "launch",
|
|
"pythonConfig": "custom",
|
|
"pythonLaunchName": "Pytest: Current File",
|
|
"cppConfig": "custom",
|
|
"cppAttachName": "(lldb) Attach"
|
|
},
|
|
{
|
|
"name": "Python: Debug Tests",
|
|
"type": "python",
|
|
"request": "launch",
|
|
"program": "${file}",
|
|
"purpose": ["debug-test"],
|
|
"console": "integratedTerminal",
|
|
"justMyCode": false
|
|
},
|
|
{
|
|
"type": "node",
|
|
"request": "launch",
|
|
"name": "Jest Current File",
|
|
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
|
|
"args": ["--detectOpenHandles", "${relativeFile}"],
|
|
"console": "integratedTerminal",
|
|
"internalConsoleOptions": "neverOpen",
|
|
"runtimeExecutable": "${env:HOME}/.nvm/versions/node/${input:pickVersion}/bin/node"
|
|
},
|
|
{
|
|
"name": "Python Debugger: Django Migrations",
|
|
"type": "debugpy",
|
|
"request": "launch",
|
|
"args": ["migrate", "insights"],
|
|
"django": true,
|
|
"env": {
|
|
"PYTHONUNBUFFERED": "1",
|
|
"DJANGO_SETTINGS_MODULE": "insights.settings",
|
|
"DEBUG": "1",
|
|
"DATASTORE_SECURE": "False",
|
|
"KAFKA_HOSTS": "localhost",
|
|
"DATABASE_URL": "postgres://insights:insights@localhost:5432/insights",
|
|
"SKIP_SERVICE_VERSION_REQUIREMENTS": "1",
|
|
"PRINT_SQL": "1",
|
|
"BILLING_SERVICE_URL": "http://localhost:8100/",
|
|
"CLOUD_DEPLOYMENT": "local"
|
|
},
|
|
"autoStartBrowser": false,
|
|
"program": "${workspaceFolder}/manage.py"
|
|
},
|
|
{
|
|
"name": "Dagster: Debug Dagit UI",
|
|
"type": "debugpy",
|
|
"request": "launch",
|
|
"module": "dagster",
|
|
"justMyCode": true,
|
|
"subProcess": true,
|
|
"envFile": "${workspaceFolder}/.env",
|
|
"args": ["dev", "--workspace", "${workspaceFolder}/.dagster_home/workspace.yaml"],
|
|
"env": {
|
|
"DAGSTER_HOME": "${workspaceFolder}/.dagster_home",
|
|
"DAGSTER_UI_PORT": "3030",
|
|
"DEBUG": "1"
|
|
}
|
|
}
|
|
],
|
|
"inputs": [
|
|
{
|
|
"id": "pickVersion",
|
|
"type": "command",
|
|
"command": "extension.node-version"
|
|
},
|
|
{
|
|
"id": "temporalTaskQueue",
|
|
"type": "pickString",
|
|
"description": "Task queue name",
|
|
"options": ["development-task-queue"],
|
|
"default": "development-task-queue"
|
|
}
|
|
],
|
|
"compounds": [
|
|
{
|
|
"name": "Insights",
|
|
"configurations": [
|
|
"Backend",
|
|
"Celery Threaded Pool",
|
|
"Celery Beat",
|
|
"Frontend",
|
|
"Nodejs Services",
|
|
"Temporal Worker"
|
|
],
|
|
"stopAll": true,
|
|
"presentation": {
|
|
"group": "compound"
|
|
}
|
|
},
|
|
{
|
|
"name": "Insights (no typegen)",
|
|
"configurations": [
|
|
"Backend",
|
|
"Celery Threaded Pool",
|
|
"Celery Beat",
|
|
"Frontend (no typegen)",
|
|
"Nodejs Services",
|
|
"Temporal Worker"
|
|
],
|
|
"stopAll": true,
|
|
"presentation": {
|
|
"group": "compound"
|
|
}
|
|
},
|
|
{
|
|
"name": "Insights (https)",
|
|
"configurations": [
|
|
"Backend",
|
|
"Celery Threaded Pool",
|
|
"Celery Beat",
|
|
"Frontend (https)",
|
|
"Nodejs Services",
|
|
"Temporal Worker"
|
|
],
|
|
"stopAll": true,
|
|
"presentation": {
|
|
"group": "compound"
|
|
}
|
|
},
|
|
{
|
|
"name": "Insights (local billing)",
|
|
"configurations": [
|
|
"Backend (with local billing)",
|
|
"Celery Threaded Pool",
|
|
"Frontend",
|
|
"Nodejs Services",
|
|
"Temporal Worker"
|
|
],
|
|
"stopAll": true,
|
|
"presentation": {
|
|
"group": "compound"
|
|
}
|
|
}
|
|
]
|
|
}
|