0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 08:40:03 +01:00
Commit Graph

241 Commits

Author SHA1 Message Date
James Greenhill
6b50aff12b
chore: enable gossip for flower and to squelch errors (#19823) 2024-01-18 08:01:02 +00:00
Michael Matloka
2ad53ef79e
refactor(product-analytics): lineGraphLogic.ts to tooltip-data.ts (#19815) 2024-01-17 20:28:10 +00:00
Julian Bez
5254cc7eab
feat: Route some trial tasks to different queues (#19810) 2024-01-17 15:50:51 +00:00
Julian Bez
95fec19aaf
feat(celery): Prepare to run on multiple queues (#19157)
* Add Celery queues env file with default queues

Reasoning:
We need to configure Celery workers in several places to consume
from a specific set of queues.

* Define some queues
2024-01-17 11:54:12 +00:00
Julian Bez
9df89c0ebc
feat(api): Add Pydantic schemas in OpenAPI annotations (#19747)
Trying again #19408 with fixes
2024-01-15 09:19:10 +00:00
Julian Bez
cbc0ba83f5
revert: "feat(api): Add Pydantic schemas in OpenAPI annotations" (#19739)
Due to issue POSTHOG-P7X
2024-01-12 14:09:40 +00:00
Julian Bez
456af51cfd
feat(api): Add Pydantic schemas in OpenAPI annotations (#19408)
* Update schema to use discriminators and add Pydantic parser
2024-01-12 12:01:13 +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
Michael Matloka
5c51230ea4
chore(frontend): Real Tailwind + Autoprefixer (#19051)
* chore(frontend): Real Tailwind + Autoprefixer

* Align some non-standard utility class usage with Tailwind

* Start using container queries

* Update tailwind.config.js

* Move PostCSS packages into prod dependencies

* Add EE

* Add larger spacings for properties other than width

* Fix spacing backward compat

* Add max-w-1/2

* Remove Tailwind normalization

* Ensure JIT analysis works

* Actually we don't need a container query for this

* Clean up more

* Update UI snapshots for `webkit` (2)

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `webkit` (2)

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (2)

* Update production.Dockerfile

* Extend `fontSize` instead of replacing

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (2)

* Fix production build

* Add clarification comment

* Update trends.cy.ts

* Fix `scale` usage

* Fix minor styling issues

* Upgrade to Tailwind 3.4

* Actually use `cssnano`

* Don't use `cssnano` in dev

* Solve annoying Tailwind logs

* Add comment explaining plugins being defined twice

* Fix side panel icon rotation

* Reset snapshots

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (2)

* Update query snapshots

* Update query snapshots

* Fix dockerfile

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (1)

* Fix up flag wrap

* Update UI snapshots for `chromium` (2)

* Fix

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (2)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ben White <ben@posthog.com>
2024-01-08 13:26:12 +01:00
James Greenhill
5c9baf6c72
fix: basic retry logic for booting up the application and waiting for unit (#19259)
* chore: basic retry logic for booting up the application and waiting for unit

* finally block for close
2023-12-11 14:46:14 -05:00
danielxnj
b0a9ce2818
chore: hobby deployment on PR (#18733)
* Check docker before installing it
2023-11-29 18:16:15 -05: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
Brett Hoerner
bc553938e3
chore(batch-exports): add some Prometheus metrics for batch exports (#18467)
* chore(batch-exports): add some Prometheus metrics for batch exports

* make metrics port an option/setting

* get destination from workflow_type
2023-11-09 09:22:25 -07:00
Frank Hamand
773e20d771
feat: Add prometheus metrics to nginx unit (#18387)
* Add prometheus metrics to nginx unit

* Run multiprocess prom collector in unit

* Refactor unit metrics to use prom client properly

* Ruff
2023-11-07 15:12:03 +00:00
James Greenhill
61cf6d8bd1
chore: set RESTART_MODE to list for needrestart to prevent halt (#18285) 2023-10-30 16:24:00 -07:00
James Greenhill
dc30182fff
chore: ensure DEBIAN_FRONTEND=noninteractive for hobby deploy (#18284) 2023-10-30 16:12:35 -07:00
Frank Hamand
9939786d63
feat: Add env var to skip migration checks (#17915)
Add env var to skip migration checks

This will allow us to skip the checks in kubernetes pods that use
initContainers but without effecting existing deploys or docker-compose
2023-10-11 15:51:43 +01:00
Ben White
301ab02749
chore: Update install script (#17851)
Fixed script
2023-10-11 13:41:01 +02:00
Frank Hamand
7a14421e78
feat: Set keepalive to 60 on gunicorn (#17897)
Set keepalive to 60 on gunicorn

The default is 2 seconds, the default for ALBs is 30 seconds

This can cause a race condition where gunicorn closes the connection
as the ALB sends a request, resulting in a 502.
2023-10-11 08:54:48 +01:00
Frank Hamand
c660212989
Revert "feat: Add kafka rack aware injection on docker-server" (#17710)
Revert "feat: Add kafka rack aware injection on docker-server (#17541)"

This reverts commit 789bc23c91.
2023-10-02 10:21:00 +00:00
Neil Kakkar
c3e99858d5
feat(surveys): Add UI for enabling/disabling surveys popup (#17602) 2023-09-26 13:35:54 +01: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
Frank Hamand
69eb2e8fd3
Allow us to set gunicorn backlog (#17559) 2023-09-20 22:14:16 +01:00
Frank Hamand
789bc23c91
feat: Add kafka rack aware injection on docker-server (#17541)
Add kafka rack aware injection on docker-server

Currently we only inject this in plugin-server (aka reading from kafka)

Let's add it as well to docker-server (aka capture/writing to kafka)
2023-09-20 10:14:58 +01:00
Brett Hoerner
5b5d0d43a3
chore(plugin-server): make it easier to run multiple plugin-server instances locally (#17456)
* chore(plugin-server): allow customizing the HTTP server port

* chore(plugin-server): add NO_WATCH mode for development

* fix: http-server test
2023-09-15 08:55:46 -06:00
Ben White
bbb7ed9968
feat: Added recording of e2e test runs (#16046)
Marius nerd-sniped us to try this out. Recording of Cypress runs.

Co-authored-by: Paul D'Ambra <paul@posthog.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-10 15:59:30 +01:00
Ben White
8deaf4e8ea
feat: Swapped to use KAFKA_HOSTS everywhere (#16109)
* Swapped to use KAFKA_HOSTS everywhere

* Fixed up type of kafka config options and setup separate kafka hosts for blob consumer

* allow session recordings to have its own kafka security protocol

* remove slash commands from this pr

* syntax must be obeyed

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (2)

* fix

* Update query snapshots

* no empty strings in kafka hosts

* fix snapshot

* fix test

---------

Co-authored-by: Paul D'Ambra <paul@posthog.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-19 12:15:17 +01:00
Xavier Vello
f194a5b5a2
feat(ingestion): add KAFKA_CLIENT_RACK envvar for az locality (#15807) 2023-06-16 11:17:32 +02:00
Harry Waye
b761a34b23
ci: fix waiting for temporal to be up in backend tests (#16039)
* ci: fix waiting for temporal to be up in backend tests

I think it got merged before because we weren't running the backend
tests on these script changes so I've also added them to the list of
paths to watch for changes.

* increase timeout to 180 seconds
2023-06-14 06:07:49 +00:00
Harry Waye
352dc85956
ci: fix temporal port number 8088 -> 7233 (#16031)
I'm not sure what happened there, but for some reason it was fine with
8088 but I think the right one if 7233.
2023-06-13 16:57:25 +00: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
Neil Kakkar
db4d0a205d
feat(decide): Add proper analytics for decide requests (#15837) 2023-06-06 17:14:13 +01:00
Paul D'Ambra
0e1bc77216
chore: don't wait for e2e tests if only changing the plugin server (#15671)
If you only change the plugin server you spend a long time waiting for e2e CI to run.

It doesn't use the plugin server (I don't think)

So, don't run it...
2023-05-30 09:55:18 +01:00
Tomás Farías Santana
aa943d9349
fix: Unset debug in temporal start django worker (#15552) 2023-05-15 17:05:31 +00:00
Michael Matloka
08eab1f9c0
style: Fix "Posthog" capitalization (#15426)
* style: Fix "Posthog" capitalization

* Update UI snapshots for `chromium` (1)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-09 18:31:34 +02:00
Tomás Farías Santana
794c340e81
fix: Set hobby deployments to 'latest' by default (#14956) 2023-04-06 10:09:51 -07:00
Tomás Farías Santana
c30bdc4c82
fix: Checkout git tag corresponding to Docker image (#14909) 2023-03-29 17:07:34 +02:00
Tomás Farías Santana
6f39b68dd2
fix: Add missing script to start temporal worker (#14908) 2023-03-27 16:59:29 +02: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
Michael Matloka
42401f6664
test(login): Verify that Google login link is correct (#14668)
* test(login): Verify that Google login link is correct

* Revert `service_warning`
2023-03-10 10:15:42 +00:00
Ben White
c5c18f4e15
feat: Make recorder-v2 available (#14363) 2023-02-22 11:55:04 +00:00
Harry Waye
dfe389dfdc
chore: fix typing of int arguments in migrate_kafka_data.py (#14304)
* chore: fix typing of int arguments in migrate_kafka_data.py

I'd given defaults but didn't ensure the types were right.

* decrease linger
2023-02-17 19:24:57 +00:00
Harry Waye
c8bf85b3af
chore(kafka-migrate-data): add SSL options to migrate command (#14300)
Previously, the migrate command would fail if the Kafka cluster was
configured to use SSL. This commit adds and option to specify e.g `SSL`,
`PLAINTEXT`, `SASL_SSL` etc. as per
https://kafka.apache.org/25/javadoc/org/apache/kafka/common/security/auth/SecurityProtocol.html
2023-02-17 18:11:53 +00:00
Alex Gyujin Kim
76396d18c0
chore(recordings): bundle recorder.js in posthog-js (#14121) 2023-02-15 13:50:52 +01:00
Paul D'Ambra
7a7a274b07
chore: remove no-migrations from ./bin/tests (#14190) 2023-02-13 10:07:44 +00:00
Neil Kakkar
408a778f5e
chore(billing): Make local dev for enterprise less painful (#14023)
chore(billing): Make local dev less painful
2023-01-31 14:57:15 +00:00
Thomas Obermüller
4a30e78b22
chore: use pnpm to manage dependencies (closes #12635) (#13190)
* chore: use pnpm to manage dependencies

* Fix CI errors

* Don't report Docker image size for external PRs

* Fix pnpm-lock.yaml formatting

* Fix module versions

* Ignore pnpm-lock.yaml

* Upgrade Cypress action for pnpm support

* Set up node and pnpm before Cypress

* Fix typescript issues

* Include patches directory in Dockerfile

* Fix Jest tests in CI

* Update lockfile

* Update lockfile

* Clean up Dockerfile

* Update pnpm-lock.yaml to reflect current package.json files

* remove yarn-error.log from .gitignore

* formatting

* update data exploration readme

* type jest.config.ts

* fix @react-hook issues for jest

* fix react-syntax-highlighter issues for jest

* fix jest issues from query-selector-shadow-dom

* fix transform ignore patterns and undo previous fixes

* add missing storybook peer dependencies

* fix nullish coalescing operator for storybook

* reorder storybook plugins

* update editor-update-tsd warning to new npm script

* use legacy ssl for chromatic / node 18 compatibility

* use pnpm for visual regression testing workflow

* use node 16 for chromatic

* add @babel/plugin-proposal-nullish-coalescing-operator as direct dependency

* try fix for plugin-server

* cleanup

* fix comment and warning

* update more comments

* update playwright dockerfile

* update plugin source types

* conditional image size reporting

* revert react-native instructions

* less restrictive pnpm verions

* use ref component name in line with style guide

Co-authored-by: Jacob Gillespie <jacobwgillespie@gmail.com>
2022-12-12 10:28:06 +01:00
James Greenhill
647c3c408c
fix: Upgrade docker-compose when we upgrade the hobby stack (#13204) 2022-12-07 19:21:49 -08:00
James Greenhill
8a297770df
fix: Don't use tmpl ext for docker-compose base yml (#13202) 2022-12-08 02:45:23 +00:00
James Greenhill
c311af5630
fix: Have hobby upgrade script extend base docker-compose (#13168) 2022-12-06 20:02:11 +00:00