-
Notifications
You must be signed in to change notification settings - Fork 152
fix: customer subject hook init #3347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughUpdated the customer subject hook to accept and propagate a billing.CustomerOverrideService: constructor signature changed and the service is stored in SubjectCustomerHookConfig for use by the hook. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
✨ Finishing Touches
🧪 Generate unit tests
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. Comment |
d9cba0a to
26d928b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/common/customer.go (1)
62-69: Update Wire provider set and regenerate wire_gen.go
The call in cmd/server/wire_gen.go (line 366) is missing the newbilling.CustomerOverrideServiceparameter—add it to your Wire injector’s provider set (e.g. in cmd/server/wire.go), then rerunwireto rebuild wire_gen.go soNewCustomerSubjectServiceHookis invoked with all required args. Optionally document the new parameter in the function comment.
🧹 Nitpick comments (1)
app/common/customer.go (1)
76-81: Warn when CustomerOverride is unset SubjectCustomerHookConfig.Validate only checks for Customer, making CustomerOverride optional; if EnableSubjectHook is true but CustomerOverride is nil, emit a warning to improve ops visibility.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
app/common/customer.go(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
app/common/customer.go (2)
openmeter/billing/service.go (1)
CustomerOverrideService(35-42)openmeter/customer/service/hooks/subjectcustomer.go (2)
NewSubjectCustomerHook(92-113)SubjectCustomerHookConfig(115-123)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Lint
- GitHub Check: Build
- GitHub Check: Code Generators
- GitHub Check: Test
- GitHub Check: Analyze (go)
🔇 Additional comments (1)
app/common/customer.go (1)
11-11: Import of billing package looks correctPath matches the existing import scheme and is required for the new type. No issues.
Overview
Re-add customer override service to customer subject hook to fix init. It was accidentally removed in #3345.
Summary by CodeRabbit
New Features
Chores