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

9698 Commits

Author SHA1 Message Date
Paul D'Ambra
e6ea44ed9f
chore: refactor card meta to allow sharing it (#12637)
lifted out of #12560

Text and Insight Cards have a lot of overlap but could share more code
2022-11-09 15:01:50 +00:00
Emanuele Capparelli
bc3f12855a
fix: onboarding v2 as experiment (#12697)
* fix: onboarding v2 as experiment

* changed ff name
2022-11-09 16:34:41 +02:00
Tiina Turban
41c983cc93
chore: throw when we ran out of wait time waiting for CH ingestion (#12126) 2022-11-09 15:26:52 +01:00
Yakko Majuri
b815ce48b0
feat(jobs): add metric to count job enqueue attempts (#12684) 2022-11-09 13:31:37 +00:00
Michael Matloka
b5240571d6
test(trends): Add snapshotting to "alias inconsistencies" test (#12693) 2022-11-09 13:14:58 +00:00
Paul D'Ambra
e39e4adecf
feat: view insights list filtered by dashboard (#12636)
* feat: view insights list filtered by dashboard

* make dashboards match AND

* sort the assertion

* Update posthog/api/insight.py

Co-authored-by: Marius Andra <marius.andra@gmail.com>

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2022-11-09 13:08:40 +00:00
Raquel Smith
e13db278a5
feat(onboarding): directly prompt people to invite team members to help get set up (#12630)
* Add a feature flag for onboarding v2

* Support a 'technical' state
to store if the user can add the snippet

* Add a panel to invite team if not technical

* Show the invite panel if the flag is on

* Fix where this was always returning true

* Make navigation work

* couple fixes

* fix buttons

* Move all v2 stuff to its own folder

* Fix up the imports

* Fix more imports

* Create component to handle flag before using logic
When both V1 & V2 logics ran side-by-side their functions conflicted

* Let ppl get to the bookmarklet from invite panel

* Add invite members button to all onboarding panels

* Limit the width of the panels

* Change language to talk about value, not features

* Fix ts error

* Fix some spacing

* Add better description & link to HTTP API instrctn

* Add the invite button to the verify panel

* Show a more sane msg after completing onboarding

* move v1 onboarding to own folder

* fix imports

* fix more imports

* move types to top folder

* improve imports

Co-authored-by: Emanuele Capparelli <k@emkpp.com>
Co-authored-by: Emanuele Capparelli <kappa90@users.noreply.github.com>
2022-11-09 13:34:14 +02:00
Karl-Aksel Puulmann
0d2d981156
chore: Sync release 1.41.3 (#12688) 2022-11-09 12:22:21 +02:00
Guido Iaquinti
d6bc434f98
style(flake8): enable C403 (#12682) 2022-11-09 10:29:11 +01:00
Guido Iaquinti
c608e00943
chore(openssl): NodeJS upgrade to v18.12.1 (#12689) 2022-11-09 09:24:03 +00:00
Alex Gyujin Kim
e151057bd5
feat(recordings): Saved recording playlists (#12658)
Co-authored-by: Ben White <ben@posthog.com>
2022-11-08 23:07:43 +00:00
Yakko Majuri
469057b905
refactor(plugin-server): rename KafkaQueue to IngestionConsumer (#12540)
* refactor(plugin-server): rename KafkaQueue to IngestionConsumer

* fix

* final fix

* welp
2022-11-08 13:44:29 -03:00
Paul D'Ambra
63a1cb56e5
feat: choose if dashboard deletion also deletes insights (#12640)
Problem
Via customer feedback: If someone is deleting a dashboard they want to delete the insights too. At the moment that means they have to delete them one at a time.

Changes
Introduces a modal when deleting a dashboard that lets you choose whether to delete the insights on the dashboard

Soft-deletes the insights as appropriate
2022-11-08 15:50:58 +00:00
Michael Matloka
df11cf6c68
fix(trends): Show appropriate nested math value immediately (#12679) 2022-11-08 16:36:01 +01:00
Neil Kakkar
634976f304
feat(persons): Allow selecting IDs to see more accurate feature flag … (#12646)
feat(persons): Allow selecting IDs to see more accurate feature flag values
2022-11-08 14:42:11 +00:00
Paul D'Ambra
4aae310456
chore: more cypress flaking 🤔 (#12674)
* upgrade cypress and dependencies

* :side-eye-monkey.jpeg
2022-11-08 14:13:44 +00:00
Harry Waye
cc82a92871
fix(data-management): utm_ prefixed properties should always be strings (#12673)
Sometimes they look like numbers and get misidentified as such. This
makes them always strings.

Parially resolves https://github.com/PostHog/posthog/issues/12529 except
we do not update old property definitions. I'll do this separately.
2022-11-08 14:11:13 +00:00
Paul D'Ambra
f140fed398
chore: better heatmap logging (#12676)
* say what selector found a case with no elements

* even more logging when no elements unexpectedly matched
2022-11-08 13:30:51 +00:00
Paul D'Ambra
fd51fc86e5
fix: show spinner when heatmap isn't loading (#12675)
correct spinner logic for heatmap status
2022-11-08 13:23:50 +00:00
Emanuele Capparelli
ddbd03127e
fix: flaky cypress billing tests (#12677) 2022-11-08 13:06:06 +00:00
Harry Waye
d14494afc2
fix(plugin-server): add shutdown failsave timeout (#12667)
* fix(plugin-server): add shutdown failsave timeout

We were having an issue where a Kafka version upgrade caused the
plugin-server to hang on shutdown. This was because the Kafka producer
was not able to flush its messages to Kafka. This commit adds a timeout
to the shutdown process, so that the plugin-server will exit even if
something hangs.

See https://posthog.slack.com/archives/C046SERP277/p1667878901739969 for
details

I wasn't exactly sure how to make this a little more testable, but there
is clearly a blind spot for certain failure cases.

* Actually call the shutdown sequence

* wip
2022-11-08 12:19:55 +00:00
Paul D'Ambra
452fa591dd
chore: wait for page to settle before starting tests (#12671)
wait for page to settle before starting tests
2022-11-08 11:03:40 +00:00
Harry Waye
b010073ec4
test(plugin-server): add functional tests for property definitions (#12659)
* refactor(plugin-server): separate api from functional_tests

This just moves the api helpers to a separate file, such that we can
import from other files.

* test(plugin-server): add functional tests for property definitions

I was going to take a stab at
https://github.com/PostHog/posthog/issues/12529 but I wasn't sure how
the definition bits worked, so thought I'd add some tests first.

This doesn't just add tests but also:

 1. starts demonstrating how we can split up the tests into
    different files, thereby also allowing jest test isolation.
 2. removes --runInBand, such that isolated tests can run in parallel
2022-11-08 06:56:19 +00:00
Eric Duong
a35e022d4c
fix: null check on activity for feature flags (#12660)
null check on activity
2022-11-07 22:26:04 +00:00
Eric Duong
8cd440175a
fix: add null check to feature flags autorollback (#12656)
fix: add null checK
2022-11-07 19:33:39 +00:00
Yakko Majuri
05edc3a07c
feat: throw DependencyUnavailableError on unexpected connection terminations (#12649) 2022-11-07 16:10:53 -03:00
Emanuele Capparelli
865f29a83e
fix: bigger billing numbers (#12654) 2022-11-07 19:01:15 +00:00
Eric Duong
b3c310da40
feat(feature-flags): add table that shows feature flag exposures (#12555)
* add table

* change condition to account for multivariate

* cleanup
2022-11-07 12:23:21 -05:00
Paul Hultgren
7750a1ab7a
feat: add basic self-hosted CTA to sign-up page (#12578) 2022-11-07 14:54:18 +00:00
Tiina Turban
54720eaec1
fix: person ch distinct id deletion less racy (#12475) 2022-11-07 14:50:42 +01:00
Ben White
c8b3579d51
feat: Rollout billing v2 (#12644) 2022-11-07 13:40:14 +00:00
Ben White
3640679f45
feat: Support running individual usage reports (#12647) 2022-11-07 13:27:17 +00:00
Harry Waye
5318c425e4
chore(api): return 400 on entity_id not provided by requests (#12643)
* chore(api): return 400 on entity_id not provided by requests

Previously we were raising a ValueError for this case, which results in
a 500 HTTP status code when caught by django-rest-framework. Instead we
raise a ValidationError which should result in a 400 status code along
with the validation error message.

This change was prompted by [this slack
conversation](https://posthogusers.slack.com/archives/C01GLBKHKQT/p1667802817723279)
where the user was missing an `entity_id` and `entity_type` param.

* wip
2022-11-07 11:36:49 +00:00
Ben White
49d3027ff4
fix: Usage report org ids (#12642) 2022-11-07 09:31:00 +00:00
Paul D'Ambra
b3e7637ff5
chore: Bump version to 1.41.2 (#12624) 2022-11-07 08:31:09 +00:00
Michael Matloka
4472b4fddc
feat(lemon-ui): Allow nested selects (#12631)
* feat(lemon-ui): Allow nested selects

* Update unit picker typing

* Optimize `extractLeafOptions`

Avoid allocating multiple new arrays.
2022-11-07 09:16:37 +01:00
Karl-Aksel Puulmann
6940882dcb
feat(person-on-events): track groups-on-events separately using instance setting (#12601)
* feat(person-on-events): track groups-on-events separately using instance setting

We want to release persons-on-events but we found groups-related issues
in incoming data that need to be fixed to release the feature for
groups.

Instead of delaying the release further, this change allows us to turn
persons-on-events on only for persons and handle groups separately

* Update CI

* fix ee/clickhouse/models/test/test_property.py tests

* add GROUPS_JOIN_QUERY if needed for breakdowns

* Excluse a breakdown test

* Skip some funnels breakdown tests with mat group columns

* Skip groups-related breakdown tests

* Skip a group property test

* Undo changes to breakdown_props.py

* Update test_property.py

* Update snapshots

* groups_on_events off by default

* Update snapshots

* Remove override_instance_config

* Add a docstring

* Make setting editable

* Fix breakdowns issue

* Update snapshots

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-07 09:24:29 +02:00
Paul D'Ambra
016d211f60
chore: add is revert flag and rename event in pr stats (#12639) 2022-11-06 19:00:42 +01:00
Paul D'Ambra
210d52a64d
fix: safer check for presence of key (#12633) 2022-11-04 23:33:40 +00:00
Michael Matloka
dbc8df4e20
fix(lemon-ui): Make sure LemonSelect popover fits into viewport (#12629) 2022-11-04 19:03:58 +01:00
Paul D'Ambra
b571d4321b
chore: simple filter validation (#12628) 2022-11-04 17:47:34 +00:00
Michael Matloka
b6df9707fc
fix(trends): Support hourly "Compare to previous period" properly (#12595)
* fix(trends): Support hourly "Compare to previous period" properly

* Update snapshots

* Keep week-by-week hack, with extensive commentary

* Fix typing

* Fix missing words in comment

* Limit addition of 1 day to relative ranges

* Update snapshots

* Make special case handling mores specific

* Satisfy mypy

* Update tests

* Sprinkle on `@snapshot_clickhouse_queries`

* Update snapshots

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-11-04 16:04:41 +01:00
Michael Matloka
f19eb54d12
fix(insights): Reduce unit picker width (#12625) 2022-11-04 14:38:07 +00:00
Alex Gyujin Kim
a7a3e95daf
feat(recordings): new detail page for recording (#12609) 2022-11-04 09:14:18 -04:00
posthog-contributions-bot[bot]
0c1c546f5a
chore(contributors): 🤖 - Add nitzanballerine as a contributor 🎉 (#12622) 2022-11-04 11:22:58 +00:00
Paul D'Ambra
3cfb5dfff1
fix: listing org members was n+1 (#12616)
https://sentry.io/organizations/posthog/issues/3708039537/events/d0a4d5042ddf482f963714168ee00c50/?project=1899813&query=is%3Aunresolved&referrer=previous-event&statsPeriod=14d

sentry reports listing org members is nplus1
2022-11-04 11:14:15 +00:00
Paul D'Ambra
79c616e19d
fix: get dashboard is n+1 (#12619)
Problem
Getting a dashboard shows up in Sentry as having an n+1 query on team. Loading the team once per insight tile on the dashboard

https://sentry.io/organizations/posthog/issues/3708033962/events/231b0122bd834e54b44cfb6d2c6ff561/?project=1899813&query=is%3Aunresolved&referrer=previous-event&statsPeriod=14d

Changes
simplifies the existing n+1 test to make it clear that the query is still far from optimised
reads tiles off the dashboard in the serializer context to reduce several queries
the loading is still n+1 but far less than it was
we started at 10 additional queries for the first tile on a dashboard and three more for each subsequent tile
now we're on 8 for the first and 1 for each subsequent tile
2022-11-04 11:13:29 +00:00
nitzanballerine
507e0c4bba
chore: Changed contributors badge style of the to fit others (#12586)
Changed contributors badge style of the to fit others

The Contributors badge had a flat-square style and all of the rest had a flat style.
I changed it to be like the rest.
Hope it's ok, saw the section had a comment not to change or move anything, so double-check it...
2022-11-04 12:02:34 +01:00
Karl-Aksel Puulmann
a8bb1c6404
chore(plugin-server): Enforce strict timestamp types throughout ingesion (#12549)
chore(plugin-server): Enforce strict timestamp types throughout ingestion

We have had multiple bugs relating to various timestamp formats in the past - most systems use iso8601 whilst clickhouse uses its own format. See https://github.com/PostHog/posthog/pull/12547 for a recent example.

We have had a pattern for a while for the use of specific types (ClickHouseTimestamp, ISOTimestamp) in the code, but this was not enforced and some functions in the code did not return appropriate values.

This PR changes that
2022-11-04 09:29:15 +02:00
Ben White
67b0538e42
fix: Fixed usage report to billing and feature flag check (#12618) 2022-11-03 19:19:14 +00:00