0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 12:21:02 +01:00
posthog/.vscode/launch.json

136 lines
4.7 KiB
JSON
Raw Normal View History

{
// 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": "Celery",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/env/bin/celery",
"console": "integratedTerminal",
"python": "${workspaceFolder}/env/bin/python",
"cwd": "${workspaceFolder}",
"args": [
"-A",
"posthog",
"worker",
"-B",
"--scheduler",
"redbeat.RedBeatScheduler",
"--without-heartbeat",
"--without-gossip",
"--without-mingle",
"-Ofair",
"-n",
"node@%h"
],
"env": {
"SKIP_ASYNC_MIGRATIONS_SETUP": "0",
"DEBUG": "1",
"BILLING_SERVICE_URL": "https://billing.dev.posthog.dev",
"SKIP_SERVICE_VERSION_REQUIREMENTS": "1"
}
},
{
"command": "npm run start:dev",
"name": "Plugin Server",
"request": "launch",
"type": "node-terminal",
"cwd": "${workspaceFolder}/plugin-server",
"env": {
"CLICKHOUSE_SECURE": "False",
"DATABASE_URL": "postgres://posthog:posthog@localhost:5432/posthog",
"KAFKA_HOSTS": "localhost:9092",
"WORKER_CONCURRENCY": "2",
"OBJECT_STORAGE_ENABLED": "True"
}
},
{
"name": "Frontend",
"command": "npm start",
"request": "launch",
"type": "node-terminal",
"cwd": "${workspaceFolder}"
},
{
"name": "Backend",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": ["runserver"],
"django": true,
"env": {
"PYTHONUNBUFFERED": "1",
"DJANGO_SETTINGS_MODULE": "posthog.settings",
"DEBUG": "1",
"CLICKHOUSE_SECURE": "False",
"KAFKA_HOSTS": "localhost",
"DATABASE_URL": "postgres://posthog:posthog@localhost:5432/posthog",
"SKIP_SERVICE_VERSION_REQUIREMENTS": "1",
"PRINT_SQL": "1",
"REPLAY_EVENTS_NEW_CONSUMER_RATIO": "1.0",
"AUTO_LOGIN": "True",
"BILLING_SERVICE_URL": "https://billing.dev.posthog.dev"
},
"console": "integratedTerminal",
"python": "${workspaceFolder}/env/bin/python",
"cwd": "${workspaceFolder}"
2023-08-16 16:06:09 +02:00
},
{
"name": "Temporal Worker",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": ["start_temporal_worker"],
"django": true,
"env": {
"PYTHONUNBUFFERED": "1",
"DJANGO_SETTINGS_MODULE": "posthog.settings",
"DEBUG": "1",
"CLICKHOUSE_SECURE": "False",
"KAFKA_HOSTS": "localhost",
"DATABASE_URL": "postgres://posthog:posthog@localhost:5432/posthog",
"SKIP_SERVICE_VERSION_REQUIREMENTS": "1",
"PRINT_SQL": "1"
},
"console": "integratedTerminal",
"python": "${workspaceFolder}/env/bin/python",
"cwd": "${workspaceFolder}"
perf: Parse HogQL with C++ for a huge speedup (#17659) * Add partial C++ parser of HogQL * Support all the rules and add proper error handling * Use `AlignAfterOpenBracket: BlockIndent` * Reuse all the parser tests for the C++ backend * Fix relationship between headers and implementations * Add more error handling and fix minor issues * Build both Python and C++ parsers in the package.json script * Update ARRAY JOIN error assertion * Improve timeit * Move the C extension to the top level * Refactor `vector_to_list_string` * Build the parser on Linux * Build wheels for the parser * Simplify Linux build and fix macOS * Fix Homebrew paths on x86 and don't fail fast in CI * Set MACOSX_DEPLOYMENT_TARGET for C++20 * Set up QEMU for Linux ARM builds * Publish the wheels on PyPI * Avoiding Linux ARM emulation in CI for now * Build sdist too * Revert Dockerfile changes * Fix PyPI publish * Add README and optimize sdist build * Use setup.py directly instead of build * Use PyPI hogql-parser instead of local * Also revert production-unit.Dockerfile * Fix sdist upload and add Linux ARM back * No Linux ARM build in the end * Fix artifact uploading * Do try building Linux ARM We need this for prod. * Use `npm` in `grammar:build` `pnpm` is not available in that job. * Fix formatting of hogql_parser * Build everything on macOS * Revert "Build everything on macOS" Not so fast actually. * Use hogql-parser=0.1.1 * Fix dylib in macOS wheel * Bump hogql-parser version * Fix missing module error * Delete timeit.py * Make error handling robust * Format the C++ * Use `hogql-parser==0.1.1` * Fix reserved keyword error assertions * Use HEAD hogql_paresr in CI * Fix `apt` usage * Add some sudo in CI * Ensure package will be releasable before build * Bump version to 0.1.3 * Cover C++ `unquote_string` with tests * Use BuildJet ARM runners for ARM builds * Add some instructions * Add HogQL version check to backend CI * Update requirements.txt * Use `setuptools` instead of the deprecated `distutils` * Fix working dir in backend CI * Align ANTLR versions * Add test for "mismatched input" This is thrown differently than other HogQLSyntaxExceptions in C++, so might help reveal what's going on with tests failing only on Linux CI and not macOS dev * Add types and bump version * Comment instead of failing version check * Automate hogql-release version bump * Fix checkout token * Don't build hogql-parser if there were no changes * Update query snapshots * Update query snapshots * Update query snapshots * Update query snapshots * Improve documentation * Use new hogql-parser version * Fix error start and end initialization * Note `antlr4-cpp-runtime` Co-authored-by: Marius Andra <marius.andra@gmail.com> * Also remove NUL chars in C++ * Check ANTLR4 runtime archive checksum for security * Note more decrefs to add * Add vector size checks * Use new hogql-parser version * Don't support the `start` arg in C++ `parse_expr` * Use new hogql-parser version --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Marius Andra <marius.andra@gmail.com>
2023-10-13 15:58:08 +02:00
},
{
"name": "Pytest: Current File",
"type": "python",
"request": "launch",
"module": "pytest",
"args": ["${file}", "-vvv"],
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "(lldb) Attach",
"type": "cppdbg",
"request": "attach",
"program": "/Users/twixes/.pyenv/versions/3.10.10/envs/posthog-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"
}
],
"compounds": [
{
"name": "PostHog",
2023-08-16 16:06:09 +02:00
"configurations": ["Backend", "Celery", "Frontend", "Plugin Server", "Temporal Worker"],
"stopAll": true
}
]
}