0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 18:07:17 +01:00
Commit Graph

90 Commits

Author SHA1 Message Date
Ben White
d25ecd29d7
fix: Moved usage report out of ee (#12414) 2022-10-25 12:56:20 +02:00
Ben White
70f47510ab
fix: Usage report persons query (#12408) 2022-10-24 18:30:20 +00:00
Ben White
4b7f04b026
feat: Added backup option for billing service reporting (#12405) 2022-10-24 16:38:40 +00:00
Ben White
77d7efc500
fix: Schedule usage reports as individual tasks (#12398) 2022-10-24 17:08:51 +02:00
Karl-Aksel Puulmann
441e1e376b
chore(ci): Fix master branch tests (#12399)
* fix test_usage_report tests

buggy tests shipped in https://github.com/PostHog/posthog/pull/12383

* Ignore problematic lines
2022-10-24 14:33:33 +03:00
Ben White
0fdd5363a2
fix: Usage reporting format (#12383) 2022-10-21 19:13:02 +02:00
Ben White
683a4aab1a
fix: Check for active subscription to determine billing version (#12330) 2022-10-19 10:28:26 +00:00
Ben White
b4a401d532
feat: Billing V2 (#11986) 2022-10-19 08:58:36 +02:00
Paul D'Ambra
b5f07ae0ad
feat: add text cards to DB (#12110)
Problem
Stacked on top of #12067 so the commit history is weird :/

Changes
adds DB wiring to add text or insights to dashboard tiles

How did you test this code?
developer tests and running the site locally

 move insight to dashboard
 duplicate insight from insight view
 duplicate insight from card list view
 duplicate insight from list view
 duplicate insight from dashboard
 remove insight from dashboard
 add insight to dashboard
 delete dashboard
 duplicate dashboard
 set card color
🤔 set card layout - updating layout starts refresh loop for dashboards
I think these changes make it more obvious but this is the case in master too. -> It's fixed (or at least worked-around) in #12132
 update insight data updates dashboard view for that data
 rename insight from dashboard
2022-10-10 11:49:33 +01:00
Guido Iaquinti
fa7c706af8
style(flake8): enable E402 (#11707) 2022-09-07 16:11:55 +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
Eric Duong
92ddf4072b
feat: materialize person and groups on events (#11363) 2022-08-30 12:31:32 +01:00
Ben White
5e594486a6
fix: Increased subscription asset gen to 10 minutes (#11543) 2022-08-30 08:54:43 +00:00
Rick Marron
771db55f39
chore(recordings): add recording counts to status report (#11401)
* chore(recordings): add recording counts to status report

* remove recordings_count_total
2022-08-22 08:10:02 -07:00
Michael Matloka
efa6d30723
style: Fix Python formatting issue (#11397) 2022-08-19 15:32:26 +00:00
Ben White
6cd5628562
fix: Don't export Insights that are deleted (#11375) 2022-08-19 07:49:23 +00:00
timgl
d51416afd3
feat(licensing): Automatically renew licenses (#10737) 2022-07-15 09:29:14 +01:00
Ben White
c835a30ee0
fix: Export issues (#10625)
* Add retries to image exporting
* Tried to remove shm usage for higher reliability
* Fixed next_delivery_date to only be reset if the rrule changes
2022-07-04 14:52:50 +00:00
Ben White
dbf3b5264d
fix: Slack unfurl alternative args (#10610) 2022-07-01 15:48:51 +00:00
Ben White
2390759d48
fix: Slack event timestamp (#10605)
* fix: Slack event timestamp
2022-07-01 14:32:39 +00:00
Ben White
fdbf1580f4
feat: Added Slack link unfurling (#10587)
* Added slack signature validation

Co-authored-by: Paul D'Ambra <paul@posthog.com>
2022-07-01 12:07:15 +02:00
Paul D'Ambra
18c5927f57
fix: celery autoimport was ignoring CSV exports (#10586)
* launch celery with debug logging

* autoimport a single task which decides what type of export to run

* still need to manually inject root folder so tests can clear up

* fix mock
2022-06-30 17:42:28 +01:00
Paul D'Ambra
c8dd7b0244
feat: export lists of events to CSV (backend only) (#10510)
* sketch the interaction

* correct field type

* explode a filter to steps of day length

* write to object storage maybe

* very shonky storing of gzipped files

* doesn't need an export type

* mark export type choices as deprecated

* order methods

* stage to temporary file

* can manually export the uncompressed content

* shonkily export as a csv

* wip

* with test for requesting the export

* with polling test for the API

* put existing broken CSV download back before implementing UI change

* open api change

* even more waffle

* less passive waffle

* sometimes less specific is more correct

* refactor looping

* okay snapshots

* remove unused exception variable

* fix mocks

* Update snapshots

* Update snapshots

* lift storage location to the exported asset model

* split the export tasks

* improve the temp file usage in csv exporter

* delete the test files we're creating

* add a commit to try and trigger github actions

Co-authored-by: pauldambra <pauldambra@users.noreply.github.com>
2022-06-28 20:05:37 +02:00
Ben White
d044b729b2
fix: Individual exporting of dashboard insight to use correct config (#10524)
* fix: Individual exporting of dashboard insight to use correct config
2022-06-28 14:54:18 +00:00
Eric Duong
bf81161e7f
refactor: Fix periodic tasks (#10491)
* Revert "fix: Fix ee celery tasks (#10481)"

This reverts commit 5b3fbbd57b.

* chore: empty

* fix: move ee tasks to celery.py

* chore: empty

* remove file

* remove init
2022-06-24 13:52:32 -04:00
Eric Duong
8c6923a0e0
fix: Revert "fix: Fix ee celery tasks" (#10487)
* Revert "fix: Fix ee celery tasks (#10481)"

This reverts commit 5b3fbbd57b.

* chore: empty
2022-06-24 15:58:37 +00:00
Ben White
5b3fbbd57b
fix: Fix ee celery tasks (#10481)
* fix: Fix ee celery tasks
2022-06-24 17:03:26 +02:00
Ben White
925a54b5ad
feat: Slack Invite message (#10478)
* feat: Slack Subscription Invites
2022-06-24 15:18:34 +02:00
Ben White
1484b846ce
feat(subscriptions): Add Slack Subscriptions (#10388)
* Added slack configuration options
* Added slack selection UI
2022-06-24 10:29:45 +02:00
Eric Duong
cb485164f7
refactor(foss): materialize and celery (#10434)
* 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

* refactor: new file

* fix: remove unused

* use app object import

* Update snapshots

* ensure same app is used

* use decorator

* remove file

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-23 20:17:39 -04: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
Ben White
aafcbf0b4d
fix: Moved most subscriptions code to EE (#10411)
* fix: Moved most subscriptions code to EE
* Fixed Storybook for Subscriptions
2022-06-22 14:26:13 +02:00
Eric Duong
ce7988ecfa
refactor: move prop value and actorbasequery files (#10258)
* Revert "fix: revert "move prop value and actorbasequery files" due to flaky test (#10257)"

This reverts commit ac1a485cdf.

* chore: empty
2022-06-13 16:24:14 -04:00
Eric Duong
ac1a485cdf
fix: revert "move prop value and actorbasequery files" due to flaky test (#10257)
* Revert "refactor: move prop value and actorbasequery files (#10220)"

This reverts commit 12bf3a7c3e.

* chore: empty
2022-06-10 23:49:53 +00:00
Eric Duong
12bf3a7c3e
refactor: move prop value and actorbasequery files (#10220)
* refactor: move prop value and actorbasequery files

* refactor: move test base

* fix: imports

* move middleware

* refactor: move cohort model util (#10224)
2022-06-10 18:44:50 -04:00
Eric Duong
4c3e713177
refactor: move persons util (#10079)
* refactor: move persons /clickhouse to /posthog

* remove leak

* fix: patch

* move import

* remove imports
2022-06-01 16:26:11 -04:00
Yakko Majuri
801c2a5f7e
feat(persons-on-events): add groups and persons columns to events schema (#9510)
* feat(persons-on-events): add persons and group cols to events

* snapshots

* Update ee/clickhouse/models/cohort.py

* update snapshots

* update kafka settings

* final modification to prevent temporary errors

Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
2022-04-29 11:31:32 +00:00
Tim Glaser
5887bd2143
test: Speed up backend tests (#9289)
* Durations

* patch sleep

* BULK

* SPEED UP EVERYTHING

* fiiix

* more tests

* morrr

* fix test

* Don't create demo data every time

* fix

* fix

* Affix

* fix

* fix

* fix

* fix

* fix

* More speed

* fix
2022-04-27 13:38:39 +01:00
Yakko Majuri
c7d373364e
Revert "feat(persons-on-events): add required person and group columns to events table (#9251)" (#9406)
This reverts commit 3d71ad07cf.
2022-04-13 11:35:19 +00:00
Yakko Majuri
3d71ad07cf
feat(persons-on-events): add required person and group columns to events table (#9251)
* refactor(ingestion): establish setup for json consumption from kafka into clickhouse [nuke protobuf pt. 1]

* address review

* fix kafka table name across the board

* Update posthog/async_migrations/test/test_0004_replicated_schema.py

* run checks

* feat(persons-on-events): add required person and group columns to events table

* rename

* update snapshots

* address review

* Revert "update snapshots"

This reverts commit 63d7126e08.

* address review

* update snapshots

* update more snapshots

* use runpython

* update schemas

* update more queries

* some improvements :D

* fix naming

* fix breakdown prop name

* update snapshot

* fix naming

* fix ambiguous test

* fix queries'

* last bits

* fix typo to retrigger tests

* also handle kafka and mv tables in migration

* update snapshots

* drop tables if exists

Co-authored-by: eric <eeoneric@gmail.com>
2022-04-13 10:48:07 +00:00
Eric Duong
5eb98ef624
refactor: move event and person query to /posthog (#8970)
* refactor: move event and person query to /posthog

* move imports

* another import

* refactor: move actions

* refactor: move actions

* enterprise

* trigger tests

* test

* make dummy
2022-03-22 20:27:11 +00:00
Karl-Aksel Puulmann
c3649f91c9
feat(sharding): Remove CLICKHOUSE_REPLICATION (#9013)
* Check async migrations instead of CLICKHOUSE_REPLICATION for mat columns

* Update a comment

* Default for CLICKHOUSE_REPLICATION

* add replication file

* Assert is replicated in tests

* Remove DROP TABLE query from cohortpeople migration

* Update snapshots

* Ignore migration in typechecker

* Truncate right table

* Add KAFKA_COLUMNS to distributed tables
2022-03-16 10:27:39 +02:00
Guido Iaquinti
0ef7f6a493
ci(flake8): enable unused import check (#8714) 2022-03-08 09:53:54 +01:00
Karl-Aksel Puulmann
8e55d324d9
fix(sharding): Fix tests that would fail with CLICKHOUSE_REPLICATION (#8805)
* Make CLICKHOUSE_REPLICATION default to True

* Update some insert statements

* Create distributed tables during tests

* Delete from sharded_events

* Update test_migrations_not_required.py

* Improve 0002_events_sample_by is_required

1. SHOW CREATE TABLE is truncated if table has tens of materialized
columns, reasonably causing failures
2. We need to handle CLICKHOUSE_REPLICATED setups

* Update test_schema to handle CLICKHOUSE_REPLICATED, better test naming

* Fix issue with materialized columns

Note: Should make sure that these tests have coverage both ways

* Update test for recordings TTL

* Reorder table creation

* Correct schema for materialized columns on distributed tables

* Do correct setup in test_columns

* Lazily decide table to delete data from

* Make test_columns resilient to CLICKHOUSE_REPLICATION

* Make inserts resilient to CLICKHOUSE_REPLICATION

* Reset CLICKHOUSE_REPLICATION

* Create distributed tables conditionally

* Update snapshots, tests

* Fixup conftest
2022-03-07 13:51:38 +02:00
Karl-Aksel Puulmann
6cd14b712f
Quote ON CLUSTER statements (#8830)
Valid clickhouse clusters may contain dashes, which would cause syntax
errors without quoting
2022-03-03 13:29:39 +02:00
Michael Matloka
d7067544ad
Fix is_active being unused when querying User (#8793)
* Fix `is_active` being unused when querying `User`

* Simplify a `.filter()`

* Update test_feature_flag.ambr

* Remove `User.is_active` filter from `get_overridden_feature_flags`

* Fix exclude in `OrganizationMemberViewSet` queryset

* Revert snapshot update

* Update test_organization_members.py
2022-03-02 14:27:08 +00:00
Guido Iaquinti
b17cb3de0a
len(queryset) -> queryset.count() (#8650) 2022-02-17 12:38:34 +01:00
Karl-Aksel Puulmann
9929161e35
Delete old events-model adjacent code (#8623)
* Remove event admin

* Move posthog/tasks/test/test_org_usage_report.py clickhouse version inline

* Remove postgres-specific code from org usage report

* Kill dead on_perform method

* Remove dead EventSerializer

* Remove a dead import

* Remove a dead command

* Clean up test, dont create a model

* Remove dead code

* Clean up test_element

* Clean up test event code

* Remove a dead function

* Clean up dead imports

* Remove dead code

* Code style cleanup

* Fix foss test

* Simplify fn

* Org usage fixup #3
2022-02-16 15:15:46 +02:00
Eric Duong
e4f65b1790
8356 versioning (#8449)
* version insights

* version and lock update

* make sure all tests work

* restore exception

* fix test

* fix test

* add specific id

* update plugin server test utils

* cleanup

* match filtering

* use timestamp comparison

* make tests work

* one more test field

* fix more tests

* more cleanup

* lock frontend when updating and restore refresh

* pass undefined

* add timestamp to background update

* use incrementer

* add field

* snapshot

* types

* more cleanup

* update tests

* remove crumbs

* use expressions

* make nullable

* batch delete

* fill null for static cohorts

* batch_delete

* typing

* remove queryset function
2022-02-09 12:19:00 -05:00
Eric Duong
6b6de16826
fix(cohorts): don't substitute params (#8124)
* don't substitute

* add test
2022-01-19 09:28:44 -05:00