Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

add support for targeting rule evaluation with semver #15

Closed
wants to merge 1 commit into from

Conversation

vpai
Copy link
Contributor

@vpai vpai commented Mar 6, 2024

Motivation and Context

Eppo's RAC API will start returning targeting rule values containing semver strings. Our SDKs need to be able to parse these strings and perform rule evaluation on them. This change in rule logic has already been applied to a few other SDKs:

Eppo-exp/python-sdk#27
Eppo-exp/js-sdk-common#38
Eppo-exp/eppo-ios-sdk#10

Description

The operations lt, gt, lte, gte apply to both numeric values and semver strings. Previously it was only numeric values.

Behavior of un-upgraded SDKs

They will continue to assume that only numeric values will be present for the lt, gt, lte, gte operations.

lib/eppo_client/rules.rb Fixed Show fixed Hide fixed
lib/eppo_client/rules.rb Fixed Show fixed Hide fixed
lib/eppo_client/rules.rb Fixed Show fixed Hide fixed
lib/eppo_client/rules.rb Fixed Show fixed Hide fixed
lib/eppo_client/rules.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
lib/eppo_client/rules.rb Fixed Show fixed Hide fixed
lib/eppo_client/rules.rb Fixed Show fixed Hide fixed
@vpai vpai force-pushed the varun/semver branch 2 times, most recently from 69de5ef to 1ec5d4e Compare March 6, 2024 22:05
lib/eppo_client/rules.rb Dismissed Show dismissed Hide dismissed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
spec/rules_spec.rb Fixed Show fixed Hide fixed
@vpai vpai force-pushed the varun/semver branch 3 times, most recently from 54a6d45 to cac2b47 Compare March 6, 2024 22:56
lib/eppo_client/rules.rb Fixed Show fixed Hide fixed
@vpai vpai requested review from leoromanovsky, a team and sameerank and removed request for a team March 6, 2024 22:57
@vpai
Copy link
Contributor Author

vpai commented Mar 6, 2024

These Rubocop warnings are a lot.

@vpai vpai closed this Mar 6, 2024
@vpai vpai deleted the varun/semver branch March 6, 2024 23:00
@vpai
Copy link
Contributor Author

vpai commented Mar 6, 2024

Closing in favor of #16.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant