8000 chore: remove legacy plan info by zlwaterfield · Pull Request #33833 · PostHog/posthog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: remove legacy plan info #33833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zlwaterfield
Copy link
Contributor
@zlwaterfield zlwaterfield commented Jun 18, 2025

Important

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Changes

This is all legacy and causing some confusion so looking to remove it. Given we don't use licenses in cloud except for the one to request to billing this won't affect cloud.

I still need to test it on self hosting before merging.

Did you write or update any docs for this change?

How did you test this code?

@zlwaterfield zlwaterfield self-assigned this Jun 18, 2025
Copy link
Contributor
@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Major cleanup removing legacy plan and billing v1 code across the codebase, eliminating outdated feature synchronization mechanisms and license-based plan management.

  • Removed License model's plan constants (SCALE_PLAN, ENTERPRISE_PLAN) and feature lists in ee/models/license.py, shifting away from license-based feature management
  • Eliminated all sync_all_organization_available_product_features related code, including the Django command, scheduled task, and app startup call
  • Removed _billing_plan_details property and update_available_product_features method from Organization model, suggesting migration to modern billing service
  • Cleaned up task imports and definitions in multiple files (tasks.py, scheduled.py, __init__.py), removing legacy billing v1 code

8 files reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

Comment on lines 217 to 219
if instance._state.adding:
instance.update_available_product_features()
if not is_cloud():
instance.plugins_access_level = Organization.PluginsAccessLevel.ROOT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: This function could be simplified to a single line since we're now only checking cloud status: if instance._state.adding and not is_cloud(): instance.plugins_access_level = Organization.PluginsAccessLevel.ROOT

Suggested change
if instance._state.adding:
instance.update_available_product_features()
if not is_cloud():
instance.plugins_access_level = Organization.PluginsAccessLevel.ROOT
if instance._state.adding and not is_cloud():
instance.plugins_access_level = Organization.PluginsAccessLevel.ROOT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
473B
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0