0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 09:14:46 +01:00
Commit Graph

25 Commits

Author SHA1 Message Date
Ben White
16870d63fc
feat: Plugin server services refactor - take 2 (#24737) 2024-09-03 11:00:50 +02:00
Ben White
3f56346512
chore: Reverts "Plugin server services refactor (#24638)" (#24733) 2024-09-02 08:43:52 +00:00
Ben White
4684a2bc0d
chore: Plugin server services refactor (#24638) 2024-09-02 09:56:13 +02:00
Tiina Turban
60ba76d9c4
feat: Part 1 of ability to spin up different pipelines (#23601) 2024-07-17 14:11:49 +02:00
Julian Bez
9576fab1e4
chore: Add Pyupgrade rules (#21714)
* Add Pyupgrade rules
* Set correct Python version
2024-04-25 08:22:28 +01:00
ted kaemming
9299aa09e5
fix(plugin-server): Remove Postgres-based plugin error logging in favor of existing ClickHouse-based approaches (#18764) 2023-11-27 10:41:36 -08:00
Xavier Vello
d61ae7b18e
fix(plugin-server): don't sent app debug logs to CH (#18816) 2023-11-23 10:46:01 +01:00
timgl
22bd594263
fix(webhooks): Always check for unsafe urls (#18360)
* fix(webhooks): Always check for unsafe urls

* Roll out the hostname guard fully

The mechanism is now only disabled in local dev.

* Update hooks.test.ts

* Disable URL check in functional tests

---------

Co-authored-by: Michael Matloka <michal@matloka.com>
2023-11-03 12:58:30 +01:00
Tom Owers
5513be7731
chore: upgraded Ruff linter (#18188)
* Upgraded Ruff linter

* Formatted whole codebase with new ruff rules

* Revert import removal

* Fixed mypi issues or added ignores

* Fixed schema formatting

* Fixed hogvm failing tests

* Remove duplicate key in list
2023-10-26 12:38:15 +02:00
Xavier Vello
f43fe29ec4
fix: break circular references in hub to reduce jest memory usage (#17210) 2023-08-28 11:44:49 +02:00
James Greenhill
bc05c1b8cd
fix: Move to RE2 for chainToElements (#17198)
* fix: Move to RE2 for chainToElements

* update actual plugin-server chainToElements

* sort imports

* pull RE2 regex definitions into the module

* Update ci-plugin-server.yml

* bump

* bump re2 version

* moar mem

* update pnpm lock

---------

Co-authored-by: Xavier Vello <xavier.vello@gmail.com>
Co-authored-by: Xavier Vello <xavier@posthog.com>
2023-08-25 10:05:33 -07:00
Harry Waye
2e4c4d4bb3
chore: print session messages as we go, save memory (#14671)
* chore: print session messages as we go, save memory

Wanted to make sure we're not getting close to any memory limits when
generating, stream to Kafka asap

* wip

* wip
2023-03-10 10:52:48 +00:00
Harry Waye
a26a87cf40
chore: add profiler to session recordings load test (#14649)
chore: add profiler to session recordings load test
2023-03-09 14:07:54 +00:00
Harry Waye
9609d0bf59
chore(recordings): fix no team found on load test (#14626)
* chore(recordings): fix no team found on load test

For some reason it's not picking up the team from the token. I assume
there's some env var difference because it seems to work fine locally.

* wip

* wip

* fix ci

* increase session count

* no need for test data

* reduce session count
2023-03-08 14:22:04 +00:00
Harry Waye
a29e137069
chore(recordings): add command to generate session recording events (#14496)
* chore(recordings): add command to generate session recording events

The intention of this is to be able to generate somewhat realistic
session recording events to test the ingestion pipeline performance,
such that we don't need to rely on pushing to production.

This command just outputs for stdout a single JSON encoded line per
event, which can then e.g. be piped into kafkacat or
kafka-console-producer, or put to a file to then be used by vegeta to
perform load testing on the capture endpoint.
2023-03-08 11:46:56 +00:00
Harry Waye
e156a19081
ci(plugin-server): wait for server to be listening before running tests (#13581)
* ci(plugin-server): wait for server to be listening before running tests

The export tests seem to be very flaky. Looking through the logs on
GitHub Actions it looks like there are some http connection refused
errors, so I'm additionally adding a wait for the listening event to be
emitted to try to remove some racy behaviour.

* add better timeout handling
2023-01-05 19:55:46 +00:00
Harry Waye
6f6bf7e9ae
ci(plugin-server): use colors in functional test output (#13357)
Not important but something to do while waiting for other bits and bobs.
2022-12-15 16:56:13 +00:00
Thomas Obermüller
4a30e78b22
chore: use pnpm to manage dependencies (closes #12635) (#13190)
* chore: use pnpm to manage dependencies

* Fix CI errors

* Don't report Docker image size for external PRs

* Fix pnpm-lock.yaml formatting

* Fix module versions

* Ignore pnpm-lock.yaml

* Upgrade Cypress action for pnpm support

* Set up node and pnpm before Cypress

* Fix typescript issues

* Include patches directory in Dockerfile

* Fix Jest tests in CI

* Update lockfile

* Update lockfile

* Clean up Dockerfile

* Update pnpm-lock.yaml to reflect current package.json files

* remove yarn-error.log from .gitignore

* formatting

* update data exploration readme

* type jest.config.ts

* fix @react-hook issues for jest

* fix react-syntax-highlighter issues for jest

* fix jest issues from query-selector-shadow-dom

* fix transform ignore patterns and undo previous fixes

* add missing storybook peer dependencies

* fix nullish coalescing operator for storybook

* reorder storybook plugins

* update editor-update-tsd warning to new npm script

* use legacy ssl for chromatic / node 18 compatibility

* use pnpm for visual regression testing workflow

* use node 16 for chromatic

* add @babel/plugin-proposal-nullish-coalescing-operator as direct dependency

* try fix for plugin-server

* cleanup

* fix comment and warning

* update more comments

* update playwright dockerfile

* update plugin source types

* conditional image size reporting

* revert react-native instructions

* less restrictive pnpm verions

* use ref component name in line with style guide

Co-authored-by: Jacob Gillespie <jacobwgillespie@gmail.com>
2022-12-12 10:28:06 +01:00
Harry Waye
34a6f38bf3
ci(plugin-server): timeout waiting for server to stop after 30 seconds (#13086)
* ci(plugin-server): timeout waiting for server to stop after 30 seconds

Sometimes the plugin server doesn't manage to stop. We should fix that
as there is obviously a bug there, but I'll do that separately. As a
failsafe I added a 30s timeout.

* wait for 30s

* add plugin server logs if we don't shut down in time

* remove set -x

* always show logs

* wip
2022-12-02 15:45:21 +00:00
Harry Waye
2c6a31c31b
ci(plugin-server): make function test output less confusing (#12847)
* ci(plugin-server): make function test output less confusing

Redirect logs to file, output only on test failure.

* kick ci

* put setup in group

* wip

* wip

* wip
2022-11-17 18:32:00 +00:00
Harry Waye
ee3820957c
test(plugin-server): remove reload-actions, enable app metrics (#12606)
I had added `reload-actions` specifically for testing in
https://github.com/PostHog/posthog/pull/12521/files#diff-817bc42d0008d9b475bf2736d21dcfd35bfad26a11b97340e8917b1eee5b58a6

Turns out there was already a `reload-action` which is more targeted and
a better fit. Plus it means we're actually testing code that's used in
production 

I also enabled app metrics, although don't test any of it. At least the
code will have been run.
2022-11-03 16:37:04 +00:00
Harry Waye
aa5231307e
ci(plugin-server): add coverage for functional_tests (#12593)
* ci(plugin-server): add coverage for functional_tests

Now I've completely separated out the test runner from the running
server (i.e. they are in completely separate processes), we can pull out
a coverage report using `c8` (which is using node v8 built in coverage
tooling and outputing to an istambul compatible html format).

* wip

* wip

* wip

* wip

* wip
2022-11-03 13:06:12 +00:00
James Greenhill
434e379f9a Add 'plugin-server/' from commit '01a99a4e26b0b11f068a7073d6b94e53a7214d33'
git-subtree-dir: plugin-server
git-subtree-mainline: 776b056b6d
git-subtree-split: 01a99a4e26
2021-10-28 14:59:19 -07:00
James Greenhill
145937a435
Revert "Monorepo with updated history" 2021-10-28 14:55:17 -07:00
James Greenhill
65512ae16f
Pack up plugin-server for moving 2021-10-12 15:45:42 -07:00