0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 18:07:17 +01:00
Commit Graph

84 Commits

Author SHA1 Message Date
Georgiy Tarasov
d836bc860a
feat(product-assistant): evaluation pipeline (#26179)
Co-authored-by: Michael Matloka <michael@posthog.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-20 15:44:47 +01:00
Michael Matloka
bf1161364b
chore(dev): Introduce django-linear-migrations (#25989) 2024-11-05 13:53:05 +01:00
Tom Owers
5647c557ab
feat(data-warehouse): added sql source v2 (#25858)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Michael Matloka <michael@posthog.com>
2024-10-31 12:56:02 +00:00
Georgiy Tarasov
62cfd13d1b
feat(product-assistant): enhanced trends generation (#25484)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Michael Matloka <michael@posthog.com>
2024-10-25 14:19:45 +02:00
Michael Matloka
de3d95af0d
chore: Person ID overrides by default (#22811)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Anirudh Pillai <anirudhx5@gmail.com>
2024-09-13 16:40:46 +00:00
Michael Matloka
025f019294
feat(insights): generate trends using GenAI (#24463)
Co-authored-by: Georgiy Tarasov <gtarasov.work@gmail.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Anirudh Pillai <anirudhx5@gmail.com>
2024-09-04 16:33:11 +00:00
Julian Bez
34d0da70d9
chore(deps): Upgrade mypy, stubs, and ruff (#24500)
Also remove type annotations for Django fields, due to updates to the 
stubs and possibly to mypy they are actively unhelpful now.
2024-08-22 09:42:25 +00:00
Tom Owers
f4180098b6
feat(data-warehouse): add the ability to connect to MySQL as a datawa… (#23921)
Co-authored-by: Jacob Spizziri <jspizziri@weare5stones.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-24 10:50:24 +01:00
Julian Bez
2724b8e8a7
feat(queries): Improve async queries error handling (#23707)
- catch almost all errors: They are sent to Sentry anyways. There is no benefit at this point to make the Celery task fail.
- consolidate query status `complete` flag to include complete results as well as errors
  - this makes it easier to use, no more separate checking for errors
- make results live longer: if the chain takes some time to complete, previously results expired/vanished while a dashboard was polling for them
  - this fixes POSTHOG-1BC6
- other refactorings
2024-07-17 14:34:33 +00:00
Sandy Spicer
eac199d24a
chore: upgrade python to 3.11 (#23206) 2024-06-27 14:16:27 -07:00
Julian Bez
69927a7675
feat(celery): Restart Celery automatically on code changes (#23279) 2024-06-27 17:02:11 +02:00
Sandy Spicer
6c23c9bd89
revert: "chore: upgrade python to 3.11 🐍" (#23198)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-24 11:50:48 -07:00
Julian Bez
5617963e7a
chore: Update pyproject.toml for Python 3.11 (#23181) 2024-06-24 15:42:47 +01:00
Ben White
95a0b85848
feat: DeliveryHog (#22706) 2024-06-10 15:12:04 +02:00
Sandy Spicer
09b6933032
feat(dev): add xdist for local concurrency in pytest (#22684) 2024-06-05 12:32:02 -07:00
Thomas Obermüller
f3aab093bf
fix(hogql): derive cache keys from pydantic model_dump (#22465) 2024-06-03 15:34:05 +00:00
Tom Owers
7b7eb441bd
fix(data-warehouse): Use any type of private key for the ssh tunnel (#22578)
* Use any type of private key for the ssh tunnel

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* mypy updates

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* mypy

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-30 08:54:53 +00:00
Tomás Farías Santana
61870fa8ca
chore: Update stub package (#21679)
Co-authored-by: Julian Bez <julian@posthog.com>
2024-05-07 16:09:18 +00:00
Julian Bez
0d2e574865
chore(deps): Upgrade ruff and mypy (#22035) 2024-05-03 08:00:43 +01:00
Eric Duong
20a9b50b45
Revert "chore(data-warehouse): convert postgres import to async" (#21995)
Revert "chore(data-warehouse): convert postgres import to async (#21959)"

This reverts commit ec79157d94.
2024-04-30 15:58:01 -04:00
Eric Duong
ec79157d94
chore(data-warehouse): convert postgres import to async (#21959)
* convert postgres import to async

* use async

* remove sqlalchemy

* update package vers

* change var name

* adjust date vars
2024-04-30 15:23:06 -04:00
Eric Duong
9fa792dfe1
chore(data-warehouse): upgrade dlt version (#21743)
* update requirements

* change version

* Fixed mypy issues

* remove pip-tools

---------

Co-authored-by: Tom Owers <owerstom@gmail.com>
2024-04-23 10:37:08 -04:00
Michael Matloka
233d3a9098
chore(deps): Remove unused Python requirements (#21580)
* chore(deps): Remove unused Python requirements

* Also remove `dnspython`

* Recompile txts

* Revert "Also remove `dnspython`"

This reverts commit 7eaf89979b774808cc0920c34a3a1cf1d75d2f14.

* Re-recompile txts

* Remove more deps based on `deptry`

* Restore `phonenumberslite`

* Restore `geoip2`

* Restore `python3-saml`

* Move `prance` and `openapi-spec-validator` to dev reqs

* Reorder `geoip2`

* Force HTTP 1.1 in downloading MMDB

Should fix CI failures caused by `curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)` (e.g. https://github.com/PostHog/posthog/actions/runs/8741861825/job/23988870688?pr=21580).
2024-04-22 22:52:47 +02:00
Julian Bez
a0fc086175
chore(deps): Upgrade ruff (#21648) 2024-04-19 14:19:10 +02:00
Julian Bez
dc0cf33e8e
chore(deps): Upgrade to Django 4.2 (#18653)
* Upgrade dependencies

* Fix middleware error

Among
https://docs.djangoproject.com/en/4.2/releases/4.0/#features-removed-in-4-0

* Upgrade psycopg

We need to be on >= 3.1.8

Locally there is an additional problem that somehow psycopg2
seemingly overshadows psycopg, making it appear that 3.1 works.

Had to install pip install "psycopg[binary,pool]==3.1.2" to
recreate the problem.

* Go to Django 4.1 because of problems with psycopg3

We use custom SQL that somehow doesn't get formatted in the right way
using server or client side cursors.

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Switch TaggedItem tests to assert ValidationError

Because full_clean validates since Django 4.1, see
https://docs.djangoproject.com/en/4.2/releases/4.1/#validation-of-constraints

* Remove type: ignore comments

Come up as
error: Unused "type: ignore" comment

* Update query snapshots

* Figure out psycopg problem and try Django 4.2 again

* Update query snapshots

* Fix other IN errors

* Fix getting status

* Fix psycopg3 issues

* Fix psycopg issues

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update deps

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Fix more tests

* Adjust baseline

* Remove sqlcommenter (should be PostgresQL only anyways)

* Fix file

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Fix queries

* Fix query

* Revert

* Update requirements.in

* Remove restore-virtualenv

Because not maintained anymore

* Revert "Remove restore-virtualenv"

This reverts commit c2a7ef8a1e.

* mypy

* Adjust num queries

* Adjust num queries

* Adjust num queries

* Update query snapshots

* Add to updated_fields

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2024-04-16 10:53:32 +01:00
Brett Hoerner
36d1be08f9
feat(batch-exports): Add HTTP Batch Export destination (#20318)
* feat(batch-exports): Add HTTP Batch Export destination

To possibly be reused in the future, but for now it only submits
payloads in the PostHog /batch format.

* add geoip_disable, don't toJSONString elements_chain, and mark some HTTP status codes as non-retryable

* Add heartbeating to HTTP batch export

* Update query snapshots

* Update query snapshots

* fix: Re-use client session

* refactor: Rename last_uploaded_part_timestamp to last_uploaded_timestamp

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tomás Farías Santana <tomas@tomasfarias.dev>
2024-02-19 10:40:09 +00:00
David Newell
974553f84d
chore: upgrade OpenAI client (#19986) 2024-01-29 11:47:14 +00:00
Julian Bez
7cabe21ae3
chore: Upgrade pydantic, mypy, and others (#19660)
* Upgrade pydantic and all related
* Upgrade mypy
* Add mypy-baseline

To update baseline when you fix something (only then!) use:

    [mypy cmd] | mypy-baseline sync
2024-01-10 08:32:55 +00:00
danielxnj
d9faf41195
Revert "chore(deps): Upgrade to Django 4.1 (#19285)" (#19337)
This reverts commit 3c399da5d2.
2023-12-14 12:57:30 -05:00
Julian Bez
3c399da5d2
chore(deps): Upgrade to Django 4.1 (#19285)
Another try for #18830
2023-12-14 15:51:38 +00:00
Julian Bez
8e8a6dcead
fix: Revert "chore(deps): Upgrade to Django 4.1" (#19258)
Revert "chore(deps): Upgrade to Django 4.1 (#18830)"

This reverts commit 580c7b1aba.
2023-12-11 09:51:20 -08:00
Julian Bez
580c7b1aba
chore(deps): Upgrade to Django 4.1 (#18830)
* Upgrade dependencies
* Fix middleware error

Among
https://docs.djangoproject.com/en/4.2/releases/4.0/#features-removed-in-4-0

* Switch TaggedItem tests to assert ValidationError

Because full_clean validates since Django 4.1, see
https://docs.djangoproject.com/en/4.2/releases/4.1/#validation-of-constraints

* Remove type: ignore comments

* Set CSRF_TRUSTED_ORIGINS

* Update access.py

Co-authored-by: Paul D'Ambra <paul@posthog.com>
2023-12-11 13:44:40 +00:00
Eric Duong
1fcd437f1d
feat(data-warehouse): migrations for data sync (#18966)
* just code for migrations

* use all timezones because update would cause common_timezones to be less inclusive

* install new dependencies

* add comment

* revert

* restore

* fix type
2023-11-29 13:30:50 -05: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
James Greenhill
3e13484de1
chore: move billing celery job to use offline cluster and increase timeout from 2 minutes to 5 min (#17656)
* chore: move billing celery job to use offline cluster and increase timeout from 2 minutes to 5 min

* add retry logic

* add types for retry
2023-09-27 21:32:52 +00:00
Thomas Obermüller
26f29f11e4
chore(python): upgrade pydantic and datamodel-code-generator (#17477) 2023-09-18 15:05:46 +02:00
Paul D'Ambra
48515ccf8b
chore: update pytest (#16947) 2023-08-10 12:10:16 +01:00
Harry Waye
440642243a
chore(batch-exports): add snowflake export workflow (#15907)
* chore(batch-exports): add snowflake export workflow

This workflow uses Snowflake internal stages to load data from
ClickHouse into a Snowflake table. We maintain the existing events table
schema as used in the existing Snowflake App.

Something I haven't done yet is:

 1. made sure e.g. we get the `elements` and `person_set` etc. data into
    Snowflake.
 2. the additional frontend to enable configuring the Snowflake
    connection.

* remove unsed var

* include excluded events in test
2023-06-09 06:59:07 +00:00
Neil Kakkar
db4d0a205d
feat(decide): Add proper analytics for decide requests (#15837) 2023-06-06 17:14:13 +01:00
Harry Waye
ac1d3e7b52
feat(batch_exports): add backend API and S3 temporal workflow (#15649)
* feat(batch_exports): add backend API and S3 temporal workflow

This adds the backend API for batch exports, which will handle reverse
ETL exports to e.g. S3, Snowflake etc.

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-01 17:05:37 +01:00
Paul D'Ambra
b7c21429bc
fix: protect schema and port in exporter urls (#15537) 2023-05-16 11:13:45 +02:00
Paul D'Ambra
5efd14441e
chore: upgrade drf (#15433) 2023-05-10 09:37:53 +01:00
Tomás Farías Santana
c641f0270b
fix: Update packaging dependency and pin prance (#15228)
https://twitter.com/pauldambra/status/1650845189848571904
2023-04-25 13:27:59 +00:00
Paul D'Ambra
6440988c13
fix: updates some dependencies with "high" vulnerabiltiies (#15215)
* fix: update django to v3 latest

* upgrade redis-py too
2023-04-25 08:14:40 +01:00
James Greenhill
03eaed4390
chore: remove isort - ruff is doing the job now (#14849) 2023-03-21 11:53:45 -06:00
James Greenhill
9a2a087a9c
feat: Migrate flake8 -> ruff (#14838)
* feat: Migrate flake8 -> ruff

* move the exclude to configs instead of CI
2023-03-20 23:00:54 -06:00
James Greenhill
0223d7ab86
feat: Add Temporal to the dev and hobby stacks (#14658)
* feat: Add Temporal to the dev and hobby stacks

* disable elastic for hobby because of resources

* checkpoint

* update requirements

* worker is up, but without the sandbox

* ensure temporal does not depend on elastic

* Feedbacked

* pip-compile dev

* mypy fixes

* add a bit of colorful logging

* add django temporal worker to the mix

* checkpoint for dev-full docker

* Working on docker-full, but checkpointing for now

* add migration bits for full
2023-03-20 16:56:14 -06: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
Frank Hamand
0dfc549f96
chore: Python 3.10 (#14360)
* Python 3.10

Performance gains go brrr

* Add missing SAML deps

* Add missing dep to dockerfile

* Update mypy to 0.981 for 3.10.7 compatibility

Needed this bug to be fixed: https://github.com/python/mypy/issues/13627

This also incidentally fixed the mypy bug in csv_exporter.py

* bump to 3.10.10
2023-02-24 09:14:09 +00:00
Frank Hamand
1d7afd3352
chore: Python 3.9 (#14336)
* Update to python 3.9

* Update pytest

6.2.2 doesn't support python 3.9+

* Add missing saml dependencies

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-22 09:23:22 +00:00