* error if unsupported db version
* upgrade mypy
* fix various types for mypy
* you can have it in any color you want, as long as it's black
* fix mypy
* Update `kafka-python`
* Format with Black
* Fix mypy after merge
Co-authored-by: Michael Matloka <dev@twixes.com>
* 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
* Unify SAML and non-saml tests workflows
* Include matrix name in cache key
* Prettify yaml
* Measure test duration time
* Install pytest-split
* Try out parallelism
* Update name
* Fixup yaml
* Upload artifacts
* Run FOSS tests separately
* Run mark.ee tests only once
* Set up needed files properly
* Run backend tests only on one python version
* Run only cloud tests for cloud repo
* Remove test_durations file for posthog/
* Skip setting up ch on foss tests
* Fixup cloud tests
* Cache .test_durations file
* Fix ternary expression
* Only upload artefacts if needed
* .test_durations change
* Default to 3.8.5 in tests
* Add a note
* Refactor column_optimizer to work differently
* WIP: Use counter over set
* Handle person filters in person query
* Remove a dead argument
* Use enum over parameter for determining behavior
* Allow excluding person properties mode when handled in person query
* Fix _get_person_query type
* Use correct table for funnel_event_query
* Remove unneeded override
* Add extra typing
* Filter by entity.properties in person query for trends
* Handle error 184 due to naming clash
* Better default for prop_filter_json_extract
* Update column_optimizer tests for Counter
* Handle person_props as extra_fields
* Handle breakdowns and person property filter pushdown
* Transform values correctly
* Simplify get_entity_filtering_params
* Fix funnel correlations
* Solve caching issues in trend people queries
* Remove @skip test
* Add syrupy tests for parse_prop_clauses
Can update these via --snapshot-update
* Add snapshot tests for person queries
* Add a few notes
* Update test to avoid collision
* Kill dead code
* Handle PR comments
* Update ee/clickhouse/queries/person_query.py
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
Previously it's possible that installing dev dependencies would end up
installing different versions to those used in production. Using `-c
requirements` we make sure that we constrain the dev deps by the
production pinned versions.
See
https://github.com/jazzband/pip-tools#workflow-for-layered-requirements
for details
* Speed up EE tests by not destroying tables
* Fix broken tests
* Speed up tests by not running migrations
* Fix last test
* req file?
* caching
* Parallel
* revert exp
* debug without parallel
* Revert "debug without parallel"
This reverts commit 83b3ad633f.
* Undo parallel tests
* Speed up more tests
* use final
* correct final
* print exception
* more prints
* move test
* add filter
* remove duplicate test
* prints here
* test wait
* set variable in query
* remove mutations_sync
* cleanup
Co-authored-by: eric <eeoneric@gmail.com>
* Fix `icontains` and support `href/`text` element filters
* Test `is_set`/`is_not_set` too
* Require newer `flake8` to support Py 3.8 walrus operator
* Better handle empty mutlivalue operators and support doublequotes
* Polish all element filtering cases
* Roll back general `icontains` fix
* Make minor improvements
* Chunk session recording events
Closes https://github.com/PostHog/posthog/issues/3632 and replaces https://github.com/PostHog/posthog/pull/3566/files
This should make it possible to ingest large full snapshot events
Base64 is used to compress the data for serialization purposes.
pytest.mock is used for clean patching methods
* Mock time.time for py3.7 compatibility
* Group captured $snapshot events by $session_id
* Don't chunk already chunked payloads
* 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>
* Basic caching for Clickhouse to redis
* Use redis for caching results
* add tests and fix bugs
* fix mypy
* add fakeredis as req
* add fakeredis to github action for testing
* add fakeredis to cloud tests too
* pickle -> json
* bytes
* json in tests
* tuplefy
* Remove some seemingly unused requirements
* Remove a few more
* Bring back dependencies of other requirements
* pip-compile prod requirements
* Sync with master updates
* Fix grep
* Revert "Fix grep"
This reverts commit 2e6538cad4.
* Fix grep but using cut
* Clean up and regenerate requirements
* Simplify requirements-dev
* Fix fakeredis import in production
* Black