Skip to content

Conversation

@Vishalup29
Copy link

@Vishalup29 Vishalup29 commented Dec 8, 2025

Description

Deprecate the contrib multi-provider in favor of the new core SDK implementation, while keeping existing users backwards compatible.

Changes:

  • Mark dev.openfeature.contrib.providers.multiprovider.MultiProvider (and related types) as @Deprecated.
  • Update Javadoc on the contrib multi-provider to point to
    dev.openfeature.sdk.multiprovider.MultiProvider in the core SDK.
  • Update the contrib providers/multiprovider/README.md with a deprecation notice and usage guidance
    for the SDK-based multi-provider.
  • Ensure the contrib multi-provider continues to compile and can still be used by existing consumers,
    but clearly communicates the migration path.

Related Issues

Related to open-feature/java-sdk#1486

Notes

  • This PR does not introduce new functionality in contrib; it only deprecates the existing
    multi-provider and redirects users to the SDK implementation.
  • The goal is to keep current users unbroken while nudging them toward the new, experimental
    multi-provider in the core SDK.

Follow-up Tasks

  • None (unless maintainers want a follow-up issue to remove contrib multi-provider entirely).

How to test

  • Run the contrib module tests (e.g. mvn test from the contrib repo root).
  • Verify that:
    • The contrib multi-provider still compiles and tests pass.
    • IDEs show @Deprecated warnings for contrib multi-provider classes.
    • README/Javadoc references correctly point to
      dev.openfeature.sdk.multiprovider.MultiProvider in the core SDK.

@Vishalup29 Vishalup29 requested a review from a team as a code owner December 8, 2025 02:32
@github-actions github-actions bot requested a review from liran2000 December 8, 2025 02:33
@gemini-code-assist
Copy link

Summary of Changes

Hello @Vishalup29, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on deprecating the existing multi-provider within the contrib module of the OpenFeature Java SDK. The primary goal is to transition users to a new, experimental multi-provider implementation now integrated into the core SDK, while ensuring that current applications remain functional and providing clear guidance for migration.

Highlights

  • Deprecation of Contrib Multi-Provider: The multi-provider implementation located in the contrib module has been officially marked as deprecated.
  • Migration to Core SDK: Users are now directed to utilize the new multi-provider implementation which has been integrated into the core OpenFeature Java SDK.
  • Documentation Updates: Javadoc comments for the deprecated classes and the README.md file have been updated to include clear deprecation notices and guidance for migrating to the core SDK version.
  • Backward Compatibility: Existing applications using the contrib multi-provider will continue to function, ensuring a smooth and non-breaking transition path for users.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Vishalup29 Vishalup29 changed the title Issue open-feature/java-sdk#1486 Deprecate contrib multi-provider and redirect users to SDK implementation. docs: deprecate contrib multi-provider in favor of SDK implementation Dec 8, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request deprecates the contrib multi-provider in favor of the new core SDK implementation. The changes correctly mark the classes and update documentation. My review includes a critical fix for a compilation error caused by a conflicting import. I've also suggested adding the @Deprecated annotation to all deprecated classes to ensure compiler warnings are generated, and improving the Javadoc @deprecated tags to link directly to the new classes for better developer experience. A minor formatting suggestion for the README is also included.

Additionally, I noticed that the dev.openfeature.contrib.providers.multiprovider.Strategy interface is not deprecated, while its implementations are. Since it's a related public type, it should probably be deprecated as well to be consistent. As this file was not part of the changes, I'm mentioning it here for your consideration.

import dev.openfeature.sdk.ProviderEvaluation;
import dev.openfeature.sdk.Value;
import dev.openfeature.sdk.exceptions.GeneralError;
import dev.openfeature.sdk.providers.multiprovider.MultiProvider;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This import will cause a compilation error because its simple name MultiProvider conflicts with the class defined in this file. Since the {@link} tag in the Javadoc uses the fully qualified class name, this import is not necessary and should be removed.

* @deprecated Use the strategy from the core SDK multi-provider package instead.
*/
@Slf4j
@NoArgsConstructor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

In addition to the @deprecated Javadoc tag, you should also add the @Deprecated annotation to the class. This will cause the compiler to generate warnings when the class is used, which is crucial for communicating deprecations effectively.

@NoArgsConstructor
@Deprecated

* @deprecated Use the strategy from the core SDK multi-provider package instead.
*/
@Slf4j
@NoArgsConstructor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

In addition to the @deprecated Javadoc tag, you should also add the @Deprecated annotation to the class. This will cause the compiler to generate warnings when the class is used, which is crucial for communicating deprecations effectively.

@NoArgsConstructor
@Deprecated

* @deprecated Use {@link dev.openfeature.sdk.providers.multiprovider.MultiProvider}
* from the core SDK instead.
*/
@Slf4j

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

In addition to the @deprecated Javadoc tag, you should also add the @Deprecated annotation to the class. This will cause the compiler to generate warnings when the class is used, which is crucial for communicating deprecations effectively.

@Slf4j
@Deprecated

* evaluation should error and “bubble up” the individual provider’s error in the result. As soon as
* a value is returned by a provider, the rest of the operation should short-circuit and not call
* the rest of the providers.
* @deprecated Use the strategy from the core SDK multi-provider package instead.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve developer experience and provide a clear migration path, it's better to use a {@link} tag in the @deprecated Javadoc to point directly to the replacement class. This allows IDEs to provide quick navigation and refactoring suggestions.

Suggested change
* @deprecated Use the strategy from the core SDK multi-provider package instead.
* @deprecated Use {@link dev.openfeature.sdk.providers.multiprovider.FirstMatchStrategy} from the core SDK instead.

* First Successful Strategy. Similar to “First Match”, except that errors from evaluated providers
* do not halt execution. Instead, it will return the first successful result from a provider. If no
* provider successfully responds, it will throw an error result.
* @deprecated Use the strategy from the core SDK multi-provider package instead.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve developer experience and provide a clear migration path, it's better to use a {@link} tag in the @deprecated Javadoc to point directly to the replacement class. This allows IDEs to provide quick navigation and refactoring suggestions.

Suggested change
* @deprecated Use the strategy from the core SDK multi-provider package instead.
* @deprecated Use {@link dev.openfeature.sdk.providers.multiprovider.FirstSuccessfulStrategy} from the core SDK instead.

@Vishalup29 Vishalup29 force-pushed the java_sdk_issue_1486 branch 2 times, most recently from fe3284c to 6e50cbb Compare December 8, 2025 02:49
@Vishalup29
Copy link
Author

@chrfwow @toddbaert @aepfli Can you pls take a look when you get a chance?
thanks for your help throughout

@Vishalup29 Vishalup29 force-pushed the java_sdk_issue_1486 branch 3 times, most recently from 7bff26a to 3496316 Compare December 12, 2025 07:50
… redirect users to SDK implementation.

Signed-off-by: vishalup29 <vishalupadhyay977@gmail.com>
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.

3 participants