Skip to content

feat(billing): Remove AUTO_SEAT_UPGRADE_PLANS setting#5343

Merged
khvn26 merged 3 commits into
mainfrom
fix/remove-configurable-auto-seat-upgrade-plans
Apr 18, 2025
Merged

feat(billing): Remove AUTO_SEAT_UPGRADE_PLANS setting#5343
khvn26 merged 3 commits into
mainfrom
fix/remove-configurable-auto-seat-upgrade-plans

Conversation

@khvn26
Copy link
Copy Markdown
Member

@khvn26 khvn26 commented Apr 16, 2025

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

In this PR, we remove the AUTO_SEAT_UPGRADE_PLANS setting in favour of centralised SubscriptionPlanFamily.get_by_plan_id logic.

How did you test this code?

Made sure all relevant unit tests pass without the setting present.

@khvn26 khvn26 requested a review from a team as a code owner April 16, 2025 09:36
@khvn26 khvn26 requested review from emyller and removed request for a team April 16, 2025 09:36
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Apr 17, 2025 8:45pm
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Apr 17, 2025 8:45pm
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Apr 17, 2025 8:45pm

@github-actions github-actions Bot added api Issue related to the REST API infrastructure feature New feature or request and removed infrastructure labels Apr 16, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2025

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-5343 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-5343 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-5343 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-5343 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-5343 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-5343 Finished ✅ Results

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2025

Uffizzi Preview deployment-62832 was deleted.

Comment thread api/organisations/models.py Outdated
@khvn26 khvn26 force-pushed the fix/remove-configurable-auto-seat-upgrade-plans branch from e78d116 to aa39204 Compare April 17, 2025 20:07
@github-actions github-actions Bot added infrastructure feature New feature or request and removed feature New feature or request infrastructure labels Apr 17, 2025
@khvn26 khvn26 force-pushed the fix/remove-configurable-auto-seat-upgrade-plans branch from d5393d8 to 1271758 Compare April 17, 2025 20:45
@github-actions github-actions Bot added infrastructure feature New feature or request and removed feature New feature or request infrastructure labels Apr 17, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.61%. Comparing base (c7584d7) to head (1271758).
Report is 11 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5343   +/-   ##
=======================================
  Coverage   97.61%   97.61%           
=======================================
  Files        1237     1237           
  Lines       42918    42968   +50     
=======================================
+ Hits        41894    41945   +51     
+ Misses       1024     1023    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

return self.plan in settings.AUTO_SEAT_UPGRADE_PLANS
return (
is_saas()
and self.subscription_plan_family == SubscriptionPlanFamily.SCALE_UP
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So i'm seeing

class SubscriptionPlanFamily(Enum):
    FREE = "FREE"
    START_UP = "START_UP"
    SCALE_UP = "SCALE_UP"
    ENTERPRISE = "ENTERPRISE"

But I don't see the plan on the pricing page. Is it a custom in between start-up and enterprise?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good question 👍 Our plan lineup has been revised to exclude scale-up for new customers, but we still support existing scale-up users.

Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 left a comment

Choose a reason for hiding this comment

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

The tests seem to cover the different cases. If I summarize how we do now:
If subscription is scale-up-xx
Organisation don't have fixed user limits but when adding a new one:

  • We charge the seat
  • if payment fails => failure and user can't join
  • otherwise +1 user ?

Could you let me know when it's on staging to use it to start manipulating chargebee 👍 ?

@khvn26 khvn26 merged commit de92415 into main Apr 18, 2025
37 checks passed
@khvn26 khvn26 deleted the fix/remove-configurable-auto-seat-upgrade-plans branch April 18, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants