0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 09:16:49 +01:00
Commit Graph

103 Commits

Author SHA1 Message Date
James Greenhill
7f2cab4b93 Revert "Clickhouse setup (#1463)"
This reverts commit a0327587cb.
Time to process events shot way up and logs are missing.
2020-09-03 19:27:02 -07:00
Eric Duong
a0327587cb
Clickhouse setup (#1463)
* initial

* migration command

* migrations working

* add modelless views for clickhouse

* initial testing structure

* use test factory

* scaffold for all tests

* add insight and person api

* add basic readme

* add client

* change how migrations are run

* add base tables

* ingesting events

* restore delay

* remove print

* updated testing flow

* changed sessions tests

* update tests

* reorganized sql

* parametrize strings

* element list query

* change to seralizer

* add values endpoint

* retrieve with filter

* pruned code to prepare for staged merge

* working ingestion again

* tests for ee

* undo unneeded tests right now

* fix linting

* more typing errors

* fix tests

* add clickhouse image to workflow

* move to right job

* remove django_clickhouse

* return database url

* run super

* remove keepdb

* reordered calls

* fix type

* fractional seconds

* fix type error

* add checks

* remove retention sql

* fix tests

* add property storage and tests

* merge master

* fix tests

* fix tests

* .

* remove keepdb

* format python files

* update CI env vars

* Override defaults and insecure tests

* Update how ClickHouse database gets evaluated

* remove bootstrapping clickhouse database routine

* Don't initialize the clickhouse connection unless we say it's primary

* .

* fixed id generation

* remove dump

* black settings

* empty client

* add param

* move docker-compose for ch to ee dir

* Add _public_ key to repo for verifying self signed cert on server

* update ee compose file for ee dir

* fix a few issues with tls in migrations

* update migrations to be flexible about storage profile and engine

* black settings

* add elements prop tables

Co-authored-by: James Greenhill <jams@uber.com>
2020-09-03 10:27:45 -07:00
Tim Glaser
b3df75bde5
Add docker image test (#1515)
* Add docker image test

* Fix test?

* Fix test? bis

* Document build fix

Co-authored-by: Michael Matloka <dev@twixes.com>
2020-09-01 16:02:53 +02:00
Paolo D'Amico
b7d639fb53
Multitenancy tests (#1533)
* Create multi_tenancy.yml

* Update multi_tenancy.yml

* Update multi_tenancy.yml

* Update multi_tenancy.yml

* Move multitenancy check to backend CI

Co-authored-by: Michael Matloka <dev@twixes.com>
2020-09-01 12:07:48 +02:00
Michael Matloka
140b910926
Remove Release Drafter (#1476)
* Remove Release Drafter

* Purge Release Drafter
2020-08-22 14:24:22 -03:00
Michael Matloka
12eeaf999e Prettier posthog-foss.yml 2020-08-20 18:20:41 +02:00
Michael Matloka
e9e6e39c18
Update FOSS sync commit message properly 2020-08-20 15:59:52 +02:00
Michael Matloka
534c25686e
Update FOSS sync commit message 2020-08-20 15:57:58 +02:00
Max Ungless
6795635dd7
Better posthog-foss syncing (#1423)
* Create posthog-foss syncing

* Update naming and sync only on push to master

Co-authored-by: Michael Matloka <dev@twixes.com>
2020-08-20 15:30:27 +02:00
Tim Glaser
764e10696b
Fix version (#1462)
* Fix version

* Black two files

Co-authored-by: Twixes <dev@twixes.com>
2020-08-18 19:09:42 +02:00
Twixes
de04487ff4
Run prettier over version-update.yml 2020-08-18 12:11:42 +02:00
Michael Matloka
44f45b86c6
Auto update VERSION (#1452)
* Auto update VERSION

* Use SYNC_GITHUB_TOKEN

* Fix minor oversights

* Fix auto commit
2020-08-18 12:02:31 +02:00
Michael Matloka
49a15e9f53
Enhance and optimize PR GitHub workflows (#1365)
* Enhance and optimize GitHub workflows

* Prettier app.json

* Update YAML list

* Prettier workflows

* Include YAML in prettier runs

* Improve job naming

* Update E2E workflow name

* Prettier docker-compose YAML

* Update workflows

* Put freezegun into prod requirements

* Update workflow names

* Update workflow names again

* Update ci-backend.yml

* Update Lint with flake8

* Remove redundant eslint:ci script

* Revert "Put freezegun into prod requirements"

This reverts commit 460e3942d10194e9f46c8a2196ebd9ecc1f23c6f.

* Install freezegun in workflow and update dev.txt

* Prettier auto-image.yml

* Add "CI" to ci-* names

* Fix prettier:check

* Add missing SECRET_KEY

* Prettier 2 last files
2020-08-18 11:08:40 +02:00
Yakko Majuri
3bcfecbe9e
Added warning for unset SECRET_KEY (#1426)
* Added warning for unset SECRET_KEY

* added process exit

* Reword message

This should be just a bit clearer (also "Process exited with code …" is redundant, I think).

* added SECRET_KEY to github actions

* updated to add docker placeholder key

* minor update to default secret key

Co-authored-by: Michael Matloka <dev@twixes.com>
2020-08-14 22:18:21 +02:00
Marius Andra
52cdd7e572
New toolbar cookie + Secure session/csrf cookies (#1387)
* - set a custom cookie to tell the toolbar we're logged in
- make other cookies secure

* skip adding new toolbar cookie on API requests

* fix demo page local https

* enable/disable secure cookies as needed

* show django toolbar only for API requests

* update posthog-js and kea versions

* satisfy mypy

* add SECURE_COOKIES=0 to cypress tests, since they run over HTTP

* revert kea version

* add test for toolbar cookie middleware

* try something for cypress

* add debug

* add cypress-terminal-report for better logging

* fix demo api_url

* revert previous change that triggered cypress
2020-08-11 10:52:43 +02:00
James Greenhill
eec2445dbc
Bugfix: Github actions can't use off the shelf docker images. Install packer manually (#1304) 2020-08-10 14:23:26 +02:00
Michael Matloka
531abebded
Check for missing migrations (#1312)
* Check for missing migrations

* Remove makemigrations from checklist

* Add DATABASE_URL to migrations check

* Add REDIS_URL to migrations check
2020-07-30 19:23:30 +02:00
Michael Matloka
4308e1afed
Add makemigrations to checklist and make it more specific (#1310) 2020-07-30 16:23:00 +02:00
Tim Glaser
31f3185776
Closes #1020 WIP shared dashboards (#1071)
* add test for caching funnels and refreshing

* Closes #1020 WIP shared dashboards

* Make webpack work

* Progress?

* Hash the entire filter and add share tokens

* Make webpack work properly

* Fix sentry error

* Tighten up the caching logic

* Correctly refresh items and show in frontend'

* Add some padding

* fix caching, update layout

* Add cypress tests

* Fix merge conflict mistake

* Convert share_token to boolean

* Hide text when small

* Redo tooltip for lock

* Remove move cursor when in shared mode

* Improve spacing

* Fix state being incorrect

* Use selectors instead of value

* Use const instead of let

* Fix type errors et al

* Increase cache size

* Fix dashboard tests

* Fix team tests

* Add wait time

* Fix tests

* Fix refreshing

* Fix dashboard tests

* Fix test

* Excluded deleted dashboard items and don't show refreshing

* Fix renaming issue

* Fix migrations and fix display of status change

* Use grid for responsive header

* Don't load annotations

* Eslint

* Fix variable naming

Co-authored-by: Eric <eeoneric@gmail.com>
2020-07-23 10:41:59 +02:00
Michael Matloka
35e70f8544
Make GH templates better (#1263)
* Remove useless list of changes stub

* Add PR template Changes placeholder

* Update issue templates

* Love squashing bugs
2020-07-22 11:35:32 +02:00
Max Ungless
e901fdf890
Added Github Action to create and deploy DigitalOcean images (#1232) 2020-07-17 08:55:46 -07:00
Michael Matloka
2f3c3d810b
GitHub templates update (#1198)
* Update issue templates

* Adjust pull request template whitespace

* Make "you" in "Thank you" italic
2020-07-13 17:38:11 +02:00
James Greenhill
75627eb953
chore: clean the configs for release-drafter (#1088) 2020-06-24 13:20:08 -07:00
James Greenhill
27b1fa9241
chore: Automate the creation of the change log (#1080)
* Automate the creation of the change log

* fix: bugs with release-drafter configs
2020-06-24 13:08:32 -07:00
James Greenhill
341e02facb
Always yarn install because of caching bug (#1026) 2020-06-16 08:56:04 +02:00
Marius Andra
ca1ffe0cb0
Toolbar "button mode" (#925)
* longpress supports also clicks - presses that are just not long enough

* button mode for toolbar

* fix bug in zooming out, refactor and annotate some of the animation code

* toolbar button close/float tiny buttons

* fix inspect element in floating mode

* fix the fix :)

* remove console.log

* extract logo

* extract nestable circle component

* css animations for circles

* refactor toolbar to use circle code

* remove animation code

* style fixes

* annotate useLongPress

* clean styles

* show button always

* save drag position

* default to top-right

* add a bit of padding to have space for tooltips

* better padding for remembered width/height

* test recursive search for yarn.lock file

* fix merge

Co-authored-by: James Greenhill <fuziontech@gmail.com>
2020-06-11 00:05:01 +02:00
James Greenhill
a8bff8387e
Run cypress in parallel and record job to dashboard (#959)
* Run cypress in parallel and record job to dashboard

* arbitrary change to test cache and to see if 4 is faster than 3
2020-06-09 12:20:31 +01:00
Tim Glaser
9b8736d576
Fix cypress linting errors and speed up tests (#865)
* Speed up e2e builds

* Don't go to demo when logging in/cypress errors

* Execute cypress in docker container

* Pull from correct image

* add -T

* Try something else

* Add dockerfile

* Don't push tags

* Tag

* Try another tag

* image tag

* Try pulling

* Try

* Try caching

* no docker ifle

* Install node

* name

* name
2020-06-08 19:34:39 +01:00
James Greenhill
f37adf3548
Cache yarn builds to speed up end to end testing (#927)
* Cache yarn builds to speed up end to end testing

* refine configs a bit

* map port to localhost for redis and postgres

* background posthog so we can proceed to next step

* test debug=1

* debug back to false

* block on posthog boot for debug

* back to single boot posthog step

* check response from login url

* see if this is ssl redirect

* more debugging around wait

* print out redirect to see where it is going

* print redirect location from header

* this is so tedius

* hit setup_admin url

* ok, so we know it's 500-ing let's see what response is

* reflect production docker file more closely for dep building

* posthog is up, let's see what it is returning that is causing failures

* Save screenshots as artifacts

* rename artifact and use zip

* demo is missing?

* only upload artifacts if cypress fails

* use the path for screenshots for artifacts

* clean up wait script and call it done for this PR

* correctly hash requirements for pip cache

* cache build and dep separately for yarn

* change to test the cache

* use cypress suggested runner for actions

* use parallel execution for cypress

* skip python caching for now

* not going to use parallel now because premium feature of cypress

* do not attempt to archive video artifacts

* re-enable pip cache 🤞

* bust the python cache and see if we can't get manage working

* test python cache

* it's just caching the pip cache...

* test turning DEBUG false

* reenable debug mode for now

* collectstatic after yarn build

* run collectstatic with noinput
2020-06-06 10:13:09 -07:00
James Greenhill
9bfb4f3802
Wait for PostHog to start serving requests before running cypress (#920)
* Work towards more reliable run of cypress

* health endpoint

* don't use requests lib

* update copy a bit since we are not waiting for frontend to build
2020-06-04 12:42:09 +01:00
Tim Glaser
d632d31e59
Update bug_report.md 2020-05-23 10:21:42 +01:00
Eric Duong
720c06f9e6
E2e important paths (#802)
* initial test

* add yaml

* add logs

* without tail

* run again for consistency

* wait longer

* manuall configure cypress

* use latest ubuntu

* try installing all

* yarn install

* yarn install with cypress

* full flow

* run again for consistency

* initial tests for trends

* handle exception

* separate e2e docker-compose

* run on pr

* trends-testing foundation

* run test

* don't pass everything

* handle uncaught exceptions

* fix dashboard tests

* change email domain

* change dataattr to data-attr and boilerplate cleanup

* base url config

* add script for test runner

* change default postgres

* test all pages

* basic actions per page and create funnel

* trend breakdown filter

* test create action

* add DAU and entity-specific filter

* uncomment

* run test

* .

* add clicks to tables

* add auth

* add changelog

* add dashbaord click

* uncomment test for single funnel

* add test for pinned dashboard

* fix copy paste button and add invite team link tests

* use data-attr for all filtesr

* fix overall filter

* remove filter

* disasble virtual scroll

* uncomment

* remove unnecessary

* run again

* increase timeout

* remove flimsy test

* run again

* add cypress checklist item

* force click cohorts button

* add opt out capture for tests

* remove some tests

* run twice

* .

* run twice
2020-05-22 12:34:48 -04:00
Eric Duong
a012aa6723
Cypress tests (#789)
* initial test

* add yaml

* add logs

* without tail

* run again for consistency

* wait longer

* manuall configure cypress

* use latest ubuntu

* try installing all

* yarn install

* yarn install with cypress

* full flow

* run again for consistency

* initial tests for trends

* handle exception

* separate e2e docker-compose

* run on pr

* trends-testing foundation

* run test

* don't pass everything

* handle uncaught exceptions

* fix dashboard tests

* change email domain

* change dataattr to data-attr and boilerplate cleanup

* base url config

* add script for test runner

* change default postgres
2020-05-19 14:48:10 -04:00
Tim Glaser
20fab5d5a2
Add ES Lint (#719)
* Add ES Lint

* Update lint.yml

* move lint file

* Add eslint to package

* use yarn

* Run ci/test only once

* Fix eslint errors

* Fix rest siblings

* precommit hooks

* Lint typo

* ESLint per file

* Eslint
2020-05-13 13:17:00 +01:00
Eric Duong
b30fec0518
Event Partitioning (#733)
* initial working

* update day to midnight

* update CI postgres version

* reverse migration file

* handle default

* add version check

* add existence test and fixed bug

* extend initial range partitioned

* reverse order of checks

* change granularity to week

* Speed up loading of events with person_id

* adjusted time to trigger and stay 2 weeks ahead instead of 1

* use commands instead of migration

* update reverse script

* remove migration test

* adjust update function to handle all partitioned

* handle errors

* change the check that is performed

Co-authored-by: Tim Glaser <tim.glaser@hiberly.com>
2020-05-12 21:35:53 +01:00
Tim Glaser
7827aa0971
Update pull_request_template.md 2020-04-27 19:42:42 +01:00
Raul Gallegos
150b061483
Flake8 setup and improvements (#660)
* flake8 setup

* flake8 first improvement example on test_action test

* fix on github workflow for installing dev requirements
2020-04-27 18:13:59 +02:00
Tim Glaser
04da66936a
Remove assignees 2020-04-23 11:30:05 +01:00
Tim Glaser
321572a92f Add github template 2020-04-20 14:40:11 +01:00
Tim Glaser
fa3aa8d69d
Fix running tests in forks (#580) 2020-04-14 15:34:04 +01:00
Tim Glaser
8ddcc180f6
Merge pull request #473 from PostHog/455-celery
Celery background workers
2020-04-07 17:20:33 +01:00
James Hawkins
9aac4c6643
Update feature_request.md 2020-04-07 14:04:08 +01:00
James Hawkins
0451d73a6a
Update bug_report.md 2020-04-07 14:03:36 +01:00
Marius Andra
7918a9d425 add REDIS_URL to mypy test 2020-04-07 14:02:09 +02:00
James Hawkins
75182dfdbe Update issue templates
* Changed wording order
* Added default tags
2020-04-07 13:01:19 +01:00
Tim Glaser
a477e30395
Create pull_request_template.md 2020-03-31 12:20:23 +01:00
Tim Glaser
f9b02bb8a2 Fix typing errors and add check 2020-03-26 11:26:18 +00:00
Marius Andra
b1db5a9084 safe mkdir for dist folder 2020-03-18 13:39:23 +01:00
Tim Glaser
58c4efcc50
Update pythonapp.yml 2020-02-28 12:08:42 -08:00
Tim Glaser
f4730449d4
Update pythonapp.yml 2020-02-21 15:57:20 -08:00
Tim Glaser
4f45186d4a
Update pythonapp.yml 2020-02-21 15:50:50 -08:00
Tim Glaser
4cf1437155
Create pythonapp.yml 2020-02-21 15:44:11 -08:00
James Hawkins
b73d76f81f Update issue templates
Added nice templates for bug reports and feature requests
2020-02-15 08:38:15 -08:00