* Use ruff formatter
Ruff is now also a formatter! And it runs in a fraction of a second
across our whole codebase vs "I waited more than 30s and cancelled it
because I got bored".
* Config and command -> ruff
* Run 'ruff format .'
* Update query snapshots
* Run 'ruff format .'
* Fix format after commit hook
* Update query snapshots
* Fix type error - ignore comment moved
* Exclude hogql grammar from formatting and reverted grammar
* Run format
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tom Owers <tom@paace.co>
* feat: copy to LTS via Mr Blobby
* Update query snapshots
* fix tests
* Apply suggestions from code review
* sentry message when loading unexpected storage version
* read from either s3 location
* add a test that shows we can fallback to LTS loading
* Update query snapshots
* use the same prefix format for blob storage
* fix test
* Update query snapshots
* fix
* Update query snapshots
* Update query snapshots
* with brain
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Today it annoyed me I could verify an event but not a property
Changes
Adds property definition verification, which was mostly copy-pasta from existing code
* initial role and role memberships setup
* create role when org is created and role memberships when user joins
* wip for merge
* fix api tests for role
* nest roles under organization route and test fixes
* remove pdb set trace
* fix types
* remove creating default roles and role memberships for orgs and users
* add permission levels to orgs and roles
* bulk create role memberships
* leave role membership as individual api request, handle bulk creation on the frontend instead
* feature flag role access wip and migrations
* fix flag role access tests
* linter
* isort
* temp type ignore
* add access level to plugin tests
* test remove test migration safe
* test license import error fix
* delete old? org license test
* nvm we need these tests
* type ignore
* reset license plans after test
* add organization resource access model and remove access level field from regular organizations
* feat: permission return on feature flag (#12826)
* suggested permission return
* change naming
* add changes
* pass bool
* fix plugin tests
* organization resource access tests and fixes
* update can edit return with new org resource access model from feature flag
* fix tests
* add permissions to feature flag for editing
* more tests
* remove unnecessary spacing
* fix test
* add context for feature flag serializer tests
* add back workflow test step
* add organization to feature flag role access
* fix(spike): why are tests failing (#12858)
* was it because invalid id is provided?
* allow django to touch the db
* a less unexpected way of allowing access to the DB
* Revert "add organization to feature flag role access"
This reverts commit ef18b0ec8b.
* address feedback and include organization safety checks in tests
* test error fix
* test role dupe name per org
* remove third access level option
* fix migration for it
* more tests
* fix test
* feat: role based permissions UI (#12776)
* add api
* starter
* role and member creation + deletion
* working with all deletes
* add block
* working roles
* permissions tab on org settings
* org default setting
* types
* flag role assignment
* working per flag permission
* working with admin block
* types
* use restricted area component
* wrap flag resource access in different url
* restore migrations manifest
* update url endpoints
* pay gate mini org role settings
* remove view and custom edit and remove resource access creation on org creation
* add feature flag
* address feedback
* fix backend tests
* remove broken permissions setting on new feature flags
* export logic props interface
Co-authored-by: Li Yi Yu <li@posthog.com>
* type fixes
Co-authored-by: Eric Duong <eeoneric@gmail.com>
Co-authored-by: Paul D'Ambra <paul@posthog.com>
* Add new app_metrics feature available on scale and enterprise
* chore(ingestion): cache available_features for a longer period in OrganizationManager
This will come in handy for app metrics and is generally a performance win
* Add service to track app metrics
* refactor(historical-exports): Move retry limit handling code to same place as other error handling
* Track app metrics in processEvent/onEvent/exportEvents and historical exports
* Add mising app-metrics file
* Add missing __init__.py module
* Use correct topic + columns for app metrics
* Add a placeholder schema
* Set timestamp correctly
* Fix a typeerror in organization-manager.ts
* Schema fixup
* Add test showing read-own-writes logic
* Remove unneeded TODO
* Add missing constant
* Simplify flushing logic
* Stabilize VM tests
* Use correct sharding key
* Revert hooks changes
* Remove onAction
* Avoid fetching actions that dont deal with REST - 99% reduction
* Plural hooks
* Avoid hook fetching where not needed
* Remove dead code
* Update lazy VM test
* Rename a function
* Update README
* Explicit reload actions in tests
* Only reload actions which are relevant for plugin server
* Remove excessive logging
* Reload actions when hooks are updated
* update action matching tests
* Remove commented code
* Solve naming issues
* Slightly clean up `License` model code
* Fix `relevantLicense` and type license API requests
* Create licenseLogic.test.ts
* Update comments
* Clarify test licenses with comments
* Fix typing
* fix(licensing): Use most recently activated license instead of least
* Ignore mypy
* Sort in Python instead of DB
* Fix import paths
* Update `first_valid` comment
* Use LemonSelect for Template
* Add mini pay gate for dashboard permissions
* Use "advanced permissioning" instead of "collaboration features"
* Rename "Collaboration restrictions" to "Collaboration settings"
* 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>
* Add group analytics to list of paid features
* Add team-level property for if any group types exist
* WIP: Groups introduction page
* Finish initial empty state page
* Hide upsell if not CH or flag not live
* Extract upsell-related logic into a separate logic to avoid loading data unless needed
* Extract upgradeLink
* Extract announcement logic
* Overcomplicate announcements
* Show initial groups announcement.
* Vary banner content according to groups access status
* Clean up access logic
* Misc announcements improvement
* Add a feature flag for groups announcement given docs are not yet ready
* Keep color for visited button links
* Get groupsList logic tests working
teamLogic <-> userLogic test connection needed to be severed alongside
this