Skip to content

feat(feature_flags): add modulo range condition for segmented experimentation support #2331

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 5 commits into from
Jun 16, 2023

Conversation

ajwad-shaikh
Copy link
Contributor

Issue number: #2003

Summary

Adds Support for Modulo Range Condition in Feature Flags Utility

Changes

Please provide a summary of what's being changed

  • Added a Rule Action - MODULO_RANGE
  • Refactored time_conditions.py to comparators.py
  • Added Validation for the new Rule Action
  • Added Test Cases for Validation and functional tests for the new Rule Action
  • Added Documentation for Modulo Range Experiment Segmentation

User experience

Please share what the user experience looks like before and after this change

  • Users will be able to run segmented experiments using feature flag utility.
  • Users can also enable an experiment for a certain percentage of users and scaling the experiment incrementally.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change? No.

RFC issue number: #2003

Checklist:

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

Acknowledgment

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

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@ajwad-shaikh ajwad-shaikh requested a review from a team as a code owner May 25, 2023 09:14
@ajwad-shaikh ajwad-shaikh requested review from leandrodamascena and removed request for a team May 25, 2023 09:14
@boring-cyborg boring-cyborg bot added documentation Improvements or additions to documentation tests labels May 25, 2023
@pull-request-size pull-request-size bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 25, 2023
@leandrodamascena leandrodamascena linked an issue May 25, 2023 that may be closed by this pull request
2 tasks
@github-actions github-actions bot added the feature New feature or functionality label May 25, 2023
@leandrodamascena
Copy link
Contributor

Hello @ajwad-shaikh! Thank you for submitting the PR! We are planning to start the review in the next week.

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (decee59) 97.16% compared to head (1946c2f) 97.18%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2331      +/-   ##
===========================================
+ Coverage    97.16%   97.18%   +0.01%     
===========================================
  Files          155      155              
  Lines         7067     7093      +26     
  Branches       515      520       +5     
===========================================
+ Hits          6867     6893      +26     
  Misses         157      157              
  Partials        43       43              
Impacted Files Coverage Δ
..._powertools/utilities/feature_flags/comparators.py 94.44% <100.00%> (ø)
...owertools/utilities/feature_flags/feature_flags.py 100.00% <100.00%> (ø)
...ambda_powertools/utilities/feature_flags/schema.py 97.44% <100.00%> (+0.25%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@rubenfonseca
Copy link
Contributor

Looking at this now

Copy link
Contributor

@rubenfonseca rubenfonseca left a comment

Choose a reason for hiding this comment

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

Congratulations for this awesome PR. I loved how you added documentation in the right places, and how you highlighted real use cases and samples in the documentation. This is stellar work!

@rubenfonseca rubenfonseca added the feature_flags Feature Flags utility label Jun 16, 2023
@rubenfonseca rubenfonseca merged commit f02f134 into aws-powertools:develop Jun 16, 2023
sthulb pushed a commit that referenced this pull request Jun 19, 2023
…entation support (#2331)

Co-authored-by: Leandro Damascena <[email protected]>
Co-authored-by: Ruben Fonseca <[email protected]>
rafaelgsr pushed a commit to rafaelgsr/aws-lambda-powertools-python that referenced this pull request Jun 30, 2023
…entation support (aws-powertools#2331)

Co-authored-by: Leandro Damascena <[email protected]>
Co-authored-by: Ruben Fonseca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature_flags Feature Flags utility feature New feature or functionality size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC: Support for Modulo Range Conditions in Feature Flags
4 participants