Skip to content

fix: allow an empty interval on a billing price - #494

Merged
rohilsurana merged 1 commit into
mainfrom
fix/billing-price-optional-interval
Jul 29, 2026
Merged

fix: allow an empty interval on a billing price#494
rohilsurana merged 1 commit into
mainfrom
fix/billing-price-optional-interval

Conversation

@rohilsurana

Copy link
Copy Markdown
Member

What

Allow an empty interval on a billing Price. The validation now ignores a zero value, matching how usage_type and billing_scheme already behave.

Why

A one-time price has no recurring interval. The billing service already creates such prices (the plan boot loader does this today), and CreatePrice only builds the recurring block when an interval is set. But the API rejected an empty interval, so a one-time price could not be created or updated through CreateProduct / UpdateProduct. This makes the API accept what the service already supports.

Relaxing a validation rule is backward compatible. buf lint, buf build, and buf breaking all pass.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 28b70d06-8e57-4aa6-91cc-9900078e708a

📥 Commits

Reviewing files that changed from the base of the PR and between 163a5a6 and ffef75c.

📒 Files selected for processing (1)
  • raystack/frontier/v1beta1/models.proto

📝 Walkthrough

Walkthrough

Updated the Price.interval protobuf validation to ignore empty values, representing one-time prices, while restricting non-empty values to day, week, month, or year. Expanded comments document the one-time pricing behavior.

Suggested reviewers: amangit07


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.

@github-actions

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Validate / validate (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedJul 29, 2026, 8:42 AM

@rohilsurana
rohilsurana marked this pull request as ready for review July 29, 2026 09:01
@rohilsurana
rohilsurana merged commit 12e40fb into main Jul 29, 2026
2 of 3 checks passed
@rohilsurana
rohilsurana deleted the fix/billing-price-optional-interval branch July 29, 2026 09:02
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