Skip to content

Feature: Add ability to use request as an actor

Thong Kuah requested to merge feature_request_actor into master

What does this MR do and why?

Feature: Add ability to use request as an actor

Within the context of a "request" (as defined by SafeRequestStore.ensure_request_store), we add a new Flipper actor that will return the same flipper_id for that request.


## bad
Feature.enable_percentage_of_time(:new_feature, 10)
Feature.enabled?(:new_feature)
Feature.enabled?(:new_feature)  # <=== Not consistent

## good
Feature.enable_percentage_of_actors(:new_feature, 10)
Feature.enabled?(:new_feature, Feature.current_request)
Feature.enabled?(:new_feature, Feature.current_request)

Related issue: #425202 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thong Kuah

Merge request reports