Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Reproduce issue with variables with no catch-all rule #250

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fahad19
Copy link
Member

@fahad19 fahad19 commented Jan 17, 2024

The setup

  • Have a feature with variations and variables
  • Have no rules that match context when evaluated with SDK
  • Have a forced condition for forcing variation
  • Variations should have variables, with custom overrides embedded in them

The issue

Without the catch-all rule, the tests fail.

Ideally, it should still pass.

Workaround

Use a catch-all rule with segment: "*" as the last rule, then everything works as expected.

Where to fix?

The fix might be in SDK's .evaluateVariable() method.

@fahad19 fahad19 self-assigned this Jan 17, 2024
# # intentionally commented to prove it fails before fixing SDK
# - key: "1"
# segments: "*"
# percentage: 0
Copy link
Member Author

Choose a reason for hiding this comment

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

if I un-comment these lines, everything passes.

@fahad19 fahad19 changed the title Reproduce issue with variables with no catch-all rule [ISSUE] Reproduce issue with variables with no catch-all rule Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant