Skip to content

Feature Flag only evaluates first rule in a feature #714

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

Closed
gwlester opened this issue Sep 30, 2021 · 2 comments
Closed

Feature Flag only evaluates first rule in a feature #714

gwlester opened this issue Sep 30, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@gwlester
Copy link
Contributor

What were you trying to accomplish?
Having a feature flag with multiple rules.

Expected Behavior

Rules should be evaluated for a feature until one is true or all rules have been evaluated. It appears that test test_flags_conditions_rule_match_multiple_actions_multiple_rules_multiple_conditions does not work as expected.

Current Behavior

The default is returned if the first rule is false.

Possible Solution

I will submit a pull request to correct the code.
I have not debugged the test.

Steps to Reproduce (for bugs)

  1. See test_flags_conditions_rule_match_multiple_actions_multiple_rules_multiple_conditions

Environment

  • Powertools version used: 1.20.2
  • Packaging format (Layers, PyPi): Layers
  • AWS Lambda function runtime: 3.8
  • Debugging logs

How to enable debug mode**

# paste logs here
@gwlester gwlester added bug Something isn't working triage Pending triage from maintainers labels Sep 30, 2021
@gwlester
Copy link
Contributor Author

gwlester commented Oct 4, 2021

@heitorlessa -- I think this should have the label: status/staged-next-release

@heitorlessa heitorlessa added pending-release Fix or implementation already in dev waiting to be released and removed triage Pending triage from maintainers labels Oct 4, 2021
@heitorlessa
Copy link
Contributor

This is now available as part of today's 1.21.0 release -- Thank you for the contribution, credits given at the top ;)

https://github.com/awslabs/aws-lambda-powertools-python/releases/tag/v1.21.0

@heitorlessa heitorlessa removed the pending-release Fix or implementation already in dev waiting to be released label Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants