Skip to content

fix: relax openfeature-sdk version constraint in Optimizely provider#133

Merged
josecolella merged 2 commits intomainfrom
relax-openfeature-sdk-version-constraint
Mar 19, 2026
Merged

fix: relax openfeature-sdk version constraint in Optimizely provider#133
josecolella merged 2 commits intomainfrom
relax-openfeature-sdk-version-constraint

Conversation

@josecolella
Copy link
Copy Markdown
Collaborator

Summary

The Optimizely provider's gemspec currently constrains openfeature-sdk to ~> 0.4.0, which translates to >= 0.4.0, < 0.5.0. However, the openfeature-sdk gem is now at version 0.6.4, making the Optimizely provider unusable with current SDK versions.

This PR relaxes the constraint to >= 0.4.0, < 1.0, allowing compatibility with all pre-1.0 releases of the SDK while still guarding against potential breaking changes in a 1.0 release.

Changes

  • providers/openfeature-optimizely-provider/openfeature-optimizely-provider.gemspec: Changed spec.add_runtime_dependency "openfeature-sdk", "~> 0.4.0" to spec.add_runtime_dependency "openfeature-sdk", ">= 0.4.0", "< 1.0"

🤖 Jose's AI agent

@josecolella josecolella requested a review from a team as a code owner March 19, 2026 20:13
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 addresses an incompatibility issue in the Optimizely provider by updating its dependency specification for the openfeature-sdk. The previous strict version constraint prevented the provider from working with recent SDK releases. The updated constraint broadens compatibility, allowing the provider to function correctly across a wider range of pre-1.0 SDK versions.

Highlights

  • Version Constraint Relaxation: The openfeature-sdk version constraint in the Optimizely provider's gemspec has been relaxed from ~> 0.4.0 to >= 0.4.0, < 1.0 to ensure compatibility with newer SDK versions while preventing breaking changes from a 1.0 release.
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.

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.

Copy link
Copy Markdown
Contributor

@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 correctly relaxes the version constraint for the openfeature-sdk gem to allow compatibility with newer versions. The change is functional, but I have suggested using a more concise and idiomatic approach for defining the version constraint in the gemspec file, which improves readability and aligns with common Ruby conventions.


spec.add_runtime_dependency "logger"
spec.add_runtime_dependency "openfeature-sdk", "~> 0.4.0"
spec.add_runtime_dependency "openfeature-sdk", ">= 0.4.0", "< 1.0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

While this works, a more concise and idiomatic way to express this version constraint in RubyGems is to use the pessimistic version operator ~>. The constraint "~> 0.4" is equivalent to ">= 0.4.0", "< 1.0" and is generally preferred for its brevity and clarity.

  spec.add_runtime_dependency "openfeature-sdk", "~> 0.4"

@josecolella josecolella changed the title Relax openfeature-sdk version constraint in Optimizely provider fix: relax openfeature-sdk version constraint in Optimizely provider Mar 19, 2026
josecolella and others added 2 commits March 19, 2026 13:20
The current constraint `~> 0.4.0` only allows versions >= 0.4.0 and
< 0.5.0, but the openfeature-sdk gem is now at 0.6.4. This makes the
Optimizely provider unusable with current SDK versions.

Relax the constraint to `>= 0.4.0, < 1.0` to allow compatibility
with all pre-1.0 releases of the SDK.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jose Colella <jose.colella@gusto.com>
Replace `>= 0.4.0, < 1.0` with the equivalent `~> 0.4` which is
the standard RubyGems idiom for the same constraint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jose Colella <jose.colella@gusto.com>
@josecolella josecolella force-pushed the relax-openfeature-sdk-version-constraint branch from 317a7ea to 736d205 Compare March 19, 2026 20:20
@josecolella josecolella merged commit 4f2d191 into main Mar 19, 2026
22 checks passed
@josecolella josecolella deleted the relax-openfeature-sdk-version-constraint branch March 19, 2026 20:25
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