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

Feature request: Support depth levels in feature flag keys #4690

Open
2 tasks done
adriantomas opened this issue Jul 4, 2024 · 3 comments
Open
2 tasks done

Feature request: Support depth levels in feature flag keys #4690

adriantomas opened this issue Jul 4, 2024 · 3 comments
Assignees
Labels
feature-request feature request revisit-in-3-months Requires more customers feedback before making or revisiting a decision

Comments

@adriantomas
Copy link
Contributor

Use case

Currently the key of the conditions of the feature flags only support that the values sent in the context are first level.

It would be very interesting to be able to support depth levels, like with a dot attribute access or with a string list of dictionary keys, so that for example a feature flag can be defined based on the raw content of the event without having to transform it or extract something from it.

Solution/User Experience

Context:

{
  "foo": {
    "bar": "premium"
  }
}

Schema:

{
    "premium_feature": {
        "default": false,
        "rules": {
            "customer tier equals premium": {
                "when_match": true,
                "conditions": [
                    {
                        "action": "EQUALS",
                        "key": ["foo", "bar"],
                        "value": "premium"
                    }
                ]
            }
        }
    }
}

Alternative solutions

No response

Acknowledgment

@adriantomas adriantomas added feature-request feature request triage Pending triage from maintainers labels Jul 4, 2024
@leandrodamascena
Copy link
Contributor

Hey @adriantomas! I'm working in some critical issues and will reply to this tomorrow, ok?

Thanks

@leandrodamascena leandrodamascena self-assigned this Jul 8, 2024
@adriantomas
Copy link
Contributor Author

Hey @adriantomas! I'm working in some critical issues and will reply to this tomorrow, ok?

Thanks

Sure, take your time :)

@heitorlessa
Copy link
Contributor

Idea... maybe we could think of using JMESPath like we use in multiple places here. We started simple because we knew customers could pluck those values before calling .evaluate. JMESPath is used in Logger (correlation ID), Idempotency, etc., and it's a string to easy ;)

@dreamorosi dreamorosi added revisit-in-3-months Requires more customers feedback before making or revisiting a decision and removed triage Pending triage from maintainers labels Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request feature request revisit-in-3-months Requires more customers feedback before making or revisiting a decision
Projects
Status: Backlog
Development

No branches or pull requests

4 participants