* Update demo data warning styles
Left-over from https://github.com/PostHog/posthog/pull/3103
* minor adjustment
Co-authored-by: Paolo D'Amico <paolodamico@users.noreply.github.com>
* Make PluginConfig.order mandatory
* upgrade plugin server to 0.6.10
* black
* Ensure no PluginConfig.order collission
* Clean up PluginConfig API
* Revert "Ensure no PluginConfig.order collission"
This reverts commit d8b2c907e4.
* Black
Co-authored-by: Marius Andra <marius.andra@gmail.com>
* Unify clickhouse and pg demo data creation
* Adapt yakkos demo data generation to normal demo
* Split demo.py into subfolder
* Add original, web data import
Note that elements are not added because they can't be added
automagically :(.
* Improve wording
* dont generate dashboards
* try get tests passing
* fix types
* Get cypress tests green
* fix form type
* split to enabled/disabled plugins and add empty and loading screens
* show ingestion order
* add "rearrange" button
* show alert when rearranging
* drag to sort plugins
* fixes
* move opt-out to "danger zone" in "advanced" tab
* refactor "custom" to "advanced" in the code
* rename to DangerZone
* start rearranging from dragging card
* show changed order
* remove extra button
* save order in the backend
* fix default config for newly installed plugins
* newly enabled plugins go to the end of the list
* mypy
* hide second "check again" button
* show code diff
* lowercase
* clarify string
* reload only if saved, add 403 status if no access, simplify dict
* set temporary order only on enabled plugins, avoiding rearranging "plugins to update" list
* simplify condition
* change empty component
* raise instead of 403
During tests it's making everything quite unreadable:
```
AXES: Cleaned up 0 expired access attempts from database that were older than 2021-01-26 07:30:23.776885+00:00
AXES: Successful login by {username: "user1@posthog.com", ip_address: "None", user_agent: "<unknown>", path_info: "<unknown>"}.
AXES: Cleaned up 0 expired access attempts from database that were older than 2021-01-26 07:30:23.786481+00:00
AXES: Successful logout by {username: "user1@posthog.com", ip_address: "None", user_agent: "<unknown>", path_info: "<unknown>"}.
```
* Migration for is_demo
* Populate is_demo when triggered
* Refactor: extract create_demo_team
* Also create ee sample data
* Create demo data if feature flag enabled (and in debug), redirect to root
* Show demo warning
* Solve rease issue
* Redirect to personalization
* Redirect to root
* Update antd to latest, which gives access to Alert action prop
* Update demowarning code
* update tests
* Update naming
* Update link
* Solve a regression case
This probably solves
https://sentry.io/organizations/posthog/issues/2180671668/?project=1899813&referrer=slack
but I get a slightly different error locally
* Quietly ignore (and report) errors in get_active_feature_flags
This method is used in mission-critical endpoints (/e, /decide), which
should avoid 500-ing due to application errors.
With capture_exception we still get a sentry error which should help us
debug
* refactor Signup location
* personalization route stub
* radio buttons base UI
* select radio options
* continue button
* save personalization state
* report personalization answers to PH
* all data & nicer UI
* mark personalization completed on DB
* cannot complete personalization twice
* rename components
* more fixes
* undo completed_personalization as per discussion, @macobo's PR coming
* fix ts
* Move adding feature flags to event to capture endpoint
* Remove unused imports
* Don't create empty event properties dict
* Don't ever create event properties if dict not present
* Test feature flags in test_capture
* Ensure that every event has a properties dict
* Only apply PLUGIN_SERVER_INGESTION_HANDOFF to plugin-whitelisted orgs
* Adjust tests for ensured event properies dict
* Add session recording retention period column
* Allow setting session recording retention period
Solves #3059
* Run session recording retention task on all self-hosted
Using setting from team.session_recording_retention_period_days
It was not filtering by team_id on a subquery. Hotfix which changes the
query to
```
SELECT (EXISTS(SELECT U0."id" FROM "posthog_cohortpeople" U0 WHERE (U0."cohort_id" = 1 AND U0."person_id" = "posthog_person"."id")) AND "posthog_person"."team_id" = 1) AS "group_0"
FROM "posthog_person"
INNER JOIN "posthog_persondistinctid"
ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
WHERE ("posthog_persondistinctid"."distinct_id" = 'foobra' AND "posthog_persondistinctid"."team_id" = 1 AND "posthog_person"."team_id" = 1)
```
* make plugins required in the setup
* make plugins still optional in dev, but add a strict warning
* Unify text formatting
Co-authored-by: Michael Matloka <dev@twixes.com>
* private token support for github and npm
* refactor url splitting
* mypy
* fix needless regexp escapes
* simplify parse_url output, tag is always tag now
* simplify parsing api response to get latest tag
* add links to api key docs for various providers
* update title
* global _TOKEN settings for github, gitlab and npm (mainly to bump api limits)
* move gitlab api key to headers
* Support multiple groups in feature flags model
This will be part of #3007
I did not do a migration since it would cause errors for decide endpoint
once migrations have run but new schema not up.
* Update analytics_metadata method
* Allow defining multiple groups in frontend
* Allow sorting
* Update tests, allow submit without filters.
* Update cypress
* Avoid N+1 queries
* Indicate filters better in table
* upgrade typegen
* check for upgrades in the interface
* refactor plugin scene files
* separate plugins needing updates
* show an update button
* show progress when checking
* actually update plugins + ux improvements
* open drawer if new required and unfilled field
* better loading for plugins
* fix frontend type error
* fix backend test
* Do tiny cleanup of version labels
* clarify role of custom.d.ts
* cache plugin update status for 30min, refresh update status on page load if stale
* fix tests
* Fix capitalization in updates check button
* fix bad merge
Co-authored-by: Michael Matloka <dev@twixes.com>