Skip to content

feat(multiprovider): aggregate child provider events, state, and tracking - #2004

Draft
jonathannorris wants to merge 1 commit into
mainfrom
feat/multiprovider-events-and-tracking
Draft

feat(multiprovider): aggregate child provider events, state, and tracking#2004
jonathannorris wants to merge 1 commit into
mainfrom
feat/multiprovider-events-and-tracking

Conversation

@jonathannorris

@jonathannorris jonathannorris commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • MultiProvider now observes child provider events and aggregates them into a single provider state using worst-wins precedence: FATAL > NOT_READY > ERROR > STALE > READY.
  • PROVIDER_CONFIGURATION_CHANGED from any child is forwarded to the SDK.
  • Implements track, forwarding to every child provider that isn't NOT_READY or FATAL; a throwing provider is logged and doesn't stop the rest.
  • Duplicate provider names are disambiguated (name, name-1, name-2) instead of silently overwriting each other in the provider map.

Implementation

EventProvider gains addEventObserver/removeEventObserver so a composite provider can observe its children without going through the API-level event bus. Observers are registered during initialize and removed during shutdown.

Related PRs

This is one of three independent PRs that together close the multi-provider gaps identified in #1882. They branch off main separately and can be reviewed and merged in any order. Together they replace #1897.

Relates to #1882

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 28d7ec05-ead3-42cf-94ff-5911e27c8240

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.11111% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.02%. Comparing base (a8e6644) to head (d1bbc8e).

Files with missing lines Patch % Lines
...v/openfeature/sdk/multiprovider/MultiProvider.java 81.81% 13 Missing and 17 partials ⚠️
...c/main/java/dev/openfeature/sdk/EventProvider.java 73.33% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2004      +/-   ##
============================================
- Coverage     92.52%   92.02%   -0.50%     
- Complexity      728      781      +53     
============================================
  Files            60       60              
  Lines          1739     1907     +168     
  Branches        202      223      +21     
============================================
+ Hits           1609     1755     +146     
- Misses           80       87       +7     
- Partials         50       65      +15     
Flag Coverage Δ
unittests 92.02% <81.11%> (-0.50%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant