Skip to content

fix(feature-flags): rules should evaluate with an AND op #724

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

Merged
merged 2 commits into from
Oct 3, 2021

Conversation

ran-isenberg
Copy link
Contributor

Issue #, if available:

Description of changes:

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 1, 2021
@ran-isenberg
Copy link
Contributor Author

The test i changed was working because the match value of the rule was the same as the default value of the feature.
When i change expected_value_second_check to be True and run the test it fails, because it doesnt match on the second rule.
After the fix, the test works with expected_value_second_check = True or False, because it returns the correct value.

@heitorlessa heitorlessa added area/feature_flags bug Something isn't working labels Oct 3, 2021
@heitorlessa
Copy link
Contributor

Thank you and specially @gwlester for catching it

@heitorlessa heitorlessa changed the title fix: Feature Flag only evaluates first rule in a feature fix(feature-flags): rules should evaluate with an AND op Oct 3, 2021
@heitorlessa heitorlessa merged commit 47ae544 into aws-powertools:develop Oct 3, 2021
heitorlessa added a commit to heitorlessa/aws-lambda-powertools-python that referenced this pull request Oct 5, 2021
…tools-python into develop

* 'develop' of https://github.com/awslabs/aws-lambda-powertools-python:
  feat(feature_flags): Added inequality conditions (aws-powertools#721)
  fix(feature-flags): rules should evaluate with an AND op (aws-powertools#724)
  fix(logger): push extra keys to the end (aws-powertools#722)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants