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

7084 Commits

Author SHA1 Message Date
Michael Matloka
11ffc21d03
Make dashboard restriction level production-ready (#8418)
* Add lock icons

* Add and use `LemonSelect` for more readable code

* Eagerly show newly selected value for better responsiveness

* Refactor `outlinedBlock`
2022-02-03 17:10:31 +01:00
Harry Waye
3604c72e3a
feat(k8s): add kafka connection status to health check endpoint (#8258)
* feat(k8s): add kafka connection status to health check endpoint

This change adds a kafka check to the existing health check that uses
the underlying kafka python libs `bootstrap_connected` to check that we
are connected to kafka.

To accommodate the extra check in the response, I have updated to return
a JSON response with a lookup of `"check_name"` to it's status. We
return if any of the checks return `False`.

Something I didn't do was allow for checking each check in isolation,
e.g. we could expose for instance just the kafka_connected check at
`/_health/kafka`

* sort imports

* Remove unused requests arg, maybe useful later but not now.

* Add readyz and livez endpoint

* Add some docs

* link to k8s

* be specific about postgres

* some tests don't need postgres

* kubernetes -> process orchestration system

* update how we check kafka connection

* remove return
2022-02-03 15:15:48 +00:00
Paul D'Ambra
e05d8160e2
More specific operator value select options by property type (#8350)
* make the operator value select box have more specific options by property type

* fix test

* convert usememo to useeffect

* squash a nit
2022-02-03 15:29:23 +01:00
Alex Gyujin Kim
91c73aea45
Definition Popups for all types of taxonomic filter groups! (#8149)
* add components

* taxonomies for all

* add description popup timestamps

* action definition

* propertiees

* actions and cohorts

* implement all popup types

* remove consoles

* dupes

* remove unused styles

* show lock when taxonomy isn't available

* simplify provider

* hide "view" button

* more descriptive name

* clean types, fix NumericalEventProperties

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2022-02-03 14:20:48 +00:00
Marius Andra
28a16feae9
Refactor old cohort event selector (#8416)
* create even simpler TaxonomicStringPopup

* remove functional programming bugs

* full width by default

* findActionName helper

* use taxonomic filter for choosing cohort event/action
2022-02-03 13:35:21 +00:00
Neil Kakkar
c3b23d7981
Better visibility into significance results (#8403)
* Better visibility into significance results

* resolve open question, choose significance based on control
2022-02-03 11:01:09 +00:00
Marius Andra
006a8cbfec
rename Experiment to Experiment_ (#8413) 2022-02-03 09:38:20 +00:00
Marius Andra
6071cfd053
Replace math property selector with taxonomic selector (#8389)
* replace math property selector with taxonomic selector

* refactor storybook taxonomic filter scene

* taxonomic popup component and scene

* refactor EventName

* add kea support to a story

* fix import paths

* use TaxonomicPopup instead of MathPropertySelector

* button toggles popup

* show seen values based on the event

* don't hide $properties

* remove reliance on properties model

* add data-attr

* misc cleanup
2022-02-02 21:02:11 +00:00
Michael Matloka
8b5ecc9f6f
Dashboard permissions base (#8394)
* Add models for dashboard permissions

* Update migrations

* Add basic API capabilities

* Add basic dashboard perms UI

* Update test_insight.ambr

* Fix typing

* Split RestrictionLevel into RestrictionLevel&PrivilegeLevel for clarity

* Update migrations post-merge
2022-02-02 17:16:35 +01:00
Marius Andra
e8ee8d90cd
Taxonomic popup component (#8399)
* refactor storybook taxonomic filter scene

* taxonomic popup component and scene

* refactor EventName

* add kea support to a story

* fix import paths
2022-02-02 17:05:37 +01:00
Neil Kakkar
2e1932dd57
Refactor preview a bit, add expected end date, clarify tooltip for FF (#8402)
* Refactor preview a bit, add expected end date, clarify tooltip for FF

* clean

* dont show 0s while loading
2022-02-02 15:57:39 +00:00
Alex Gyujin Kim
c12179b5ba
Give actions descriptions (#8272)
* add description to action

* update tests

* no limit to description and use pageheader

* add ee_action

* add description as global relationship:

* fix tests

* revert to using descriptions

* revert to using descriptions

* allow description to be null

* fix tests

* persist mode

* fix e2e

* Address review points, clean up some margins

* Clean up the way editing state is determined

* Restore default description value and improve typing

* Fix typing better

* Update sql.ts

Co-authored-by: Michael Matloka <dev@twixes.com>
2022-02-02 15:50:28 +01:00
Harry Waye
2baddd59fb
perf(events): limit select clause when getting ingest requirements (#8381)
* perf(events): limit select clause when getting ingest requirements

Previously we were pulling in all table columns for every event posted
to the `/e/` column. We actually only need the id, such that we can
associate an event with a `Team`, and a setting which says if we should
anonymize ip addresses.

There are still other optimizations to make, and some of the code paths
do several queries to the database, but I have limited the changes here
to just the most straight forward of them.

Refers to https://github.com/PostHog/posthog/issues/8378

* Add a little comment

* Filter by team_id

* Avoid changing error messages

* Update import get_team -> get_ingest_context

* Fix typing

* fix types

* fix mocking

* fix type

* Rename InjestContext -> EventIngestContext

* Update ingestion context fetch methods

* Further rename fetch functions
2022-02-02 13:46:44 +00:00
dependabot[bot]
12d3bc1211
Bump node-fetch from 2.6.1 to 2.6.7 in /plugin-server (#8223)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
2022-02-02 14:24:09 +01:00
dependabot[bot]
6144eecff9
Bump node-fetch from 2.6.1 to 2.6.7 (#8224)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-02 14:03:49 +01:00
Yakko Majuri
5ad87d18b1
add test for async migrations not being required on fresh installs (#8323)
* add test for async migrations not being required on fresh installs

* fix

* fix testing

* Update .flake8

* fix test?

* run tests

* fix test for good

* fixes

* attempt

* remove ee tag
2022-02-02 07:47:49 -05:00
Yakko Majuri
e1499b3a9e
system status number formatting (#8367)
* system status number formatting

* Update ee/clickhouse/system_status.py

Co-authored-by: Tiina Turban <tiina303@gmail.com>

* simplifications

* simplify more

* simplify

Co-authored-by: Tiina Turban <tiina303@gmail.com>
2022-02-02 07:41:49 -05:00
Paul D'Ambra
5db28bbec2
Allows date equality checking in property filters (#8352)
* allow datepicker in date only mode

* allow exact date matching in property filters

* marks is_date_after as a date operator

* the date picker needs to work with null/undefined as well as string

* remove unused relative date parsing and fix date only is_date_exact property filters

* default to dates without times matching exactly

* make datetime filters by second work on date values that include milliseconds

* fix TS error

* correct insight url cypress test

* replace useMemo with useEffect

* be more specific in regex date match

* spacing under the quick choices

* when checking after a date for a date only filter check against that day at 23:59:59

* remove redundant text

* add test case and fix is_date_after query
2022-02-02 12:29:59 +01:00
Marius Andra
c0e1db7d61
Fix double event table load (#8397)
* fix events table double load

* modernise tests

* remove setDelayedLoading, add debounce to loading

* add test for getting just one get

* wait for success
2022-02-02 10:26:25 +00:00
PostHog bot
358e3da21e
Update posthog-js to 1.17.8 (#8398) 2022-02-02 09:52:31 +00:00
Karl-Aksel Puulmann
2e6aae702d
Allow disabling protobuf with CLICKHOUSE_DISABLE_EXTERNAL_SCHEMAS env (#8333)
* Allow disabling protobuf with CLICKHOUSE_DISABLE_EXTERNAL_SCHEMAS env var

This makes integrating with external clickhouse providers (like altinity
cloud) much easier as users don't need to use undocumented APIs to
upload the schemas.

* Keep underscores in protobuf. This allows using this payload for json ingestion

* Timestamp format
2022-02-02 00:30:11 +02:00
Eric Duong
15f5f1754d
cleanup(cohort) (#8371)
* move cohort viewset

* remove unused
2022-02-01 14:58:20 -05:00
James Greenhill
91dfa6897d
Add annotation to grafana on deploy (#8393)
* Add annotation to grafana on deploy

* prettier format yaml
2022-02-01 19:20:14 +00:00
Eric Duong
a7e792c3fc
cleanup(persons) (#8365)
* combine viewsets

* move tests

* import correctly

* change naming

* add mixin
2022-02-01 11:16:49 -05:00
Eric Duong
097a95da98
yeet(events): move event viewset (#8177)
* move event viewsets

* restore original serializer for now

* restore legacy
2022-02-01 11:00:10 -05:00
Eric Duong
5f4dfb906b
cleanup(element) (#8370)
* move element viewset

* typing

* make sure tests run

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2022-02-01 10:40:59 -05:00
Paul D'Ambra
5f7d3c566d
Deprecates property_type_format (#8292)
* remove property_type_format concept

* remove nulls from tests

* deprecate not remove (and see what tests fail)

* plugin server tests care about property_type_format

* fix tests
2022-02-01 14:08:55 +00:00
Michael Matloka
e4c228fca9
Use more meaningful file/prop names in LemonRow/LemonButton/LemonSwitch (#8375)
* Rename `index.tsx` files away for LemonRow and LemonButton

* Rename LemonSwitch prop `block` to `outlinedBlock`
2022-02-01 14:29:40 +01:00
PostHog bot
a485b72844
Update posthog-js to 1.17.7 (#8374) 2022-02-01 10:36:53 +00:00
Yakko Majuri
09e37663f4
Add dead letter queue metrics to system status (#8294)
* add dead letter queue metrics to system status

* today -> last 24h

* fix test
2022-01-31 15:10:10 -03:00
Neil Kakkar
6ec22ce452
Make experiment descriptions editable & Tooltip for significance threshold (#8357)
* make experiment descriptions editable

* add tooltip and fix colours
2022-01-31 17:06:24 +00:00
Paolo D'Amico
8af363e155
Release v1.32.0 & announce (#8360) 2022-01-31 16:50:49 +00:00
Neil Kakkar
da846464e4
Secondary Experiment Metrics frontend (#8115)
* wip secondary experiments

* clean up

* tweak initialiser

* Add basic frontend for secondary metrics

* small style updates

* prettier

* dayjs pleaseee

* type check

* feature flag it

* prettier

* typescript

Co-authored-by: Li Yi Yu <li@posthog.com>
2022-01-31 16:50:12 +00:00
Alex Gyujin Kim
9774bc83d9
Percentage based line graphs should show percentage counts (#8348) 2022-01-31 08:42:14 -08:00
Michael Matloka
89f756b255
ShareModal redesign (#8346)
* Update switch style

* Update dashboard embed snippet wording

* Improve dashboard item dragging

* Rework `ShareModal` for new design

* Update E2E test

* Fix mispaste

* Update dashboard.js

* Update dashboard.js
2022-01-31 16:07:24 +01:00
Michael Matloka
deaeb14fb7
Insight details property math, groups, Paths (#8344)
* Support property and group math types in InsightDetails

* Add support for Paths to InsightDetails
2022-01-31 15:24:39 +01:00
Yakko Majuri
b4247cc4d3
add new state for async migrations failing at startup (#8342)
* add new state for async migrations failing at startup

* add status medssage

* address review

* add failedatstartup state to first failed healthcheck
2022-01-31 11:16:06 -03:00
Yakko Majuri
cc471bb2b5
run healthcheck in addition to precheck for async migrations (#8324)
* run healthcheck in addition to precheck for async migrations

* remove duplicate func
2022-01-31 10:27:07 -03:00
Yakko Majuri
a08d8a4f7d
failure_timestamp -> error_timestamp in django dlq producer (#8263) 2022-01-31 10:25:33 -03:00
Tiina Turban
b23e5380f2
Async migrations no email on not required (#8199) 2022-01-31 14:07:20 +01:00
Yakko Majuri
f274fea126
update plugins repo url (#8359)
* update plugins repo url

* Update posthog/api/plugin.py

* Update posthog/plugins/test/mock.py
2022-01-31 13:05:05 +00:00
Dawid Janik
6da21e2428
Increase request line limit for Gunicorn. (#8184) 2022-01-31 12:14:04 +02:00
Karl-Aksel Puulmann
53998c45cd
Allow overriding kafka host for clickhouse via KAFKA_URL_CLICKHOUSE env var (#8332)
* Allow overriding kafka host for clickhouse via KAFKA_URL_CLICKHOUSE env var

This is needed when using an external clickhouse which doesn't have the
same access to kafka as in-cluster traffic does.

Note that long-term we might need to also provide better auth mechanisms
here as well.

* Rename env variable
2022-01-31 10:21:08 +02:00
Michael Matloka
4b37908267
Fix "Rendered more hooks than during the previous render." in LineGraph (#8316) 2022-01-28 10:30:29 -08:00
Michael Matloka
03133f5f2a
Change plugin server HTTP_SERVER_PORT from 5000 to 6738 (#8335) 2022-01-28 14:11:56 -03:00
Michael Matloka
9d8f117976
Institute a limit of insight series/steps (#8320)
* Institute a limit of insight series/steps

* Increase funnel step count limit

* Reduce funnel step count limit
2022-01-28 14:20:52 +00:00
Karl-Aksel Puulmann
cb6839fe21
Revert "Adds reserved properties for filtering property definitions (#8291)" (#8340)
This reverts commit a6ff568d11.
2022-01-28 15:51:54 +02:00
Paul D'Ambra
a6ff568d11
Adds reserved properties for filtering property definitions (#8291)
* wip

* wip

* wip

* can filter events by reserved words - distinct_id, created_at, and timestamp - in the backend

* add reserved properties when showing property definitions

* capitalise name of property

* properties not reserved words

* get cypress working and make search work with reserved properties

* update event/values endpoint to use property_string_expr and so work with reserved properties

* remove created at from reserved words

* test fix

* fix test

* loosen cypress assertion

* exclude specific properties from the taxonomic property filter

* remove FE property definition fangling

* exclude $time and $timestamp property definitions from the backend

* add reserved properties in the API not the FE using a CTE

* use SQL comments in SQL strings

* remove mypy error

* fix enterprise property definitions

* fix tests and improve comment

* exclude materialised column rows with no values when getting event property definitions

* fix cypress test setup

* clean up dead code

* un-remove some not actually dead code

* correct cypress assertion

* try and fix a cypress test
2022-01-28 12:19:17 +00:00
Harry Waye
aafad724ea
fix(codespaces): only pin versions to major versions (#8318)
* fix: don't pin docker.io, avoid package install issues

* pin to major versions
2022-01-28 11:23:17 +00:00
Michael Matloka
e6d72f209a
Insight card expandable details (#8302)
* Add detail button to `InsightCard` and rework meta/viz sizing

* Add basic `InsightDetails`

* Flesh out `InsightDetails`

* Fix `FunnelsCue` hidden state

* Polish up sizing

* Fix typing

* Only render `InsightDetails` when needed

* Fix "Created by" alignment

* Show subfilter type (event or person)

* Improve saved insights cards grid responsiveness

* Fix funnels in saved insights card grid

* Fix details

* Tune query summary padding

* Support multiple breakdowns

* Use `PropertyKeyInfo` in series raw name

* Use compact properties display in Filters too

* Responsive "Show details", disable Paths and Retention details

* Tune `.SeriesDisplay__raw-name`
2022-01-28 11:23:32 +01:00