Skip to content

fix: track monthly usage for unlimited quotas - #2894

Merged
dguyen merged 2 commits into
mainfrom
fix/track-monthly-usage
May 31, 2026
Merged

dguyen merged 2 commits into
mainfrom
fix/track-monthly-usage

Conversation

@dguyen

@dguyen dguyen commented May 31, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 31, 2026 01:30
@vercel

vercel Bot commented May 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
prd-docs Ignored Ignored May 31, 2026 3:05am
prd-openpage-api Ignored Ignored May 31, 2026 3:05am
stg-docs Skipped Skipped May 31, 2026 3:05am

Request Review

@coderabbitai

coderabbitai Bot commented May 31, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5c9164c5-0714-42d9-ad77-b0e2af50850f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/track-monthly-usage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

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.

Pull request overview

This PR changes monthly quota tracking so organisations with unlimited (null) quotas still accumulate monthly usage stats while continuing to allow requests.

Changes:

  • Removes the early return before monthly stat writes for null quotas.
  • Keeps quota === 0 as a hard block before incrementing.
  • Returns after incrementing for unlimited quotas, before over-quota notification logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

});

// For unlimited quotas, we still allow the request to send so we can collect the monthly stat.
if (opts.quota === null) {
@vercel
vercel Bot temporarily deployed to Preview – stg-docs May 31, 2026 03:05 Inactive
@github-actions github-actions Bot added the 🚨 e2e changes 🚨 Be advised: PR changes E2E tests - Auto-Generated by GitHub Actions on raising a PR label May 31, 2026
@dguyen
dguyen merged commit 44c4826 into main May 31, 2026
8 of 9 checks passed
@dguyen
dguyen deleted the fix/track-monthly-usage branch May 31, 2026 03:34

This branch was previously deployed

1 inactive deployment
Preview – stg-docs — b18c78d1 Deployed May 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚨 e2e changes 🚨 Be advised: PR changes E2E tests - Auto-Generated by GitHub Actions on raising a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants