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

76 Commits

Author SHA1 Message Date
Sandy Spicer
35d015cb9a
feat: funnel actors queries on udf (#25013)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-02 15:29:04 -07:00
Sandy Spicer
75d4658e59
feat: versioned deployments for UDFs (#25121)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-26 11:30:26 -07:00
Sandy Spicer
7fa73a86af
feat(insights): launch funnels as a Clickhouse UDF behind a feature flag (#23587)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-05 11:40:33 -07:00
James Greenhill
1ff06d04fe
chore: bump version of CH for local dev (#24566) 2024-08-25 14:10:33 -07:00
Tom Owers
73cb695a7c
fix(data-warehouse): Skip validate schema when no rows were synced (#23891) 2024-07-22 18:03:58 +01:00
Frank Hamand
5754981a3d
fix: fix bad parsing of pr info for fetching labels (#23509) 2024-07-08 09:40:01 +01:00
Paul D'Ambra
791706ed29
chore: copying strangeness off of the internet (#23468) 2024-07-04 13:34:36 +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
Michael Matloka
077b2759fd
chore(insights): Yeet the unbaked groups-on-events (#22764)
* chore(insights): Yeet the unbaked groups-on-events

* Update TestAutoProjectMiddleware

* Update verifiedDomainsLogic.test.ts.snap

* Update funnel_correlation.py

* Update test_property.py

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update query snapshots

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-24 16:38:42 +02:00
Sandy Spicer
23a789d9fe
chore: upgrade python to 3.11 🐍 (#22932)
🐍
2024-06-21 16:45:42 +00:00
Marius Andra
e6230b4afc
feat(hog): dicts and arrays (#22618) 2024-06-04 12:11:13 +00:00
Eric Duong
75f5c7c4a9
chore(insights): remove flag hogql-insights-preview (#22651)
* remove flag

* cleanup

* killing code

* update image exporter

* mypy baseline

* test_insight_cache

* kill tests that don't work anymore

* remove settings

* test passes

* test pass

* mypy fixes

* remove commented code

* rename and add capture back in

* remove references to feature flag

* remove the falg

* comment out failing test

* Update UI snapshots for `chromium` (1)

* fix jest

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (1)

* Fix storybook test

* Update UI snapshots for `chromium` (2)

---------

Co-authored-by: Alexander Spicer <aspicer@gmail.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tom Owers <owerstom@gmail.com>
2024-06-04 13:08:32 +01:00
Tom Owers
5e00b6b1aa
feat(data-warehouse): Added SSH tunnelling option for postgres syncs (#22511)
* WIP

* SSH tunnel for postgres

* Remove unused class

* Updated mypy

* Tests and security

* Added tests for data import

* Update UI snapshots for `chromium` (2)

* Added upterm to debug CI

* Removed hogvm test

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Updated requirements

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* Use the correct wheel version

* Update query snapshots

* Update query snapshots

* Restore skipped tests in action

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Skip hogvm tests

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Use ActivityEnvironment for data import tests

* Update query snapshots

* Update UI snapshots for `chromium` (2)

* Move test

* Update query snapshots

* Update UI snapshots for `chromium` (2)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-29 15:49:53 +01:00
timgl
cd7d9be694
chore: Only fetch master branch in tests (#22524) 2024-05-28 08:48:00 +01:00
Michael Matloka
b1cb7458dc
test(insights): Run all tests with filters-based insights using HogQL (#21861)
* ci: Run core backend tests with both HogQL and legacy insights

* Double the number of tests

* Fix env var setting

* Add some HOGQL_INSIGHTS_OVERRIDE overrides in tests

* Mark `Insight.last_refresh` as deprecated

* Fix bad merge

* Update query snapshots

* Update query snapshots

* Update test_team.py

* Actually remove legacy backend from matrix

* Update test_fetch_from_cache.py

* Use `update_cached_state` in `calculate_for_query_based_insight()`

* Clean up CI changes and a comment

* Fix `update_cached_state` typing

* Update test_fetch_from_cache.py

* Update test_insight_cache.py

* Update test_insight_cache.py

* Clarify `generate_insight_cache_key` as legacy function

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-05-23 21:41:05 +00:00
dependabot[bot]
18ee601998
chore(deps): bump pnpm/action-setup from 2 to 4 (#22269)
* chore(deps): bump pnpm/action-setup from 2 to 4

Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 2 to 4.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](https://github.com/pnpm/action-setup/compare/v2...v4)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Use pnpm version from package.json engines

* Fix a couple of workflows

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Matloka <michal@matloka.com>
2024-05-20 20:03:04 +00: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
Neil Kakkar
9f43a3f4cd
feat(ci): split out temporal, make tests faster (#21636) 2024-04-18 16:25:33 +01:00
Neil Kakkar
b7c2d36f34
fix(ci): Show docker compose logs only when tests don't run (#21613) 2024-04-17 22:50:09 +01:00
Jacob Gillespie
eaec7f2e88
fix(ci): wait for DBs before starting Temporal (#21510) 2024-04-12 11:45:22 +02:00
Juraj Majerik
ed0abf2d6f
feat(experiments): explore results in an insight (#21235)
Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2024-04-11 11:05:41 +02:00
Frank Hamand
1bd7589c2c
feat: Pass PR labels through to deploy action (#21434)
* Pass PR labels through to deploy action

* Add the get-pr-labels action

* fix syntax error
2024-04-09 12:13:58 +01:00
Paul D'Ambra
2190c51888
revert: "chore(CI): revert "chore: syphar is deprecated. fangle python actions"" (#21389)
* Revert "chore(CI): revert "chore: syphar is deprecated. fangle python actions…"

This reverts commit 1f2ff4ac32.

* not on depot?

* was missing a syphar removal :/

* was missing a syphar removal :/

* Update query snapshots

* back to depot

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-08 09:54:08 +00:00
Tom Owers
ed9b1ee58d
feat(autocomplete): Added support for joined tables and using autocomplete on join constr… (#20304)
* Added suppoer for joined tables and using autocomplete on join constraints

* Added a type for Expression fields

* Fixed mypy

* Fixed mypy

* Update query snapshots

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-14 09:13:55 +00:00
Frank Hamand
27ea8a7354
fix: Respect .dockerignore in depot builds (#19906)
Respect .dockerignore in depot builds

See https://github.com/docker/build-push-action#git-context

Without including "context: ." .dockerignore is not processed
2024-01-22 16:59:21 +00:00
Frank Hamand
636d0c44b3
chore: Remove old dockerfile and only build a single image with unit (#19614)
* Remove old dockerfile and only build a single image with unit

We have migrated over to the `unit` image (instead of gunicorn) but we
were still building both. This could lead to confusion - we have no
plans to move back so let's remove the second image build and only
build the unit based image

* Remove unit build id
2024-01-05 15:06:01 +00:00
Paul D'Ambra
9af89cd98f
fix: remove deprecated pip cache action (#19552)
* fix: remove deprecated pip cache action

* with wildcard

* fix
2024-01-02 15:02:29 +00:00
Brett Hoerner
a9acc10cbe
fix: pin CI node version to the version we use in prod (#19221) 2023-12-08 15:32:25 -07:00
Frank Hamand
c0b5061520
feat: Use single entrypoint for both images but detect which to run (#18883)
Make docker-server binary fixed between unit/gunicorn images

We want it to be a full drop-in replacement
2023-11-27 10:06:22 +00:00
Tomás Farías Santana
a8f6d92318
refactor: Structlog batch exports logging (#18458)
* fix: Checkout master before checking for hogql changes

* fix: But go back to branch after done

* fix: Instead just diff with origin/master

* fix: Install libantlr, what's the worst that can happen?

* fix: Install antlr the hogql-way

* fix: Let's just checkout everything

* feat(batch-exports): Add backfill model and service support

* test(batch-exports-backfills): Add Workflow test

* chore(batch-exports-backfill): Bump migration

* feat(batch-exports): Add RedshiftBatchExportWorkflow

* feat(batch-exports): Add Redshift to BatchExport destinations

* feat(batch-exports): Support properties_data_type Redshift plugin parameter

* refactor(batch-exports): Insert rows instead of using COPY

* fix: Remove unused migration

* chore: Require aiokafka

* feat: Implement new structlog batch exports logger

* refactor: Use new structlog logger everywhere

* test: Add tests, fix things

* fix: Remove old tests

* chore: Change typing of return logger

* chore: Bump structlog

* chore: Extend docstrings

* fix: Don't use async logging as it's unsupported by temporal runtime

* test: Add logger tests

* fix: Mix pytestmark lists

* fix: Remove unused imports

* fix: Cleanup  pytest warnings

* fix: Create and drop dataset for bigquery tests

* fix: Typing issue?

* fix: Let's just checkout everything

* fix: Use global event loop in tests

* fix: Blow-up cache

* fix: Truncate only if table exists

* revert-me: Skip all postgres tests

* fix: Connect to kafka in localhost

* fix: Lazily connect to Kafka

* fix: Resolve conflicts

* fix: Capture temporal context once and bind it to the logger

* fix: Make configure logger sync

* fix: Keep strong reference to background tasks

* fix: Continue consuming from log queue even if we fail to produce

* fix: Also catch the producer not starting

* fix: Remove unused await

* fix: Log kafka producer error after logger is configured
2023-11-13 16:07:35 +01:00
Marius Andra
06e993818d
feat(apps): transpile via django (#18201) 2023-11-07 21:56:59 +00:00
Tomás Farías Santana
2ce7ea6b0c
fix: Checkout master before hogql-diff and use new GH syntax (#18461)
* fix: Replace deprecated set-output GH actions command

* fix: Checkout master before checking for hogql changes

* fix: But go back to branch after done

* fix: Instead just diff with origin/master

* fix: Let's just fetch manually

* fix: Install libantlr, what's the worst that can happen?

* fix: Install antlr the hogql-way

* fix: Amazing hogql-developers already include this in wheel
2023-11-07 21:44:03 +00:00
Jacob Gillespie
345a043339
ci: use Depot ephemeral registry for faster pulls (#18216)
* ci: use Depot ephemeral registry for faster pulls

* Install Depot CLI before pull
2023-10-26 16:50:39 +01:00
Tom Owers
8577e13599
feat: allow placeholders in place of ratio expressions in hogql (#17973)
* Allow placeholders in place of ratio expressions in hogql

* Added C++ changes for RatioExpr

* Bump `hogql_parser` version

* Upgrade ANTLR version to align with brew latest

* Update query snapshots

* Fix parser change message body

The quotes weren't right, so the step failed instead of posting a comment.

* Revert "Update query snapshots"

This reverts commit 1302d3b24f.

* Update MD5 sum

* Bump version again

* Use new hogql-parser version

---------

Co-authored-by: Michael Matloka <michal@matloka.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
2023-10-19 15:37:32 +00:00
Michael Matloka
16a71f60c9
perf: Parse HogQL with C++ for a huge speedup (#17659)
* Add partial C++ parser of HogQL

* Support all the rules and add proper error handling

* Use `AlignAfterOpenBracket: BlockIndent`

* Reuse all the parser tests for the C++ backend

* Fix relationship between headers and implementations

* Add more error handling and fix minor issues

* Build both Python and C++ parsers in the package.json script

* Update ARRAY JOIN error assertion

* Improve timeit

* Move the C extension to the top level

* Refactor `vector_to_list_string`

* Build the parser on Linux

* Build wheels for the parser

* Simplify Linux build and fix macOS

* Fix Homebrew paths on x86 and don't fail fast in CI

* Set MACOSX_DEPLOYMENT_TARGET for C++20

* Set up QEMU for Linux ARM builds

* Publish the wheels on PyPI

* Avoiding Linux ARM emulation in CI for now

* Build sdist too

* Revert Dockerfile changes

* Fix PyPI publish

* Add README and optimize sdist build

* Use setup.py directly instead of build

* Use PyPI hogql-parser instead of local

* Also revert production-unit.Dockerfile

* Fix sdist upload and add Linux ARM back

* No Linux ARM build in the end

* Fix artifact uploading

* Do try building Linux ARM

We need this for prod.

* Use `npm` in `grammar:build`

`pnpm` is not available in that job.

* Fix formatting of hogql_parser

* Build everything on macOS

* Revert "Build everything on macOS"

Not so fast actually.

* Use hogql-parser=0.1.1

* Fix dylib in macOS wheel

* Bump hogql-parser version

* Fix missing module error

* Delete timeit.py

* Make error handling robust

* Format the C++

* Use `hogql-parser==0.1.1`

* Fix reserved keyword error assertions

* Use HEAD hogql_paresr in CI

* Fix `apt` usage

* Add some sudo in CI

* Ensure package will be releasable before build

* Bump version to 0.1.3

* Cover C++ `unquote_string` with tests

* Use BuildJet ARM runners for ARM builds

* Add some instructions

* Add HogQL version check to backend CI

* Update requirements.txt

* Use `setuptools` instead of the deprecated `distutils`

* Fix working dir in backend CI

* Align ANTLR versions

* Add test for "mismatched input"

This is thrown differently than other HogQLSyntaxExceptions in C++, so might help reveal what's going on with tests failing only on Linux CI and not macOS dev

* Add types and bump version

* Comment instead of failing version check

* Automate hogql-release version bump

* Fix checkout token

* Don't build hogql-parser if there were no changes

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Improve documentation

* Use new hogql-parser version

* Fix error start and end initialization

* Note `antlr4-cpp-runtime`

Co-authored-by: Marius Andra <marius.andra@gmail.com>

* Also remove NUL chars in C++

* Check ANTLR4 runtime archive checksum for security

* Note more decrefs to add

* Add vector size checks

* Use new hogql-parser version

* Don't support the `start` arg in C++ `parse_expr`

* Use new hogql-parser version

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marius Andra <marius.andra@gmail.com>
2023-10-13 13:58:08 +00:00
Brett Hoerner
e3d7fa9e49
chore: add commit hash file to the built docker image (#17833) 2023-10-06 07:28:25 -06:00
Frank Hamand
3ef42ddd38
feat: Add docker image that uses nginx unit instead of gunicorn (#17573)
* Add docker image that uses nginx unit instead of gunicorn

🦄🔫

* Add unit build to CI

* Fix duplicate id

* try 3.11

* Only build for amd64

need python3.11 for unit image on arm
2023-09-21 16:50:19 +01:00
Michael Matloka
6b40fee757
chore: Even less BuildJet (#17249) 2023-08-30 18:45:18 +02:00
Paul D'Ambra
fdd3059c5b
chore: remove buildjet (#17247)
* chore: remove buildjet

* fix

* fix

* fix
2023-08-30 14:53:52 +02:00
Paul D'Ambra
1fd03b04b1
chore(speed): don't run all tests in PoE and EE runs (#17223)
chore (speed): don't run all tests in PoE and EE runs
2023-08-29 08:45:42 +01:00
Ellie Huxtable
ecf7a959dd
fix: Docker compose not picking up env for some reason (#17079)
Docker compose not picking up env for some reason

Will this help?
2023-08-17 15:48:15 +00:00
Ellie Huxtable
377018539d
feat: Use buildjet for ci-backend (#17069)
* ci-backend runs-on -> buildkite

* Use buildjet runners

* Go away old cache

* Fix deps

* Ensure to update the package registry

* Use bigger runners for django tests

* Use ARM for jobs with less concurrency

* Revert "Use ARM for jobs with less concurrency"

This reverts commit bcbf0d7524.

* Fix typo
2023-08-17 15:16:43 +01:00
Neil Kakkar
c871ad40f6
feat(flags): Move local evaluation to the read replica (#16867) 2023-08-02 11:57:51 +01:00
Michael Matloka
8fd0f7a3f9
ci: Fix CI for forks (#16776)
* ci: Fix CI for forks

* Try updating snapshots on forks

* Try fixing snapshot verification instead

* Consolidate Docker-related workflows

* Run visual regression tests

* Update ci-e2e.yml

* Use fork's GHCR

* Try Depot caching approach instead of GHCR

* Lowercase reference

* Update E2E tests paths filter

* Fix permissions

* Debug .env

* Fix double checkout

* Remove obsolete release workflows

* Fix formatting

* Also run plugin server tests for good measure

* Clarify automerge job name

* Describe action inputs

* Refactor E2E workflow for clarity and comments

* Use project ID from depot.json
2023-07-28 14:23:32 +02:00
Neil Kakkar
49ba716b9b
feat(decide): Move flag evaluation to read replica (#15503) 2023-07-04 11:42:37 +01:00
Marius Andra
4b44cba6fe
feat(hogql): local evaluation (HogVM part 2) (#16275) 2023-06-28 17:23:22 +02:00
Tomás Farías Santana
d71b994a4b
chore: Remove docker-compose logging now that flakyness is no more (#16250) 2023-06-26 19:02:13 +02:00
Harry Waye
b9d45de99a
ci(temporal): add logging to backend tests for docker compose (#16072)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-15 12:52:33 +02:00
Harry Waye
6ec12d5376
ci: wait for temporal to be up before running backend tests (#16017)
* ci: wait for temporal to be up before running backend tests

If we don't wait, then there are some tests that fail because temporal
isn't up yet. These tests ideally shouldn't be using the real temporal
server, but rather the test server that is spun up when e.g. using
`temporalio.testing.WorkflowEnvironment` although for the sake of
getting tests to not be flaky, this is a good enough solution for now.
2023-06-13 14:23:52 +00:00