0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 18:07:17 +01:00
Commit Graph

138 Commits

Author SHA1 Message Date
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
Alex Gyujin Kim
efaec341c7
add backwards compatibility check (#4770) 2021-06-16 10:07:40 +02:00
Marius Andra
0c61194584
add requirement to check CSS responsiveness (#4597) 2021-06-04 20:02: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
Marius Andra
f1517bafa1
Are migrations safe to run on cloud? (#3917) 2021-04-08 18:32:36 +00: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
Michael Matloka
200b80dd03
Chart above fold (#3142)
* Update TrendInsight minHeight to keep chart above the fold

* Refactor Insights main content for clarity

* Fix PostHog FOSS sync

* Remove extraneous div
2021-02-01 11:22:55 +01:00
Michael Matloka
427e4fac6e
Improve handling of .git* files/dirs (#3141)
* Create .gitattributes

* Remove .github/ in posthog-foss sync

* .gitignore whole directories (recursively ofc)

* Remove .gitignore line from ages past
2021-02-01 09:25:40 +01:00
Karl-Aksel Puulmann
a978b28a68
Run typescript with strict in CI, allow no new errors (#3050)
* Verify no new typescript code breaks "strict" compilation

With this we have a file containing all current errors. As the code
changes, we should not add more errors here.

* remove some lines to show a failure

* Add total count to script

* Update blacklist after rebase

* Remove some fails on purpose.

* Attempt a reorder

* Add missing file

* Update script to write typegen

* Refresh list

* Attempt to use normal tsc

* update blacklist

* Store all errors

* echo for typegen

* Add check command

* typegen 3 times

* typegen 4 times

* typegen 6 times

* typegen 10 times

* remove debug code

* Update kea typegen to latest

* Remove hacks
2021-01-22 16:36:30 +02:00
Michael Matloka
efe8870c85
Fix plugin server task definition rendering (#3053) 2021-01-22 15:01:25 +01:00
Michael Matloka
c9664e94fb
Issue templates plus (#2681)
* Update issue templates format

* Create imperfection_report.md

* Create performance_issue_report.md

* Rewrite Bug report `about`

* Address feedback

* Delete imperfection_report.md
2020-12-17 00:49:37 +01:00
Marius Andra
098343cbee
Deploy Plugins to AWS (#2755)
* create plugins task

* add plugins to container

* remove env vars that are probably not needed

* bump size of node for plugins

* don't run plugin server on worker

Co-authored-by: James Greenhill <fuziontech@gmail.com>
2020-12-15 18:10:00 -08:00
James Greenhill
7929ee1cf5
Quick fix to migrations (#2695) 2020-12-07 17:45:20 -08:00