You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Multi-provider] Gaps identified relative to js-sdk reference implementation #1882
We conducted a cross-SDK comparison of all MultiProvider implementations using the js-sdk as the reference. The Java MultiProvider was recently moved into the core SDK in #1765, and while functional for basic use cases, we identified several gaps relative to the reference implementation. Some of these were already noted during the original PR review.
Gaps
1. Child provider event aggregation and status tracking (High)
The MultiProvider extends EventProvider but does not listen to or forward events from child providers. If a child provider emits PROVIDER_ERROR, PROVIDER_STALE, or PROVIDER_CONFIGURATION_CHANGED at runtime, those events are not surfaced. This was called out in the #1765 review by @guidobrei:
"we effectively lose the Event features when using MultiProvider"
Expected behavior:
Listen to each child provider's events
Maintain a per-provider status map
Compute an aggregate status using "worst-wins" precedence: FATAL > NOT_READY > ERROR > STALE > READY
Emit the corresponding event when the aggregate status changes
2. Per-provider hook execution during evaluation (High)
The strategy calls provider evaluation methods directly (e.g. provider.getBooleanEvaluation(...)), bypassing the SDK's hook pipeline. If a child provider defines hooks via getProviderHooks(), those hooks are not executed.
Expected behavior:
Before evaluating a child provider, run its before hooks with an isolated copy of the hook context
On success: run after hooks
On error: run error hooks
Always: run finally hooks
Hook context must be isolated per-provider to prevent cross-provider mutation
Only FirstMatchStrategy and FirstSuccessfulStrategy exist. There is no ComparisonStrategy for evaluating all providers and comparing results (useful for migration validation and consistency checks).
Expected behavior:
Evaluate all providers (ideally in parallel)
If all providers agree on the value, return it
If providers disagree, call an optional onMismatch callback and return the designated fallback provider's result
If any provider errors, collect and report all errors
Constructor accepts a fallbackProvider and optional onMismatch callback
When two child providers share the same metadata.name, the later provider silently overwrites the earlier one in the internal LinkedHashMap. The first provider is effectively lost. Related to #1792.
Expected behavior:
If an explicit name conflicts with an existing name, throw (misconfiguration)
If multiple providers share the same metadata-derived name, auto-deduplicate with a numeric suffix (name-1, name-2, etc.)
Activity
test(provider-tck): also run the self-test against MultiProvider
test(provider-tck): also run the self-test against MultiProvider
test(provider-tck): also run the self-test against MultiProvider
test(provider-tck): also run the self-test against MultiProvider
test(provider-tck): also run the self-test against MultiProvider
test(provider-tck): also run the self-test against MultiProvider
feat: add the provider conformance assets (#423)
test(provider-tck): also run the self-test against MultiProvider
test(provider-tck): also run the self-test against MultiProvider