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

105 Commits

Author SHA1 Message Date
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
dependabot[bot]
e7db718e2b
chore(deps): bump django from 4.2.11 to 4.2.14 (#23621)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-11 08:44:57 +01:00
Sandy Spicer
eac199d24a
chore: upgrade python to 3.11 (#23206) 2024-06-27 14:16:27 -07: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
Sandy Spicer
23a789d9fe
chore: upgrade python to 3.11 🐍 (#22932)
🐍
2024-06-21 16:45:42 +00: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
dependabot[bot]
cd7ae491ef
chore(deps): bump jinja2 from 3.1.3 to 3.1.4 (#22117)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 12:27:05 +02:00
dependabot[bot]
072c13536f
chore(deps): bump requests from 2.31.0 to 2.32.0 (#22376)
---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 09:34:37 +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
ted kaemming
dd03cd69f1
chore: Update psycopg to 3.1.18 (latest release.) (#21862)
* chore: Update `psycopg` to 3.1.18 (latest release.)

* Update requirements files.
2024-04-25 12:06:50 -07: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
Michael Matloka
0cf2955159
chore(clickhouse): Capture final SQL in Sentry errors, again (#21688)
* Revert "revert: "chore(clickhouse): Capture final SQL in Sentry errors" (#21479)"

This reverts commit 15627818f6.

* Only upgrade `clickhouse-driver` to 0.2.6

* Add "Run migrations for this PR"
2024-04-22 13:56:32 +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
dependabot[bot]
a279ec0837
chore(deps): bump the pip group across 1 directory with 2 updates (#20902) 2024-04-10 08:09:55 +00:00
David Newell
8fb3b9bf2f
chore: update python requirements (#20873) 2024-03-13 15:19:36 +00:00
Michael Matloka
db54941410
fix(dev): Fix CH replicated table error when starting E2E tests (#20672) 2024-03-04 12:06:53 +00:00
dependabot[bot]
5d60a10848
chore(deps): bump the pip group across 1 directories with 3 updates (#20413)
bump the pip group across 1 directories with 3 updates

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: direct:production
  dependency-group: pip-security-group
- dependency-name: jinja2
  dependency-type: indirect
  dependency-group: pip-security-group
- dependency-name: lxml
  dependency-type: indirect
  dependency-group: pip-security-group
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-19 14:22:37 +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
Julian Bez
11e4d8487e
chore(deps): Upgrade Django 4.1 (#20006)
* Upgrade to Django 4.1

* Adjust requirements

* Adjust mypy baseline

* Sync with later version

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-07 09:19:06 +00:00
David Newell
974553f84d
chore: upgrade OpenAI client (#19986) 2024-01-29 11:47:14 +00:00
dependabot[bot]
e9b825236f
chore(deps): bump urllib3 from 1.26.13 to 1.26.18 (#19643)
* chore(deps): bump urllib3 from 1.26.13 to 1.26.18

Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.13 to 1.26.18.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.13...1.26.18)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

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

* upgrade dependency using pip-compile

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paul D'Ambra <paul@posthog.com>
2024-01-15 14:17:13 +01: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
dependabot[bot]
e74c207b31
chore(deps): bump django from 3.2.19 to 3.2.23 (#19574)
Bumps [django](https://github.com/django/django) from 3.2.19 to 3.2.23.
- [Commits](https://github.com/django/django/compare/3.2.19...3.2.23)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 08:38:57 +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
Paul D'Ambra
2db045910f
chore: celery 5.x (#17480) 2023-09-28 14:01:02 +01: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
Paul D'Ambra
0e0e572b7a
chore: upgrade to Django 3.2.19 (#16193) 2023-06-22 13:45:40 +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
cffeea724f
revert: "chore: upgrade celery" (#15549) 2023-05-15 17:08:19 +00:00
Paul D'Ambra
4a7e3c293e
chore: upgrade celery (#15540) 2023-05-15 09:25:30 +01:00