0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 12:21:02 +01:00
Commit Graph

130 Commits

Author SHA1 Message Date
James Greenhill
a451d2f2ce
Hobby: Enable deploying hobby stack behind a firewall with no ACME TLS (#8687) 2022-02-18 10:28:28 -08:00
James Greenhill
24eb2666bb
hobby: Wait for ClickHouse and for Postgres before starting (#8686) 2022-02-18 10:27:45 -08:00
Tiina Turban
0fb19f87d7
Check for all necessary migrations completed before worker, plugins start (#8504) 2022-02-17 17:56:24 +01:00
Dawid Janik
6da21e2428
Increase request line limit for Gunicorn. (#8184) 2022-01-31 12:14:04 +02:00
Jesse Cooke
897ed833db
Make script executable again (#8327)
a71e899 removed the executable permission which broke AWS ECS deployment.
2022-01-28 09:15:18 +01:00
Tim Glaser
b74c54d117
Add hobby upgrade script (#8289)
* Add hobby upgrade script

* Add hobby upgrade script

* Write env file

* Pull new image
2022-01-27 08:45:17 -08:00
James Greenhill
44e9feb04d
Fix docs for hobby and add upgrade instructions (#8233)
* Fix docs for hobby and add upgrade instructions

* swallow errors from stop command (should error normally)

* persist env vars in docker-compose for hobby

* remove .hobby from docker-compose

* make file easier to test

* make env vars easier to template

* use docker-compose from git instead of curl

* test envsubst params

* default for sentry because exceptions

* tweaks to default logic
2022-01-24 22:14:50 -08:00
Michael Matloka
50e9334269
Make bin/start docker compose instructions accurate (#8168) 2022-01-21 10:23:00 +01:00
Eric Duong
a71e899605
Yeetcode (#7830)
* remove django query tests

* remove funnel and caching check

* remove ee available var

* remove is_clickhouse_enabled

* remove abstract tests

* change primary db

* missing func

* unnecessary test

* try new e2e ci

* func arg

* remove param

* ci

* remove plugins in docker

* background

* change ur;

* add kafka url

* add step

* update docker

* primary docker file

* mount volumes correctly

* one more

* remove postgres tests

* remove foss

* remove all  is_clickhouse_neabled

* remove irrelelvant test

* remove extra arg

* remove var

* arg

* add foss comment

* add foss comment

* plugin server config

* Update posthog/utils.py

Co-authored-by: Karl-Aksel Puulmann <macobo@users.noreply.github.com>

* migrate commands

* comment

* add clickhouse to pg tests

* change script

* change ordering

* deepsource

* restore foss tests

* test remove KAFKA_ENABLED from CI

* always wait

* up proper resources

* use one conftest

* restore

* remove unnecessary tests

* remove more pg

* log event tests

* fix more tests

* more tests

* type

* fix more tests

* last test

* typing

* account for shared class setup

* temp test cloud

* restore cloud master checkout

* adjust contexts

* backwards

Co-authored-by: Karl-Aksel Puulmann <macobo@users.noreply.github.com>
Co-authored-by: yakkomajuri <yakko.majuri@gmail.com>
2022-01-18 14:32:28 -05:00
Tim Glaser
0bd224df07 Add skip_service_version_requirements to bin/start 2022-01-18 14:05:22 +00:00
Tim Glaser
c25e1cc6fc
Fix e2e command (#8106) 2022-01-18 11:25:56 +00:00
Tim Glaser
49f3ccc5cc
Improve bin/start (#8007)
* Improve bin/start

* Address feedback and fix `$DEBUG`

Co-authored-by: Michael Matloka <dev@twixes.com>
2022-01-13 17:09:49 +00:00
Yakko Majuri
909d6bf7c6
do not start worker, plugins, or events if migrations not complete (#7823) 2022-01-06 10:30:47 -03:00
Tim Glaser
2adc6258d2
Run e2e with clickhouse (#7705)
* Run e2e with clickhouse

* Set kafka to /etc/hosts, and speed up waiting

* fix persons page

* Migrate clickhouse

* Update e2e-test-runner

* Fixes/improvements

* fingers x'ed

* fix

* revert url

* fix demo data

* fix test

* Run Redis in docker

* fix test

* fix redis

* trap

* fix e2e-test-runner

* try localhost instead of kafka

* Revert "try localhost instead of kafka"

This reverts commit 58869c96df.
2022-01-03 14:26:54 +00:00
Marius Andra
f3975f6513
Run e2e tests via docker postgres (#7816)
* run e2e tests via docker postgres

* use global vars

* extract database
2021-12-21 17:08:14 +01:00
Paul D'Ambra
b2e1b16a31
Add slightly kinder database url defaults (#7730)
* Add DB user and pass to DB URL for DEBUG mode and to bin tests for dropping test database

* ensmallen the blast radius of the DB connection settings changes

* make PGPORT settable too

* set PG ENV variables in bin tests

* Revert "set PG ENV variables in bin tests"

This reverts commit 4991f28808.
2021-12-16 09:31:41 +00:00
Yakko Majuri
782f7e7ef0
add SKIP_ASYNC_MIGRATIONS_SETUP=0 to celery startup (#7736) 2021-12-15 14:57:19 -03:00
Paul D'Ambra
5343b4b9a0
Add DB user and pass to DB URL for DEBUG mode and to bin tests for dropping test database (#7675) 2021-12-14 15:15:29 -08:00
Tim Glaser
aab8e43d7d
Load clickhouse/kafka async and wait (#7707)
* Load clickhouse/kafka async and wait

* Change permissions

* Add to cloud tests

* move
2021-12-14 15:09:16 -08:00
Yakko Majuri
dc4aff3980
Revert "fix hobby deploy in 1.30.0 (#7701)" (#7702)
This reverts commit 18540ac96e.
2021-12-14 15:02:59 -08:00
Yakko Majuri
3f85aa4c47
special migration -> async migration (#7686)
* special migration -> async migration

* rename frontend dir

* format

* rename SPECIAL_MIGRATION
2021-12-14 11:48:51 -03:00
Yakko Majuri
18540ac96e
fix hobby deploy in 1.30.0 (#7701) 2021-12-14 11:53:51 +00:00
Yakko Majuri
b56b141126
Special Migrations Runner (#7054 pt. 4) (#7446)
* add special migration definition and example

* types

* special migrations runner

* fix tests

* fix tests 2

* add clickhouse runner

* add temp fix for tests

* wip

* add special migrations api (#7448)

* wip new structure

* update example sourcing

* Update .gitignore

* yet another wip structure

* code quality

* cypress

* test docker image build

* implement resumable ops

* code quality

* add comments

* add warning

* add conditional requirements for migration

* add comment on is_required

* add dependency map

* wip dependencies and run migration on startup

* code quality

* fix bugs

* fix more bugs

* format

* types

* remove api from this branch

* types

* types

* update clickhouse script

* add is_migration_in_range util

* fix type

* fix runner

* add AUTO_START_SPECIAL_MIGRATIONS env var

* reset migration on start

* cleanup

* wip per op rollback

* prevent accidental status rollback

* add utils and definition test

* update example with rollback per op

* wip test special migration

* add first runner tests

* add runner tests

* add util for code paths

* fix test

* fix types

* fix types again

* cleanup

* cleanup

* add periodic healthcheck task tests

* remove unused imports

* safer row updates

* fix coalescing none checks

* code quality

* add docstrings

* fix

* fix deploys issue

* update scripts

* add delay

* address reviews

* address review comments

* address review comments

* address final comments

* fix import error

* fix tests

* remove unused imports

* fix tests

* fix task test

* remove unused return value

* remove unused special migrations code from migrate_clickhouse

* tweaks to support fresh deployments
2021-12-13 13:00:27 -03:00
Karl-Aksel Puulmann
6d50504e70
Fix cypress trends, paths and retention tests (#7524)
* Fix cypress paths and retention tests

These were broken in https://github.com/PostHog/posthog/pull/7473

* Attempt to fix trends test
2021-12-06 14:34:42 +01:00
Yakko Majuri
92c28d0160
Revert "Revert "Add names to celery nodes (#7054 pt. 2) (#7433)" (#74… (#7450)
* Revert "Revert "Add names to celery nodes (#7054 pt. 2) (#7433)" (#7449)"

This reverts commit ecf0679c98.

* Update bin/docker-worker-beat

* Update bin/docker-worker-celery

* Update bin/start-worker

* Update bin/docker-worker-beat

* Update bin/docker-worker-beat
2021-11-30 18:52:12 +00:00
Yakko Majuri
ecf0679c98
Revert "Add names to celery nodes (#7054 pt. 2) (#7433)" (#7449)
This reverts commit 444568a06e.
2021-11-30 15:21:05 -03:00
Yakko Majuri
444568a06e
Add names to celery nodes (#7054 pt. 2) (#7433)
* add names to celery nodes

* use python instead

* hostname naming
2021-11-30 17:06:19 +00:00
Yakko Majuri
09e12327c0
Docker compose hobby (#7262)
* Docker compose hobby:

* fix with shellcheck
2021-11-23 11:25:31 +00:00
Paul D'Ambra
50b12d9bb7
Set debug, test, and primary_db env variables based on context (#7250)
* set debug, test, and primary_db env variables based on context

* remove unnecessary print

* also use pytest.ini for some tests run straight from pytest at the CLI
2021-11-20 17:18:39 +00:00
Yakko Majuri
963c62aaf1
Use monorepo plugin server (#6784)
* use plugin-server in same repo

* remove plugins dir

* update docker files

* clean up docker files:

* visual separation

* run plugin server test stack

* build and push test image

* revert push image

* fix default yarn start

* another fix

* fix some more

* add plugin-server-prod script

* make executable

* update scripts:

* revert prod script

* fixes

* fix tests

* clean

* move build to docker

* build plugin-server in prod dockerfile

* use different entrypoint for e2e test

* fix bugs with ts-node-dev

* restore yarn.lock

* lost a few changes in the rebase

* fix dockerfile

Co-authored-by: James Greenhill <fuziontech@gmail.com>
2021-11-13 11:52:00 -08:00
Yakko Majuri
79744990e2
fix issues, logging (#6998)
🚢
2021-11-09 09:05:22 -08:00
Paul D'Ambra
0cdfb2531a
Only load events table from the URL on allow list of URLs (#6949)
* only load events table from the URL on allow list of URLs

* add return type to function

* pass scene URL into events table

* use urlpattern to check if scene is loaded in events table

* don't need to check if still on the same page as when loaded because urltoaction is now specific

* which means we don't need url pattern matching at all

* add scene url to events scene export's logic props

* use a different action name for each run or retries can never complete as the action cannot be saved

* do not poll results if moved away from sceneUrl

* remove tabs from person/action event tables

* so cypress can run locally

* break the dependency of running one test first so the other can pass

* move check into logic and add an e2e test

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-11-09 15:35:41 +00:00
Karl-Aksel Puulmann
fa79f8ea67
BE (Groups/Trends): Allow aggregating by groups (#6894)
* Type math in Entity

* Allow passing group_type_index from FE to BE

* Get a initial query running

* Add group value filter if aggregating by groups

* Add snapshot testing for trends queries

* isort

* Update tests

* Add test for column_optimizer

* Update ee/clickhouse/queries/trends/util.py

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2021-11-05 13:08:32 +02:00
Yakko Majuri
6ce204fe3c
add version to person (#6628)
* add version to person

* add migration

* set all initial version values to 0

* remove defaults

* fix dep
2021-10-28 15:43:30 +00:00
Paul D'Ambra
f2338c7674
you always need DEBUG=1 when running tests (#6613) 2021-10-22 13:37:01 +00:00
Paolo D'Amico
20b0f9704a
Forgot password UI (#6177) 2021-10-15 10:40:31 +03:00
Michael Matloka
77621366de
Fix remaining TypeScript errors (#6436)
* Fix remaining TS errors and remove `.ts-strict-blacklist`

* Move `IGNORED_SPECS` to top
2021-10-14 15:08:42 +00:00
Yakko Majuri
e5a9c3b04e
merge people test (#5567)
* do all merge_people ops in plugin server

* add integration test

* flip call order

* allow calls in any order

* update test approach
2021-08-16 10:53:52 +03:00
Yakko Majuri
3b8d328c10
Allow passing in token to Personal API Key requests (#5044)
* Allow passing in token to Personal API Key requests

* fix

* fix accidental commit

* update comment

* dont access self.request.user.team if not needed

* add tests

* Add an assert to make mypy happy

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-07-16 10:35:56 -03:00
Karl-Aksel Puulmann
bbd41ef04a
Use -Ofair for celery workers (#5063)
From https://medium.com/@taylorhughes/three-quick-tips-from-two-years-with-celery-c05ff9d7f9eb

> By default, preforking Celery workers distribute tasks to their worker processes as soon as they are received, regardless of whether the process is currently busy with other tasks.
> If you have a set of tasks that take varying amounts of time to complete — either deliberately or due to unpredictable network conditions, etc. — this will cause unexpected delays in total execution time for tasks in the queue.

This is 100% the case for us. This should "load balance" the tasks
better across workers.
2021-07-12 13:52:05 +03:00
Paolo D'Amico
01b7daacc2
Remove NewRelic from Cloud (#4716)
* remove NR

* remove secret key too
2021-06-14 11:01:57 +02:00
Tim Glaser
bbb4025ab1
Fix e2e tests (#4357)
* Fix e2e tests

* Run as 'production' to better mimick CI

* try no self capture

* Correct event/property definitions

* fix

* fix system status

* Try caching cypress separately

* Cache node modules

* cache pip better

* fix tests

* dont run if not cache

* test

* Cache cypress

* Fix event definitions

* Fix and speed up

* try fixing

* fix

* fix

* faster install

* try self capture 1

* fix multiple

* fix

* fix

* fix

* more speeding up

* Fix tests

* try not installing deps

* fix test global

* possibly quicker

* correct

* Fix
2021-05-20 16:42:26 +02:00
Sam Winslow
ca1a7bfc4e
Add bin script to start Cypress component tests (#4186)
* Add bin script to start cypress component test

* remove unneeded flags
2021-05-04 17:14:17 -04:00
Tim Glaser
3520637967
Warn before running all tests (#4204) 2021-05-04 15:41:22 +02:00
Buddy Williams
c893765973
Docker support on the Apple M1 chip / arm64 (#4024)
* First pass at docker support on the Apple M1 chip

* Added version to libpq-dev so that it passes linter checks; Removed comments
2021-04-19 10:12:02 -04:00
Paolo D'Amico
2020c32c66
Add NewRelic to cloud deployment (#4005) 2021-04-15 11:53:19 -07:00
Sam Winslow
49f7d841ce
bump cryptography==3.4.7 and add macosx_arm64 install script (#3935) 2021-04-10 00:53:19 +02:00
Eric Duong
5b77823938
Add cypress dependency installation (#3914)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-04-08 10:14:06 -07:00
Tim Glaser
1918675f93
Default set debug=1 to bin/start (#3807)
* Default set debug=1 to bin/start

* Export DEBUG

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-04-06 15:50:48 +02:00
Michael Matloka
446094d3dd
Get rid of DATABASE_URL and REDIS_URL construction in bin/plugin-server (#3873) 2021-04-06 11:39:30 +02:00