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

54 Commits

Author SHA1 Message Date
Ben White
ad54f11504
feat(cdp): Migrate action webhooks (#24326) 2024-08-15 10:46:47 +01:00
Sandy Spicer
08e0480b92
fix(exports): long running exports are failing (#22489) 2024-05-24 07:25:32 -07:00
Julian Bez
9576fab1e4
chore: Add Pyupgrade rules (#21714)
* Add Pyupgrade rules
* Set correct Python version
2024-04-25 08:22:28 +01:00
Julian Bez
a0fc086175
chore(deps): Upgrade ruff (#21648) 2024-04-19 14:19:10 +02:00
timgl
68181ad0d6
fix: Fix single property materialization command (#20798)
* fix: Fix single property materialization command

* default to 0
2024-03-28 11:04:00 +00:00
timgl
764159c457
fix: Fix materialization job (#20257) 2024-02-11 20:07:06 +00:00
timgl
5b67f3301e
fix: Fix automatically materializing columns (#20124) 2024-02-05 11:24:44 +01:00
Ben White
45c4443d05
fix: Add timeout to subscription reports (#19811) 2024-01-17 17:38:14 +01:00
Tom Owers
5513be7731
chore: upgraded Ruff linter (#18188)
* Upgraded Ruff linter

* Formatted whole codebase with new ruff rules

* Revert import removal

* Fixed mypi issues or added ignores

* Fixed schema formatting

* Fixed hogvm failing tests

* Remove duplicate key in list
2023-10-26 12:38:15 +02:00
Paul D'Ambra
8a83e3ebe9
chore: extra image export logging (#17687)
* and logging

* Fix

* one less statsd counter

* and a little more

* fix
2023-09-29 11:06:16 +00:00
Ben White
1752149b9a
feat: Remove posthog-cloud step 2 (#16067) 2023-06-15 14:03:08 +02:00
Michael Matloka
598baaf441
chore(deps): Remove obsolete django-rest-hooks requirement (#13349)
* chore(deps): Remove obsolete `django-rest-hooks` requirement

* Update snapshots

* Fix type annotations

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-12-19 10:06:21 +01:00
Marius Andra
2cbdc06e29
fix(saml): let the idp choose the auth context (#12832)
fix(saml): let the provider choose the auth method
2022-11-17 12:31:16 +01:00
Ben White
4d3c8d7c74
feat: Add pinned playlists and fix up some other features (#12694) 2022-11-10 16:37:56 +00:00
Ben White
b4a401d532
feat: Billing V2 (#11986) 2022-10-19 08:58:36 +02:00
Michael Matloka
5d2ad6c7bb
chore(deps): Update black to 22.8.0 (#11596)
* chore(deps): Update `black` to `22.8.0`

* Format
2022-09-05 14:38:54 +02:00
Michael Matloka
076f369c13
refactor: Remove obsolete Zapier hook code (#11614)
* refactor: Remove obsolete Zapier hook code

* Format code
2022-09-02 10:30:35 +00:00
Michael Matloka
af6f7f5afe
chore(demo): Give PostHog team members staff privileges in demo env (#11292)
* chore(demo): Give PostHog team members staff privileges in demo env

* Add tests

* Remove debug changes

* Update typing and add `is_staff` for existing users

* Update test

* Fix mocking and address feedback

* Debug CI

* Fix issue with tests

* Finally fix the tests

* Add comment

* Update signup.js

* Retain `attr` on email collision error
2022-08-17 10:21:28 +02:00
Eric Duong
46faa8fab2
refactor(FOSS): foss remove all ee dependencies from /posthog (#10319)
* refactor: foss move properties to /posthog

* refactor: move replication and materializtaion

* refactor: move file

* refactor: move test and journeys

* refactor: move breakdown props

* refactor: move query imports

* refactor: move more ee dependencies

* refactor: restore groupsjoinquery

* fix: errors

* refactor: no ee.clickhouse dependncies

* try import tasks

* refactor: move materialization

* refactor: change foss split for column optimizer

* run black

* fix: imports

* remove comment

* Update snapshots

* run black

* skip isort

* Update snapshots

* format

* more fixes

* refactor(FOSS): split out paths query code (#10378)

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

* refactor: split out paths query code

* refactor: more code splitting

* fix: types

* refactor(FOSS): Setup such that FOSS is deployable (#10352)

* refactor: move migrations

* refactor: move idl

* fix: move more imports

* import adjustments

* fix: test import

* fix: test import

* fix: remove restriction

* fix import

* refactor: add snapshost

* subscription-import

* fix: safe import

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 17:24:03 -04:00
Karl-Aksel Puulmann
6cac80811a
feat: delete team data from clickhouse on a cron (#10191)
* fix: dont OOM deleting large teams/organizations

Another issue plaguing team deletion was that django ORM loads all
objects for a team into memory. If a team had >200k people, that would
cause the process to fail.

We now instead delete via a single sql statement.

* Change crontab parsing logic

* Cron for deleting clickhouse data

* Delete data conditionally

* Add schedule to tasks
2022-06-14 12:24:38 +03:00
Michael Matloka
64317238e6
refactor: Eliminate the KAFKA_ENABLED setting (#10059)
* refactor: Eliminate the `KAFKA_ENABLED` setting

* Remove dead code

* Consolidate plugin server test scripts and CI

* Fix CI command

* Remove Celery queues

* Rearrange test directories

* Update import paths
2022-05-30 18:39:33 +00:00
Paolo D'Amico
72c1a159e9
feat(sso): Multitenant SAML (#9225)
* add saml attrs

* initiate SAML flow

* the bulk of the work is done

* JIT provisioning

* paygate & tests

* all tests 👌

* more tests? why not

* fix tests

* Update authentication.py

* fix migrations

* fix preflight tests

* remove additional validation, it's checked downstream anyways

* feat(sso): SAML frontend (#9262)

* proper saml redirection

* JIT not enabled error and clear error on login

* add saml available to precheck

* fix all

* allow logging in with SAML unenforced

* enable sso enforcement

* saml enforced column

* SAML config form

* full SAML configuration

* fix tests & refactor

* fix tests
2022-03-31 11:04:12 +02:00
Paolo D'Amico
125486140f
feat(sso): SSO enforcement (#9208) 2022-03-23 18:58:08 +01:00
Michael Matloka
500d4623ba
refactor: Yeet PRIMARY_DB (#9017)
* refactor: Yeet `PRIMARY_DB`

* Remove `db_backend`

* Eliminate "Analytics database in use"

* Satisfy mypy
2022-03-21 13:15:50 +01:00
Paolo D'Amico
36ed41f7c0
feat(sso): enforce SSO on self-hosted instances (#9002) 2022-03-16 14:46:49 +01:00
Paolo D'Amico
655c1ce9a4
refactor(enteprise): Removes conditional SAML dependencies (#8952) 2022-03-10 07:14:30 -06:00
Guido Iaquinti
96b3cd6eb7
Boolean should be compared with is/is not (#8651) 2022-02-17 10:31:54 +01:00
James Greenhill
2440f945f1
Use a helper to get env var for saml (#7744) 2021-12-15 21:45:51 -06:00
James Greenhill
ab0c75414b
Make settings dynamic for MATERIALIZED_COLUMNS_ENABLED (#7662)
* Make settings dynamic for MATERIALIZED_COLUMNS_ENABLED

* migrate MATERIALIZED_COLUMNS_ENABLED to this and test

* allow tests that use materialized columns to hit django model for settings

* nicer installed apps config

* update snapshot from test

* make test_property more deterministic

Co-authored-by: James Greenhill <fuzionech@gmail.com>
Co-authored-by: yakkomajuri <yakko.majuri@gmail.com>
2021-12-14 17:56:08 -08:00
Karl-Aksel Puulmann
55bf75a40a
Make KAFKA_EVENTS_PLUGIN_INGESTION_TOPIC configurable (#7349)
This is for razorpay - they're planning to hook into this with spark
2021-11-25 11:47:20 +01:00
James Greenhill
0c77788e46
Fix EnvVar for MATERIALIZED_COLUMNS_ENABLED (#6503) 2021-10-17 16:42:37 +00:00
James Greenhill
507015b95e
Add Env var switch for Materialized Columns (#6498)
* Add Env var switch for Materialized Columns

* Disable Mat Cols for now

* false -> 0
2021-10-17 07:49:45 -07:00
Paolo D'Amico
cf9814c08f
SAML deps build (#5932) 2021-09-14 11:43:26 +02:00
Paolo D'Amico
ef7ec14014
Conditional SAML dependencies (fix Heroku deploys) (#5870) 2021-09-09 14:09:15 +00:00
Michael Matloka
f36c5f40b7
Rename RDBMS to AnalyticsDBMS (#5857) 2021-09-08 16:16:47 +02:00
Karl-Aksel Puulmann
17836f80f5
Add command for materializing columns (#5816)
* Add command for materializing columns

Expecting this to get used in both dev as well as when improving
upstream installations

* No clashes in tests

* Solve for feedback

* Comments for clarity
2021-09-07 07:56:29 +00:00
Karl-Aksel Puulmann
0df87579ab
Add more materialized column settings (#5806) 2021-09-04 18:07:20 +03:00
Paolo D'Amico
bcf9837e38
SAML - frontend & enforce (#5758) 2021-08-27 09:37:30 -07:00
Paolo D'Amico
627d493817
SAML support (#5681) 2021-08-27 07:20:49 -07:00
Karl-Aksel Puulmann
10a26d3e17
Automatically create materialized properties (#5744)
* Avoid naming collisions when materializing columns

1. Prefix person properties differently. Mixing them up can break
ambigious column issues
2. When name already exists, suffix with random junk :)

* Implement analyze.py

* Add `suggested_columns_to_materialize`

* Add code to backfill a materialized column

* Add tests for backfilling data

* Cleanup

* Add tests for analyze

* WIP: Crontab for materializing columns

* Nooped task for materializing properties

* Use mutations_sync=0 for column tests

* Add comment
2021-08-26 18:48:57 +03:00
Paolo D'Amico
4afe5999bb
Auth updates & fix login as (#5670) 2021-08-20 10:01:33 -07:00
Karl-Aksel Puulmann
a860da9e90
Dynamic materialized columns (#5458)
* Add migration marking existing columns as materialized with a comment

* Add method to allow looking up materialized columns

* Add test for fetching and creating materialized columns

* Disable caching in tests

* Remove some callsites to CLICKHOUSE_DENORMALIZED_PROPERTIES

* Fixup caching logic

* Add (currently broken) test for denormalizing person properties

* Update funnel event query to work with new functionality

* Update other tests/queries

* Remove now-unused setting
2021-08-09 10:11:36 +03:00
Tim Glaser
543d567c5b
Fix denormalised props funnels (#5101)
* Fix denormalised props funnels

* fix settings

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2021-07-13 13:13:45 +00:00
Michael Matloka
3c0737f0fd
Plugins access control (#3486)
* Add Organization.PluginsAccess

* Rename PluginsAccess to PluginsAccessLevel

* Use Organization.plugins_access_level in can_…_plugins_via_api

* Add migration for Organization.plugins_access_level

* Remove unused PLUGINS_CLOUD_WHITELISTED_ORG_IDS

* Update access.py

* Add OrganizationPluginsAccessLevel TS enum

* Fix merge

* Disable LocalPlugin UI on Cloud

* Move away from PluginAccess interface

* Extend PluginsAccessLevel range

* Refactor PluginsAccessLevel for brevity

* Remove PluginAccess interface completely

* Add plugins managed globally

* Update migration

* Show managing org name in "Managed" plugin tag

* Smoothen some rough edges

* Smoothen more edges

* Restore correct MULTI_TENANCY default

* All the edges

* Fix most existing tests

* Remove PLUGINS_*_VIA_API env var support

* Update pluginsNeedingUpdates

* Remove can_*_plugins_via_api from instance status page

* Add tests and polish permissioning

* Update migration

* Fix typing

* Make plugin drawer UI less intrusive

* Update migration

* Fix Uninstall button condition

* Use unified _preflight status endpoint instead of the custom plugins one

* Fix plugin update label condition

* Fix "Check for updates" button condition

* Explain PluginsAccessLevel choices with comments

* Hide global plugin installation option on self-hosted

* Don't actions.loadRepository() as install org

* Improve permissioning with tests

* Satisfy mypy

* Add plugins access level to admin and fix org admin

* Check plugins access level more

* Rename endWithPeriod

* Refactor FE access control checks to accessControl.ts

* Deduplicate permissioning

* Add exception message

* Align backend and frontend plugins access level helpers

* Add plugins access level helper tests

* Fix ChartFilter
2021-03-17 15:01:55 +01:00
Michael Matloka
1f3145128c
Enable PLUGIN_SERVER_INGESTION (#3107)
* Enable PLUGIN_SERVER_INGESTION_HANDOFF = get_bool_from_env("PLUGIN_SERVER_INGESTION_HANDOFF

* Don't set PLUGIN_SERVER_INGESTION_HANDOFF in worker

* Add comments

* Remove _HANDOFF from PLUGIN_SERVER_INGESTION

* add stats counter for plugin server handoff, so we can verify events out and events in

* add whitelisted posthog and kea organizations

* disable ingestion this round --> first let's just check the plugin server can talk to kafka & clickhouse before sending real events to it

* enable ingestion in docker-compose.ch.yml

* eliminate bad merge

* async action event matching when using postgres plugin server ingestion (#3182)

* fix org

* remove _HANDOFF from topic

* add plugin_ to plugin server ingestion topic

* update plugin server to 0.7.0

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2021-02-04 16:17:24 +01:00
Michael Matloka
bd3b1ef0d5
Clean up EE settings.py and fix Google auth whitelisted domains (#3159) 2021-02-02 16:03:01 +01:00
James Greenhill
583d4cdd26
Add whitelists for domains on Google OAuth (#3098) 2021-01-26 17:44:44 -08:00
Tim Glaser
02044c616f
Denormalize clickhouse props (#2903)
* Denormalize clickhouse props

* Add allow_denormalized_props option

* Use funnels

* fix funnel query

* Add more denormalized props

* Fix comma

* Use materialized columns instead of mat views

* duplicate ,'s

Co-authored-by: James Greenhill <fuziontech@gmail.com>
2021-01-20 12:38:27 +01:00
Michael Matloka
259e801de6
Whitelist plugins per organization on Cloud (#2791)
* Fix unix-dgram build

* Add per-organization whitelisting of plugins API on Cloud

* Add migration

* Update can_install_plugins_via_api calls in serializer

* Remove unused type: ignore

* Update PluginSerializer for organization_id

* Make Plugin.organization nullable

* Fix can_install_plugins_via_api

* Update pluginsLogic.ts

* Adjust can_configure_plugins_via_api for organization

* Don't include organization_id in serializer

* Set default Plugin.organization to first Organization in instance

* Fix PluginConfigSerializer.create

* Test that other orgs' plugins can't be accessed (as if they didn't exist, 404)

* fix typo

Co-authored-by: Marius Andra <marius.andra@gmail.com>
2020-12-16 14:54:30 +01:00
Michael Matloka
1c80aca907
Cleaned up system status page (#2682)
* Polish system status page

* Show system health badge to is_staff users on Cloud

* Update Cypress test

* Correct inconsistent scene name

* Use RDBMS enum instead of constants

* Add "Analytics database in use" to System Status

* Fix typing
2020-12-09 13:57:12 +01:00