Skip to content

chore!: remove plan_id from frontier ProductRequestBody - #495

Merged
rohilsurana merged 1 commit into
mainfrom
chore/drop-plan-id-from-product-request-body
Jul 30, 2026
Merged

chore!: remove plan_id from frontier ProductRequestBody#495
rohilsurana merged 1 commit into
mainfrom
chore/drop-plan-id-from-product-request-body

Conversation

@rohilsurana

Copy link
Copy Markdown
Member

What

Remove plan_id from ProductRequestBody and reserve the field number (4) and the name, so it cannot be reused with a different meaning.

ProductRequestBody is shared by CreateProduct and UpdateProduct.

Why

Nothing links a product to a plan through this field in practice. Frontier links products to plans from the plan side: UpsertPlans creates the product and then calls AddPlan, after checking the product has an active price at the plan's interval.

The request-body plan_id was a way around that check. Creating a product with a plan_id writes the link straight to the database and skips the matching-price check, so you could link a product to a plan that has no valid price for its interval. UpdateProduct already ignored the field.

Removing it makes plan membership owned solely by the plan side, and drops a dead field from UpdateProduct at the same time.

Breaking change

This removes a public field. The number and name are reserved so the wire and JSON stay safe. Frontier's handler is updated to stop reading it in a matching PR.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e39fdbaa-8035-425b-ab18-5b8a476e2207

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:

  • ✅ Review completed - (🔄 Check again to review again)

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 30, 2026, 8:29 AM

@rohilsurana
rohilsurana merged commit 91eaffc into main Jul 30, 2026
3 checks passed
@rohilsurana
rohilsurana deleted the chore/drop-plan-id-from-product-request-body branch July 30, 2026 08:59
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.

2 participants