Skip to content

Feature Flag only evaluates first rule in a feature #714

Closed
@gwlester

Description

@gwlester

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions