* set debug, test, and primary_db env variables based on context
* remove unnecessary print
* also use pytest.ini for some tests run straight from pytest at the CLI
* use plugin-server in same repo
* remove plugins dir
* update docker files
* clean up docker files:
* visual separation
* run plugin server test stack
* build and push test image
* revert push image
* fix default yarn start
* another fix
* fix some more
* add plugin-server-prod script
* make executable
* update scripts:
* revert prod script
* fixes
* fix tests
* clean
* move build to docker
* build plugin-server in prod dockerfile
* use different entrypoint for e2e test
* fix bugs with ts-node-dev
* restore yarn.lock
* lost a few changes in the rebase
* fix dockerfile
Co-authored-by: James Greenhill <fuziontech@gmail.com>
* only load events table from the URL on allow list of URLs
* add return type to function
* pass scene URL into events table
* use urlpattern to check if scene is loaded in events table
* don't need to check if still on the same page as when loaded because urltoaction is now specific
* which means we don't need url pattern matching at all
* add scene url to events scene export's logic props
* use a different action name for each run or retries can never complete as the action cannot be saved
* do not poll results if moved away from sceneUrl
* remove tabs from person/action event tables
* so cypress can run locally
* break the dependency of running one test first so the other can pass
* move check into logic and add an e2e test
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* Type math in Entity
* Allow passing group_type_index from FE to BE
* Get a initial query running
* Add group value filter if aggregating by groups
* Add snapshot testing for trends queries
* isort
* Update tests
* Add test for column_optimizer
* Update ee/clickhouse/queries/trends/util.py
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
* Allow passing in token to Personal API Key requests
* fix
* fix accidental commit
* update comment
* dont access self.request.user.team if not needed
* add tests
* Add an assert to make mypy happy
Co-authored-by: Michael Matloka <dev@twixes.com>
From https://medium.com/@taylorhughes/three-quick-tips-from-two-years-with-celery-c05ff9d7f9eb
> By default, preforking Celery workers distribute tasks to their worker processes as soon as they are received, regardless of whether the process is currently busy with other tasks.
> If you have a set of tasks that take varying amounts of time to complete — either deliberately or due to unpredictable network conditions, etc. — this will cause unexpected delays in total execution time for tasks in the queue.
This is 100% the case for us. This should "load balance" the tasks
better across workers.
* Compile requirements-dev.txt with latest pip-tools
* Install pytest
* Avoid picking up factories as tests
* New runner
* Always set TEST env variable running tests
Some of our tests rely on it.
* Remove repetition
* Fix a broken test
* Cut down noise from bin/tests
* Rename test factory
* Fix stickiness filter
* Skip a broken test
This has been broken since numpy removal PR. Sadly tests were not
running for this submodule
* Fix import on ee
* Run ee tests properly
The django_db_setup fixture will be automatically run when running ee/
module tests.
* Make tests run on CI
* Include REDIS_URL, fix cloud
* Set TEST env variable
* Hack cloud tests to work
* Attempt at workflow fix
* Import Person model when running ee tests
This module implicitly adds hooks, so this is needed when running tests
* Respect reuse-db for clickhouse
* Add custom markers to avoid warnings
* pytest: use ch test database always
Accidentally wiped by ch setup a few times without this. Oops
* Remove repetition in tests
* Pytest: Always run migrations
Testing a state cleanup fix
* Use same DB in conftest and main code
* Pytest: autoset TEST setting without env variable
* fix broken test
Co-authored-by: eric <eeoneric@gmail.com>
* Add AUTO_LOG_IN environment variable
This will be used when running tests on CI, setting up demo instances
and with cypress vcr
* Auto log in in review apps, e2e tests
This will speed up tests/reviewing significantly
* Rename AUTO_LOG_IN to AUTO_LOGIN
Co-authored-by: Michael Matloka <dev@twixes.com>
* WIP: get cypress something doing
* Get a test running
* Get css loading, stub posthog
* Move helpers to separate file
* Givens > given2
It plays nicer with beforeEach
* Test for session filters
* Test date navigation
* Test filtering
* Try keep old tests running
* Try get tests running under CI
* Prettify fixtures
* Cleanup, use cypress 6
* Add yarn build
* Fix e2e cypress tests
* given2 => givens
* Rename `frontend-test-runner` to `e2e-test-runner`
* Fix cypress test
* Add webpack-preprocessor as a devDependency
* Improve freezing time
* Make css inclusions automatic for component tests
* Verify no new typescript code breaks "strict" compilation
With this we have a file containing all current errors. As the code
changes, we should not add more errors here.
* remove some lines to show a failure
* Add total count to script
* Update blacklist after rebase
* Remove some fails on purpose.
* Attempt a reorder
* Add missing file
* Update script to write typegen
* Refresh list
* Attempt to use normal tsc
* update blacklist
* Store all errors
* echo for typegen
* Add check command
* typegen 3 times
* typegen 4 times
* typegen 6 times
* typegen 10 times
* remove debug code
* Update kea typegen to latest
* Remove hacks
* Add setting for handing off process_event_ee to plugin server
* Add StatsD settings to KEYS
* bin/plugin-server → start-plugin-server & docker-plugin-server
* Simplify to only add docker-plugin-server
* Bring back original comment
* Turn down verbosity of plugin server install
* Remove redundant if
* Fix comment
* Remove lone newline
* Roll back unsafe script changes
* Simplify dockerized plugins
* Add some depends_on
* Clarify HAND_OFF_INGESTION env var
* Use posthog-plugin-server 1.0.0-alpha.1
* Enhance bin/plugin-server and rm bin/docker-plugin-server
* Move around PLUGIN_SERVER_INGESTION_HANDOFF ifs
* Use posthog-plugin-server@1.0.0-alpha.2
* Support kafka+ssl:// in plugin-server
* Produce to topic events_ingestion_handoff for plugin server
* Use posthog-plugin-server@1.0.0-alpha.3
* Don't import Kafka topics in FOSS
* Use @posthog/plugin-server
* Update yarn.lock
* Add commands for external ClickHouse setup/teardown
* Actually delete test CH teardown command
* ClickhouseTestRunner.setup_test_environment() in setup_test_clickhouse
* Rework test setup script to work with Postgres too
* Restore master plugins dir for merge
* Unset PLUGIN_SERVER_INGESTION_HANDOFF in docker-compose.ch.yml
* Fix unimportant typo
* Build log_event data dict only once
* Make it clear in bin/plugin-server help that it's bin
* Space space
* Add relevant settings to KEYS in bin/plugins-server
* Log all EE events to events_handoff Kafka topic for plugin server
* Clean up settings
* Fix FOSS
* Don't introduce KAFKA_EVENTS_HANDOFF
* Add cosmetic newline
* Add DEBUG WAL print()
* Deprecate dashboard item type and move to display
* Mypy rerors
* fix test
* fix
* Fix test
* Fix another test
* Remove determineInsightType
* Get rid of RetentionTable display types
* Fix update dashboard
* nodejs worker concurrency on heroku
* upgrade plugin server
* upgrade server
* fix another bug with 0.3.2
* plugin server with resilient redis
* plugin server with more resilient workers
* new plugin server
* update