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

1629 Commits

Author SHA1 Message Date
Tim Glaser
dc4b1daafd
Release 1.15.1 (#1992)
* Changelog version 1.15.1

* Bump version 1.15.1
2020-10-26 11:34:34 +01:00
Michael Matloka
05ba148c17
Add ability to reset project API token (#2015)
* Add ability to reset project API token

* Add Popconfirm

* Disable option to set own api_token

* Fix element key

* Simplify text

* Slightly improve margin-left

* Improve /api/team detail view retrieval

* Add Never support to humanFriendlyDetailedTime

* Fix typing
2020-10-26 11:30:24 +01:00
Michael Matloka
51c329248f
Make PostHog compatibile with Python 3.9 (#1987)
* Make PostHog compatibile with Python 3.9

* Update actions/setup-python and run Django tests in matrix

* Don't test pypy

* Better specify Py matrix
2020-10-26 11:11:02 +01:00
Karl-Aksel Puulmann
188add8794
Session recording hotfixes (#2021)
* Handle no sessions in session_recording.add_session_recording_ids

* Fix sessions screen on clickhouse

It does not yet support clickhouse-based setups, will fix in a follow-up
PR.

Sentry:
- https://sentry.io/organizations/posthog/issues/1981146485/?project=1899813&referrer=slack
- https://sentry.io/organizations/posthog/issues/1980156250/?project=1899813&referrer=slack
2020-10-26 09:53:48 +02:00
Tim Glaser
21d240df30
[Clickhouse] Fix grabbing by person (#1960)
* Use postgres to grab person

* Fix type

* Fix grabbing by person id

* Fix type

* WIP people from clickhouse

* Fix person delete etc

* fix test

* Fix tests
2020-10-23 17:30:12 +02:00
Tim Glaser
151222eb28
[Clickhouse] Fix action filtering on events (#2013)
* Fix action filtering on events

* Fix tests

* Fix test
2020-10-23 17:29:59 +02:00
Karl-Aksel Puulmann
05a96db4d4
Add types to window.posthog (#2012)
* Add typing to userLogic

This will help avoid issues like 1955

* Declare globals.d.ts, use window.posthog correctly in featureFlagLogic
2020-10-23 17:09:36 +03:00
Michael Matloka
8dd8970854
Rename existing projects to "Default Project" (#2009)
* Rename existing projects to "Default Project"

* Use ORM instead of raw SQL

* Update latest_migrations.manifest
2020-10-23 16:03:34 +02:00
Michael Matloka
ede27dfb01
Enable compatibility with old Team signup links (#2007)
* Enable compatibility with old Team signup links

* Fix get()

* Adjust typing

* Add API test of compatibilty
2020-10-23 16:03:19 +02:00
Karl-Aksel Puulmann
d92e533dd5
Session recording: persistent URLs, session_id, UI changes (#1953)
* Hide $session_id properties

* Exclude $snapshot events from event views

* Add end_time to sessions queries

This might be used by SessionRecording queries

* Add WIP way to return session recording

Note that this mutates existing responses - might not be the best way to
do this.

* Query for feature flags in a consistent way in frontend

* Improve documentation on featureFlagLogic

* Update frontend types

* Set up endpoint for querying event data for rrweb

* Sort snapshot data in BE before sending to FE

* Show sessions player in a drawer, load data from API

This makes for a smoother experience (IMO, will iterate). At the very
least, drawers enable us to have differing urls via kea

* Show loader while replay is loading

* Make player full-width

* Remove debug code

* Implement persistent URLs for sessions

This should make it possible to share recordings with team.

The URLs are currently quite long - perhaps we can get rid of
distinct_id long-term within it?

* Use only $session_id for filtering sessions

There's a small risk of collisions, but this cleans code up a lot

* WIP

* Add `array.flatMap` to tsconfig

* Add selectors for prev/next session recording

* Clean up whitespace

* Make next and previous buttons work

* Patch prev/next behavior when not visible in page

* Session recording query testing

* Fix typing errors

* Make Sessions queries work properly

It was previously overwriting things even in queries not returning a
list of sessions

* Blacklist browsers w/o flatMap (PR review)

* Close sessions player on back

* fix back button and small bugs

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2020-10-23 16:53:59 +03:00
Marius Andra
e4895ba80a
Cohorts Test (#2003)
* test creating and listing cohorts

* try to fix flakyness by clicking the dropdown item even if it's not visible
2020-10-23 15:52:59 +02:00
Michael Matloka
33fd0d3d56
Fix links (#2004)
* Fix links

* Fix import path

* Fix messages
2020-10-23 15:50:41 +02:00
Karl-Aksel Puulmann
bfde01b6c9
Use posthog.js correctly in userLogic (#1975)
* Use posthog.js correctly in userLogic

This caused some confusion (issue #1955) - we should be using our own
tools correctly. 😅

* Always update email (PR feedback)
2020-10-23 16:00:11 +03:00
Eric Duong
d226b4b5b4
Add tests to important query builders (#2006)
* add default tests

* add action filter_event test

* add test to parse_prop_clauses

* add ordering to session list

* fix tests and funnel

* run again
2020-10-23 08:39:41 -04:00
Eric Duong
a15b387d1a
patch broken link from changed path (#2002) 2020-10-23 11:34:06 +02:00
Marius Andra
187b1ea7df
fix cohort link (#2000) 2020-10-23 11:12:26 +02:00
Tim Glaser
583d796db5
Break down feature_flag_response and add to propertykeyinfo (#1991) 2020-10-23 09:32:55 +03:00
Eric Duong
51105ace47
Add new person matieralized (#1944)
* add new table migrations and change table names

* include necessaray config for new tables in tests

* fix tests and table

* fix table name param

* add populate clause

* added table for key value person props

* adjust person filtering to use new table

* .

* add ordering on updated_at

* add back all the condition handling on persons filtering endpoint

* fix typgin

* remove print

* re-order sort key for persons_up_to_date

Co-authored-by: James Greenhill <fuziontech@gmail.com>
2020-10-22 13:22:43 -07:00
Tim Glaser
8132deaca0
Revert "Ignore certain api key (#1993)" (#1994)
This reverts commit 7fbc3aa9bc.
2020-10-22 19:40:12 +02:00
Tim Glaser
7fbc3aa9bc
Ignore certain api key (#1993) 2020-10-22 19:34:50 +02:00
James Greenhill
f6fcde9f11
Selectively block certain teams from publishing events to PG (#1974) 2020-10-22 10:16:12 -07:00
PostHog Bot
12f9745434 Update VERSION 2020-10-22 16:51:47 +00:00
Paolo D'Amico
44bfcffca4
201021 Fix weekly email report (#1954)
* refactor weekly email task to schedule one async job per team

* optimise async email processing

* turns on weekly email cron job if env var is True

* ensure weekly report emails are sent only once to each email address

* fix mypy
2020-10-22 18:46:33 +02:00
Eric Duong
fb352aa8dc
add default time range (#1989)
* add default time range

* fix var
2020-10-22 10:33:32 -04:00
Tim Glaser
37883c6600
Fix review apps (#1977) 2020-10-22 16:04:17 +02:00
Eric Duong
0b5bb1ad74
add filter on noisy events (#1988) 2020-10-22 09:46:01 -04:00
Karl-Aksel Puulmann
2812aa25ff
Fix cypress tests (#1986)
people.js was done by the refactoring/renaming being done in
533c7df105
2020-10-22 15:42:38 +02:00
Eric Duong
9057549ca3
remove unneeded properties on query (#1984) 2020-10-22 09:18:38 -04:00
Michael Matloka
eb72be436b
Potentially fix Cypress test (#1982)
* Potentially fix demo project

* Use create_with_data
2020-10-22 16:00:38 +03:00
Eric Duong
cecb7510b8
General Reorganization (#1981)
* small tweaks and reorganize session queries

* move all queries to query folder
2020-10-22 07:35:57 -04:00
Eric Duong
17a46f7193
Revert "Revert "Use postgres to grab person"" (#1971)
* Revert "Revert "Use postgres to grab person (#1957)" (#1963)"

This reverts commit 94f44bdf46.

* Filter by team_id

Co-authored-by: Tim Glaser <tim@glsr.nl>
2020-10-22 11:05:37 +02:00
Karl-Aksel Puulmann
3868166cb8
Update posthog-js to latest (1.5.2) (#1979) 2020-10-22 12:05:21 +03:00
Michael Matloka
533c7df105
Organization<>Team<>User structure (closes #1540) (#1562)
* Backend changes to implement #1461

* Added the missing migration files

* Fixes Typecheck errors

* Refactor request.user.team_set.get() to use request.user.team

* Updated user patch method to change current_team on team id instead of name

* Merged migration file

* Changes team property to return first item in queryset

* Fixes failing tests

* Changed User api to return the ids of the teams they are currently part of

* Frontend for changing teams

* Update and simplify migrations

* Improve team and user buttons

* Make team changing backend more logical

* Improve current_team mechanics

* Update test_team.py

* Fix Team.objects.create_with_data

* Update migration

* Update tests

* Make setup_review more convenient

* Add Organization and OrganizationMembership

* Replace is_admin with level

* Extend API

* Update team.py

* Improve modeling

* Improve handling of new mechanics

* Add proper migration

* Remove _ensure_organization_and_team

* Update 0084_org_team_user.py

* Improve user, org and team creation

* Make MembershipLevel more flexible for the future

* Add member deletion

* Fix naive datetime warnings

* Update setup_review.py

* Update API route

* Make PersonalAPIKey changes

* Update models and migrations, fix typing

* Fix typing

* Use MAC-less UUID v1 instead of v4 for better performance

* Add abstract UUIDModel

* Update utils.py

* Update utils.py

* Fix multi/unicast bit

* Update APIs, frontend and tests

* Update pull_request_template.md

* Fix comment

* Fix migration error

* Compress migrations

* Updates with minimal renaming

* More updates

* Make further updates

* Update test_team_user.py

* Fix issues

* Add migration

* Satisfy mypy

* Remove Signup redirect on logged in

* Use uuid1_macless in Person

* Fix typing

* Update tests

* Update /api/team/signup to /api/organization/signup

* Fix mypy issues and update tests

The remaining failures are actually missing functionality (TDD applied), so filling these in.

* Update 0086_org_live

* Make small improvements

* Implement permissions

* Remove now unneccesary membership check

* Update setup_dev.py

* Make small frontend improvements

* Add drf-nested-routers as requirement

* Remove unused import

* Implemented nested routes

* Remove cruft

* Add relevant org/proj/user name to headings

* Fix imports

* Update migration

* Replace unreliable drf-nested-routers with drf-extensions

* Improve unset team handling

* Make org and team creation proper

* Update migration

* Fix migration

* Update TopContent

* Update command palette for new sidebar structure

* Remove deprecated demo data deletion

* Assume that each org has a project and fix typing

* Require paid plan for multiple orgs and projects

* Make HogFlix demo a separate team

* Update migration

* Slightly improve style

* Adjust page layout bottom padding

* Make user dropdown nicer

* Fix base app tests

* Satisfy mypy

* Fix test_leave_organization

* Improve wording

* Possibly fix import

* Remove misplaced None check

* Enhance org and teams APIs and add tests

* Fix /api/projects for particular Team

* Improve invites and demo data

* Address feedback

* Put everything related to billing on Organization

* Fix minor issues

* Simplify invitation creation

* Update team model

* Make orgs and projects premium only on self-hosted

* Improve testing

* Update migration

* Remove extra License import

* Fix minor issues

* Fix Django tests

* Fix Cypress

* Fix yarn build

* Fix TeamSignupViewset

* Fix posthog-production incompatibility

* Remove extraneous insight endpoint registration

* Adjust tests for posthog-production

* Simplify invitations and fix email validation

* Address all feedback

* Satisfy mypy

* Update migration

* Fix constraint removal in migration

* Update tests

* Fix test creation edge case

* Run posthog-production CI tests against this branch and teams-live

* Ensure that js_posthog_api_key is always passed

* Fix preflight check pre-login

* Update cypress tests

* Update instanceStatus.js

* Bring ee tets up to par

* Bring actions-ux-201012 back

* Cypress retry in cypress.json

* Revert "Run posthog-production CI tests against this branch and teams-live"

This reverts commit d79cb844d8.

Co-authored-by: anna <ms.annaphilips@gmail.com>
Co-authored-by: Anna Philips <aphilips@matmacorp.com>
2020-10-22 10:58:32 +02:00
Tim Glaser
83ab0bb337
Automatically run CH migrations locally (#1978) 2020-10-22 10:34:30 +02:00
Karl-Aksel Puulmann
16a059cee1
Update posthog-js to latest (#1976)
This will also enable https://github.com/PostHog/posthog-js/pull/99 for
all users
2020-10-22 10:28:00 +02:00
Tim Glaser
8cb7b1e0f4
Fix feature flag toast on success (#1970) 2020-10-22 10:15:00 +02:00
James Greenhill
7ab30a836c
Remove Omni-Person logic for ee (#1972)
* Remove Omni-Person logic for ee

* remove more omni person references
2020-10-21 14:06:45 -07:00
Tim Glaser
2396d02b39
Remove kea typegen from build (#1966) 2020-10-21 22:25:39 +02:00
James Greenhill
cbfaad8f59
re-enable postgres ingestion (#1969) 2020-10-21 12:43:26 -07:00
Tim Glaser
f5552cb017
Add specific team_id to query (#1967)
* Fix capture event query

* Add specific team_id to query
2020-10-21 21:26:44 +02:00
Tim Glaser
a046407b1e
Fix capture event query (#1965) 2020-10-21 21:13:57 +02:00
James Greenhill
8a529bf20b
Turn off pg consumption on app.posthog (#1964) 2020-10-21 20:53:19 +02:00
James Greenhill
b74d06a96a
Create a write ahead log for cloud event processing (#1962)
* Create a write ahead log for cloud event processing

* mypy fix

* if we are on app (ee) don't log to postgres

* don't disable writing to postgres
2020-10-21 20:35:07 +02:00
Tim Glaser
94f44bdf46
Revert "Use postgres to grab person (#1957)" (#1963)
This reverts commit 6d9f4d7f77.
2020-10-21 20:34:49 +02:00
Tim Glaser
a518c3985f
Hardcode ids to ignore postgres (#1961) 2020-10-21 19:35:09 +02:00
Tim Glaser
711326e81a
Add usage button to feature flags (#1947)
* Make log output locally less noisy

* Add usage button to feature flags

* convert backTo logic to kea

Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
2020-10-21 18:54:33 +02:00
Tim Glaser
6d9f4d7f77
Use postgres to grab person (#1957)
* Use postgres to grab person

* Fix type
2020-10-21 17:11:55 +02:00
Eric Duong
2a7cd8c477
Fix negation operators (#1941)
* fixed negation operators for person and cohorts

* add person negation test

* fix tests

* add leakeage tests

* add space

* add debug statements

* match distinct_id
2020-10-21 07:12:05 -04:00
Tim Glaser
88e20220d1
Update test runner (#1952)
* Remove cypress from package.json

* Update test runner

* correct dommand

* Use npx
2020-10-21 11:42:17 +02:00
Karl-Aksel Puulmann
6eda8b860b
Update posthog-js to latest beta (#1951)
This will have $session_id set for events
2020-10-21 12:08:01 +03:00