feat: added scale up extra seat addon handling#7382
Conversation
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
for more information, see https://pre-commit.ci
Docker builds report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7382 +/- ##
=======================================
Coverage 98.44% 98.44%
=======================================
Files 1398 1398
Lines 52628 52646 +18
=======================================
+ Hits 51808 51826 +18
Misses 820 820 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Visual Regression16 screenshots compared. See report for details. |
khvn26
left a comment
There was a problem hiding this comment.
Approved with 2 non-blocking comments.
| audit_log.info( | ||
| "seat.added", | ||
| subscription__id=subscription_id, |
There was a problem hiding this comment.
Can we add organisation__id here?
There was a problem hiding this comment.
Ah thank you!!! I hesitated as it needs to update the callsite to pass it but i'm up for it!!
There was a problem hiding this comment.
Do we really need it? I think we can grab organisation_id from the subscription cache object?
There was a problem hiding this comment.
I updated the caller, it's already available and avoids an extra DB call (even if it's not a frequent operation) and a circular import. Lmk
f0526a8
| ) | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
| audit_log = structlog.get_logger("billing") |
There was a problem hiding this comment.
nit: Let's not confuse with actual audit log — log is fine here.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Closes #121
Scale-Up-v4Chargebee addonAdditional-Team-Members-Scale-Up-v4for auto-seat-upgradenormalise_plan_idintoSubscriptionPlanFamilyto re-use plan_id normalisationchargebee/constants.pyand add structured logging on successful seat additionHow did you test this code?