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

per-flag bandit action filters (FF-3734) #130

Merged
merged 5 commits into from
Dec 18, 2024

Conversation

leoromanovsky
Copy link
Member

@leoromanovsky leoromanovsky commented Dec 17, 2024

Motivation

Currently the get_precomputed_configuration takes a single input of actions for bandit evaluations. This is a global list that gets applied to all bandits.

However since we are evaluating all bandits together, each bandit has unique requirements for actions.

Description

Changing the function signature to accept a nested map of per-flag actions. The implementation looks for actions matching the bandit flag being evaluated.

Please see the expanded unit test for verification of functionality.

The implementation should conceptually match (Eppo-exp/js-sdk-common#180). That one iterates over the actions map, while this implementation iterates over the available flags in the configuration. We should consider whether they produce the same result.

Deploy plan

Publish these changes as eppo_core@5.1.0 and integrate into the edge assignment function. This will be the cut of functionality that will go out to support flag assignment in our internal service.

@leoromanovsky leoromanovsky marked this pull request as ready for review December 18, 2024 00:11
Comment on lines -10 to -13
exclude = [
"fastly-edge-assignments",
]

Copy link
Member Author

Choose a reason for hiding this comment

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

this code is completed deleted now - my IDE was complaining about it here

flag_key;
"No actions provided for flag that requires them"
);
return None;
Copy link
Member Author

Choose a reason for hiding this comment

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

The JS commons implementation of getAllBandits (https://github.com/Eppo-exp/js-sdk-common/pull/180/files) produces this outcome by iterating over the actions keys - if a flag key does not have an actions key then it will not receive a bandit evaluation. This achieves the same thing.

@leoromanovsky leoromanovsky merged commit fe0ba4b into main Dec 18, 2024
26 checks passed
@leoromanovsky leoromanovsky deleted the lr/ff-3737/per-flag-actions branch December 18, 2024 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants