Skip to content

refactor(billing): deprecate customer workflow override fields - #5349

Merged
turip merged 1 commit into
mainfrom
feat/deprecate-customer-billing-override-fields
Oct 26, 2026
Merged

turip merged 1 commit into
mainfrom
feat/deprecate-customer-billing-override-fields

Conversation

@turip

@turip turip commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Stacked on #5348.

Mark the eleven unused workflow and tax fields on BillingCustomerOverride as Deprecated in Ent and regenerate the ORM. Default queries now omit those fields while existing columns, indexes, and foreign keys remain available for the staged rollout.

Inline the two tax fields on this schema so the shared TaxMixin used by other billing entities is unaffected. Atlas confirms there is no physical schema diff.

Validation: make generate; Atlas local schema diff; customer profile lifecycle and historical-row adapter tests against local PostgreSQL; scoped fast Go lint.

#5350 follows this PR: it removes these columns and deletes override rows without a billing profile selection.

Summary by CodeRabbit

  • New Features
    • Billing customer overrides can now specify an optional tax code and tax behavior.
  • Deprecations
    • Workflow-related override settings and tax overrides are deprecated. Use a billing profile to manage these settings going forward.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no blocking issue was found.

Summary

Marks eleven historical fields on BillingCustomerOverride as deprecated and regenerates the Ent code.

  • Customer override workflow and tax fields are deprecated in favor of billing profiles.

Reviews (3) · Last reviewed commit: "refactor(billing): deprecate customer wo..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between ba0cb19 and cf08bc0.

Files ignored due to path filters: 9
  • openmeter/ent/db/billingcustomeroverride.go is excluded by !**/ent/db/**
  • openmeter/ent/db/billingcustomeroverride/billingcustomeroverride.go is excluded by !**/ent/db/**
  • openmeter/ent/db/billingcustomeroverride/where.go is excluded by !**/ent/db/**
  • openmeter/ent/db/billingcustomeroverride_create.go is excluded by !**/ent/db/**
  • openmeter/ent/db/billingcustomeroverride_update.go is excluded by !**/ent/db/**
  • openmeter/ent/db/entmixinaccessor.go is excluded by !**/ent/db/**
  • openmeter/ent/db/migrate/schema.go is excluded by !**/ent/db/**
  • openmeter/ent/db/mutation.go is excluded by !**/ent/db/**
  • openmeter/ent/db/setorclear.go is excluded by !**/ent/db/**
Files selected for processing: 1
  • openmeter/ent/schema/billing.go

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

Walkthrough

The BillingCustomerOverride schema no longer applies TaxMixin. It retains legacy workflow and tax fields as deprecated optional fields, adds nullable tax_code_id and tax_behavior fields, and indexes tax_code_id.

Changes: Billing customer override schema

Layer / File(s) Summary
Override fields and indexes
openmeter/ent/schema/billing.go
BillingCustomerOverride no longer applies TaxMixin. Legacy workflow and tax fields remain optional and are marked deprecated. The schema adds nullable tax_code_id and tax_behavior fields and indexes tax_code_id.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Possibly related PRs

  • openmeterio/openmeter#5348: Adds explicit customer billing-profile assignments and replaces workflow overrides with assigned and effective profiles.
  • openmeterio/openmeter#5342: Distinguishes explicitly pinned and effective profiles in the customer billing contract.

Suggested reviewers: borbelyr-kong

Merge Risk: Minimal · up to cf08b

The staged deprecation retains the existing override columns and relationships. No merge-blocking risk was identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: deprecating customer workflow override fields in billing.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@turip turip added the release-note/ignore Ignore this change when generating release notes label Oct 26, 2026
@turip
turip force-pushed the feat/customer-billing-profile-assignments branch from 84cc5be to b206141 Compare October 26, 2026 10:00
@turip
turip force-pushed the feat/deprecate-customer-billing-override-fields branch from a640099 to dfc41ed Compare October 26, 2026 10:02
@turip
turip force-pushed the feat/customer-billing-profile-assignments branch from 021260b to 2538d10 Compare October 26, 2026 11:55
Base automatically changed from feat/customer-billing-profile-assignments to main October 26, 2026 12:39
@turip
turip force-pushed the feat/deprecate-customer-billing-override-fields branch from dfc41ed to cf08bc0 Compare October 26, 2026 12:44
@turip
turip marked this pull request as ready for review October 26, 2026 12:44
@turip
turip requested a review from a team as a code owner October 26, 2026 12:44
@turip
turip requested a review from borbelyr-kong October 26, 2026 12:55
@turip
turip enabled auto-merge (squash) October 26, 2026 12:55
@turip
turip merged commit 590899d into main Oct 26, 2026
31 checks passed
@turip
turip deleted the feat/deprecate-customer-billing-override-fields branch October 26, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/ignore Ignore this change when generating release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants