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

8 Commits

Author SHA1 Message Date
Karl-Aksel Puulmann
1adaa8abb7
Chunk session recording events (#3705)
* 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
2021-03-23 11:39:13 +01:00
dependabot-preview[bot]
89691d74c5
Bump fakeredis from 1.4.4 to 1.4.5 (#3539)
Bumps [fakeredis](https://github.com/jamesls/fakeredis) from 1.4.4 to 1.4.5.
- [Release notes](https://github.com/jamesls/fakeredis/releases)
- [Commits](https://github.com/jamesls/fakeredis/compare/1.4.4...1.4.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-01 20:11:15 +01:00
dependabot-preview[bot]
8ef31567db
Bump asgiref from 3.2.7 to 3.3.1 (#3535)
Bumps [asgiref](https://github.com/django/asgiref) from 3.2.7 to 3.3.1.
- [Release notes](https://github.com/django/asgiref/releases)
- [Changelog](https://github.com/django/asgiref/blob/master/CHANGELOG.txt)
- [Commits](https://github.com/django/asgiref/compare/3.2.7...3.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-01 20:02:25 +01:00
dependabot-preview[bot]
5ae87afecd
Bump pytz from 2019.3 to 2021.1 (#3545)
Bumps [pytz](https://github.com/stub42/pytz) from 2019.3 to 2021.1.
- [Release notes](https://github.com/stub42/pytz/releases)
- [Commits](https://github.com/stub42/pytz/compare/release_2019.3...release_2021.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-01 20:01:13 +01:00
Karl-Aksel Puulmann
24de8b55e4
Run tests via pytest (#3417)
* 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>
2021-02-24 09:32:44 +02:00
Marius Andra
99e74da03d
Event must be a string (#2920)
* Event must be a string

* test that event can't be a dict

* convert dicts and other unknown event names to strings

* mypy

* update packages to have mypy working with python 3.9

* fix event name sanitization types

* fix misc type error from mypy/django-stubs update

* fix other type errors from mypy/django-stubs update

* add migration to update events for users if there's weird data in team.event_names

* ignore type to fix mypy issue

* fix migrations
2021-01-15 15:35:52 +01:00
James Greenhill
7ac64c84f1
Basic caching for Clickhouse to redis (#2300)
* 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
2020-11-13 13:20:00 +01:00
Michael Matloka
b7b9e8caf3
Remove some seemingly unused requirements and use pip-compile (#2192)
* 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
2020-11-10 10:17:48 +01:00