ref: Add contract v2 deleting deprecated fields - #415
Conversation
|
The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 50a7bd0. Configure here.
50a7bd0 to
6d9e3fc
Compare
4cd4e2c to
1451081
Compare
| message ContractMetadata { | ||
| uint64 id = 1; | ||
| uint64 organization_id = 2; | ||
| // The set of BillingRules that the BillingRulesEngine has to execute for this contract. | ||
| string ruleset_version = 3; | ||
| // Catch-all for overrides and information not covered above. | ||
| sentry_protos.billing.v1.services.contract.v1.MetadataOptions custom_options = 4; | ||
| string package_uid = 5; | ||
|
|
||
| optional uint64 previous_id = 6; | ||
| } |
There was a problem hiding this comment.
Bug: The new v2 ContractMetadata proto removes the billing_features field, which is an active, non-deprecated field in v1, causing a breaking change.
Severity: HIGH
Suggested Fix
Reinstate the billing_features field in the v2 ContractMetadata proto to maintain backward compatibility. If the removal is intentional, a clear migration path and updated documentation should be provided to explain how consumers can access this feature data through other means.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location:
proto/sentry_protos/billing/v1/services/contract/v2/contract_metadata.proto#L7-L17
Potential issue: The v2 `ContractMetadata` proto omits the `billing_features` field.
This field is an active, non-deprecated field in the v1 proto that carries semantically
important data for time-bounded feature configurations. Its removal is a breaking change
that contradicts the stated goal of removing only deprecated fields. Any consumer
migrating from v1 to v2 will silently lose access to this feature flag information,
potentially causing incorrect feature gating in production.
Did we get this right? 👍 / 👎 to inform future reviews.

Create a new v2 contract proto with deprecated fields removed
https://linear.app/getsentry/issue/REVENG-518/create-contract-proto-v2