Skip to content

fix: user scoped feature usage quota - #112

Merged
ngovinh2k2 merged 3 commits into
devfrom
fix/user-scoped-feature-usage-quota
Jul 17, 2026
Merged

ngovinh2k2 merged 3 commits into
devfrom
fix/user-scoped-feature-usage-quota

Conversation

@ngovinh2k2

Copy link
Copy Markdown
Member

What?

Why?

How?

Testing?

  • Functional Testing
  • Security
  • Performance
  • Error Handling
  • Code Quality
  • Documentation
  • Database
  • Deployment
  • Final Review

Anything Else?

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces scoped quota management by adding support for organization, user, and space scopes when reserving and releasing feature quotas. It updates BaseQuota to normalize, group, and process rules based on these scopes, and extends the console_client to pass scope information to the billing API. Feedback on these changes highlights two key issues: first, a parsing ambiguity in _normalize_rule_item where a tuple of two features can be misparsed as a single feature with a scope; second, a potential N+1 database query issue in get_scope_id when resolving space IDs, which can be optimized by caching the resolved scope IDs.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread common/apps/billing/mixins.py
Comment thread common/apps/billing/mixins.py
@ngovinh2k2
ngovinh2k2 merged commit 6397021 into dev Jul 17, 2026
1 check passed
@ngovinh2k2
ngovinh2k2 deleted the fix/user-scoped-feature-usage-quota branch August 18, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant