[PM-25501] Register NoopBusinessUnitConverter in OSS DI container#7245
[PM-25501] Register NoopBusinessUnitConverter in OSS DI container#7245cturnbull-bitwarden wants to merge 1 commit intomainfrom
Conversation
|
Claude finished @cturnbull-bitwarden's task in 1m 22s —— View job Code Review: Clean PR
SummaryThis is a clean, well-structured PR. No issues found. The two changes follow established patterns in the codebase:
No bugs, security issues, or improvements to flag. ✅ |
|
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7245 +/- ##
==========================================
- Coverage 57.68% 57.67% -0.01%
==========================================
Files 2035 2036 +1
Lines 89645 89650 +5
Branches 7993 7993
==========================================
Hits 51710 51710
- Misses 36071 36076 +5
Partials 1864 1864 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|




🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-25501
📔 Objective
Fixes a runtime
InvalidOperationExceptionwhen the server is compiled with theOSSflag.OrganizationBillingControllerrequiresIBusinessUnitConverter, but the concreteBusinessUnitConverteris only registered inAddCommercialCoreServices(). In OSS builds,AddOosServices()is called instead, leaving the interface unregistered in the DI container.This adds a
NoopBusinessUnitConverter(following the existing noop pattern, e.g.NoopProviderService) and registers it inAddOosServices(). All methods throwNotImplementedExceptionsince the business unit conversion endpoints are gated behind[SelfHosted(NotSelfHostedOnly = true)]and should never be reached in OSS builds.