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

129 Commits

Author SHA1 Message Date
Karl-Aksel Puulmann
1fd15301cf
Update staleness bot (#5324) 2021-07-28 10:39:43 +03:00
Michael Matloka
997f5dcbc1
Reword staleness check messages 2021-07-17 02:06:37 +02:00
Michael Matloka
ea3198ec3d
Run staleness check on weekdays only 2021-07-16 23:42:49 +02:00
Michael Matloka
fbf6400d8e
Change staleness check hour 2021-07-16 23:09:41 +02:00
Michael Matloka
67719cd5ed
Add staleness monitoring GitHub action (#5170) 2021-07-16 15:19:44 +00:00
Karl-Aksel Puulmann
11ede28a08
Default to "posthog" cluster (#5164)
As-is this default hurts local dev - one more setting you need to
export. Let's keep the setup simple instead.

Also the new default would have broken helm chart and production
when updating with new migrations - the cluster name there is `posthog`
for both it seems.

Let's force other deploys to be explicit instead.
2021-07-16 17:04:15 +03:00
James Greenhill
751a35cd35
Make DDLs more friendly towards running on a cluster and cleanups (#5091)
* Make DDLs more friendly towards running on a cluster

* Use primary CLICKHOUSE host for migrations and DDL

* loose ends on person kafka create

* posthog -> cluster typo

* add cluster to KAFKA create for plugin logs

* Feed the type monster

* clusterfy local clickhouse

* test docker-compose backed github action

* run just clickhouse and postgres from docker-compose

* move option to between up and <services>

* posthog all the things

* suggest tests run on  cluster

* posthog cluster for ci

* use deploy path for docker-compose

* fix for a clickhouse bug 🐛

* complete CH bug fixes

* 5439 the github actions pg configs

* remove CLICKHOUSE_DATABASE (handled automatically)

* update DATABASE_URL for code quality checks

* Missed a few DDLs on Person

* 5439 -> 5432 to please the people

* cleanup persons and use f strings <3 f strings

* remove auto parens

* Update requirements to use our fork of infi.clickhouse_orm

* fix person.py formatting

* Include boilerplate macros for a cluster
2021-07-15 17:20:37 -07:00
Michael Matloka
b1332e5f3a
Update posthog-foss.yml (#5156) 2021-07-15 22:29:33 +02:00
Michael Matloka
0711131de1
Run all CI workflows even for posthog-bot (#5078) 2021-07-12 13:16:42 +00:00
Tim Glaser
5f242b2bed
Solve ospath issue (#5014)
* Solve ospath issue

* try separate cypress cache

* Separate install

* ls

* try

* Try to put everything in same cache

* Remove cypress plugin snapshot

* fix cohorts and funnels
2021-07-07 14:04:39 +02:00
Michael Matloka
3f1393c6aa
Don't disable Cypress suite for bot PRs (#4974) 2021-07-02 09:15:32 +00:00
Tim Glaser
bb572272ca
Improve e2e flakeyness, skip Insights spec test (#4869)
* attempt to fix toolbar flakyness

* fix dashboard flakyness

* fix flake

* add retries to components

* Try speeding up build by skipping sourcemaps

* debug components

* show errors

* better error

* don't generate source map

* fix errors

* speed up component tests

* Try empty insights page

* Revert "Try empty insights page"

This reverts commit 68701b3804.

* Skip trends tests for now
2021-06-29 22:20:02 +02:00
Michael Matloka
4bd79a27b7
Fix CI on forks (#4754)
* Remove commented out test

* Update VERSION

* Don't run the automerge job on forks

* Revert "Update VERSION"

This reverts commit dc37f20133.

* Change automerge condition

* Change automerge condition a bit more

* Try scrolling

* Scroll by more

* Stop GitHub complaining about no jobs ran in a workflow

* Search for a different event name

* Try a different operator

* Don't default branch push jobs on forks

* Move clicks around

Co-authored-by: PostHog Bot <hey@posthog.com>
2021-06-17 00:22:23 +02:00
Karl-Aksel Puulmann
4aa773139c
Measure metrics from insights in instance metrics (#4495)
* Send info on insights query timing + route to posthog

This will help with determining the root cause of our problems

* Capture information on "timeouts" correctly

previously every error on insights was reported as a timeout.

* WIP

* Solve typing issues within insightslogic

* WIP part 2

* Add graphs for insight load times

* Add tests for new routes

* PR review iteration

* Make instance_status POST available for all

* Do some cache busting
2021-05-27 12:48:11 +03:00
Eric Duong
b53b1398e1
Fix CI cypress cache (#4511) 2021-05-26 13:32:15 -07:00
Eric Duong
2145d5b211
Return default url if no changes need to be made (#4481)
* return as last conditoin

* empty

* try glob

* remove explicit glob
2021-05-25 16:35:18 -04:00
Tim Glaser
68351f437a
Speed up other tests (#4418)
* WIP more speed improvements

* pick right files

* Fix yarn install

* try
2021-05-25 18:25:37 +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
Paolo D'Amico
7ea9eb692c
Update Django to 3.1.8 (and related) (#4007) 2021-04-19 12:59:10 -07:00
Paolo D'Amico
6b9f60fb2c
Notify Sentry of production releases (#3998)
* notify sentry when we do releases to production

* adjust action
2021-04-19 12:02:11 +02:00
Tim Glaser
5cfbc49cc3
Add clickhouse and max users to license (#3918)
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2021-04-14 08:45:39 -07:00
Marius Andra
1d2f9bf971
Minimum PostHog version in plugins (#3916)
* add "put_json_into_zip_archive" util

* add semantic version package

* compare posthog version requirement string in plugin.json if present

* Clarify posthogVersion error messages

* Don't check posthogVersion on Cloud

* Clarify error messages better

* Split test_create_plugin_version_ranges into multiple tests

* Add Cloud test and fix the rest

* Make mypy happy

* Update ci-backend.yml

* Fix typing

* Remove broad restore-keys

* Revert "Remove broad restore-keys"

This reverts commit b720e1e1cf.

* Attempt to make cached pip actually work

* Always run package installs even if cache hit just to be sure

* Avoid pytest from PATH

* Avoid PATH in Python CI altogether

* Roll back general CI changes

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-04-09 09:04:53 +02:00
Michael Matloka
3732b80c65
Run Automerge as posthog-bot (#3919) 2021-04-08 20:22:39 +02:00
posthog-contributions-bot[bot]
a45d7ae59a
🤖: Add gempain as a contributor 🎉 (#3906) 2021-04-08 12:28:10 +00:00
posthog-contributions-bot[bot]
0afeef0369
🤖: Add jeduden as a contributor 🎉 (#3905) 2021-04-08 12:13:10 +00:00
Paolo D'Amico
262e28497c
Fix cypress dependencies (#3881) 2021-04-06 09:21:21 -07:00
Paolo D'Amico
360445b6e0
Display when actions were last calculated (#3796) 2021-04-02 18:40:09 -05:00
posthog-contributions-bot[bot]
f962d65242
🤖: Add paolodamico as a contributor 🎉 (#3813)
* docs: update README.md

* docs: update .all-contributorsrc

* yet another ci fix

Co-authored-by: posthog-contributions-bot[bot] <80958034+posthog-contributions-bot[bot]@users.noreply.github.com>
Co-authored-by: yakkomajuri <yakko.majuri@gmail.com>
2021-03-30 16:15:42 +00:00
Yakko Majuri
adaa803fd6
Fix skip cci for bot (#3806) 2021-03-30 15:17:58 +00:00
Yakko Majuri
a4b2008261
Skip CI for posthog-contributions-bot (#3789)
* Skip CI for posthog-contributions-bot

* fix
2021-03-30 14:12:48 +00:00
Paolo D'Amico
89b71a9959
New login & signup (React) (#3701) 2021-03-25 07:40:20 -07:00
Karl-Aksel Puulmann
1adaa8abb7
Chunk session recording events (#3705)
* Chunk session recording events

Closes https://github.com/PostHog/posthog/issues/3632 and replaces https://github.com/PostHog/posthog/pull/3566/files

This should make it possible to ingest large full snapshot events

Base64 is used to compress the data for serialization purposes.

pytest.mock is used for clean patching methods

* Mock time.time for py3.7 compatibility

* Group captured $snapshot events by $session_id

* Don't chunk already chunked payloads
2021-03-23 11:39:13 +01:00
Michael Matloka
9f24da6741
Lint Dockerfiles (#3663)
* Lint with Hadolint in Docker test workflow

* Try fixing Hadolint install in workflow

* Try /bin/ instead of /usr/bin/

* Install Hadolint differently

* Install Hadolint differently differently

* Fix Hadolint install properly

* Use chmod +x

* Download Hadolint to workdir

* Update docker-image-test.yml

* Silence curl

* Address production.Dockerfile linter warnings

* Delete obsolete preview.Dockerfile

https://posthog.slack.com/archives/C0113360FFV/p1614948302111800?thread_ts=1614946698.107000&cid=C0113360FFV

* Address dev.Dockerfile linter warning

* Clean up production.Dockerfile
2021-03-18 18:03:42 +01:00
Michael Matloka
9c7e0fac25
Build and push dev image in docker-image-publish.yml (#3588) 2021-03-05 15:20:07 +01:00
Michael Matloka
1c296adadb
Fix edge condition in PR description check (#3575)
* Fix edge condition in PR description check

* Improve regex

* Fix regex

* Add support for more PostHog repos
2021-03-04 08:55:20 +01:00
James Greenhill
9aea95a239
Add docker hub build & push task to github actions (#3277)
* Add docker hub build & push task to github actions

* Sync Docker image dry and wet run workflows

* Update docker-image-test.yml

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-03-04 08:50:54 +01:00
Paolo D'Amico
984b5fff98
Fix cloud tests on main repo (#3559) 2021-03-02 13:47:56 -08:00
Michael Matloka
fc12c723c6
Clean up PR bot workflow (#3546)
* Update .gitignore

* Clean up PR bot workflow

* Revert .gitignore update
2021-03-01 22:07:52 +01:00
Tim Glaser
6215f77291
Soften shame message (#3541)
* Soften shame message

* Remove is-collaborator step and simplify message

* Rename drill.yml to janitor.yml

* Better handle pull request body

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-03-01 21:28:53 +01:00
Michael Matloka
5bcb7eba36
Add no-PR-description-shaming workflow (#3517)
* Add no-PR-description-shaming workflow

* Fix shame-worthiness check

* Clean up regex
2021-03-01 17:10:00 +01:00
Michael Matloka
941cfb386c
Revert "Use plugin-server container in containerized deploys" (#3516)
* Revert "Use plugin-server container in containerized deploys (#3515)"

This reverts commit 6fb295ed51.

* Update docker-compose.ch*.yml
2021-03-01 13:43:43 +01:00
Michael Matloka
6fb295ed51
Use plugin-server container in containerized deploys (#3515) 2021-03-01 12:56:33 +01:00
Paolo D'Amico
4e8ccbc2b6
Rename posthog-production to posthog-cloud (#3460) 2021-02-24 16:20:05 -06:00
Karl-Aksel Puulmann
24de8b55e4
Run tests via pytest (#3417)
* Compile requirements-dev.txt with latest pip-tools

* Install pytest

* Avoid picking up factories as tests

* New runner

* Always set TEST env variable running tests

Some of our tests rely on it.

* Remove repetition

* Fix a broken test

* Cut down noise from bin/tests

* Rename test factory

* Fix stickiness filter

* Skip a broken test

This has been broken since numpy removal PR. Sadly tests were not
running for this submodule

* Fix import on ee

* Run ee tests properly

The django_db_setup fixture will be automatically run when running ee/
module tests.

* Make tests run on CI

* Include REDIS_URL, fix cloud

* Set TEST env variable

* Hack cloud tests to work

* Attempt at workflow fix

* Import Person model when running ee tests

This module implicitly adds hooks, so this is needed when running tests

* Respect reuse-db for clickhouse

* Add custom markers to avoid warnings

* pytest: use ch test database always

Accidentally wiped by ch setup a few times without this. Oops

* Remove repetition in tests

* Pytest: Always run migrations

Testing a state cleanup fix

* Use same DB in conftest and main code

* Pytest: autoset TEST setting without env variable

* fix broken test

Co-authored-by: eric <eeoneric@gmail.com>
2021-02-24 09:32:44 +02:00
Karl-Aksel Puulmann
4ad6a28e60
Auto log in for e2e tests and review apps (#3377)
* Add AUTO_LOG_IN environment variable

This will be used when running tests on CI, setting up demo instances
and with cypress vcr

* Auto log in in review apps, e2e tests

This will speed up tests/reviewing significantly

* Rename AUTO_LOG_IN to AUTO_LOGIN

Co-authored-by: Michael Matloka <dev@twixes.com>
2021-02-18 13:59:09 +01:00
Karl-Aksel Puulmann
30b6692920
React component tests with cypress (#3233)
* WIP: get cypress something doing

* Get a test running

* Get css loading, stub posthog

* Move helpers to separate file

* Givens > given2

It plays nicer with beforeEach

* Test for session filters

* Test date navigation

* Test filtering

* Try keep old tests running

* Try get tests running under CI

* Prettify fixtures

* Cleanup, use cypress 6

* Add yarn build

* Fix e2e cypress tests

* given2 => givens

* Rename `frontend-test-runner` to `e2e-test-runner`

* Fix cypress test

* Add webpack-preprocessor as a devDependency

* Improve freezing time

* Make css inclusions automatic for component tests
2021-02-09 17:28:01 +02:00
Michael Matloka
6e8e729a68
Separate Jest from frontend code quality job (#3241) 2021-02-08 18:36:56 +01:00
Marius Andra
6efdb8efa6
revert plugins ECS definition to use plugin-server from ./plugins/package.json (#3177) 2021-02-03 12:21:49 +01:00
Michael Matloka
95900d4fce
Fix FOSS copyright formatting (#3146)
* Update posthog-foss.yml

* Prepend "MIT LIcense" to FOSS LICENSE
2021-02-01 15:26:00 +01:00
Michael Matloka
6f586f19eb
Update copyright years and use MIT license in posthog-foss (#3145)
* Add 2021 to copyright years in LICENSE

* Change LICENSE to pure MIT in posthog-foss
2021-02-01 14:55:39 +01:00