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

Add FeatureFlagModule and FeatureFlagService #480

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Conversation

meisekimiu
Copy link
Member

Add a service designed to query feature flags that are fetched from the API. This behavior is implemented in two classes: one for storing and querying the currently set flags and one for initially fetching them from the API.

It is designed like this so that we can test these functionalities on their own and so that the FeatureFlagService can be used in unit tests without any mocking. Any components that query FeatureFlags can just use the service directly and use the set method to manipulate feature flags directly in the test.

Since this is adding a service that is not currently used by any components, there is no way to manually test this in production, however the whole service is covered by unit tests. This PR will not go through a QA review; please check and run the unit tests to verify correct behavior.

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.60%. Comparing base (d4230de) to head (61a7d1f).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #480      +/-   ##
==========================================
+ Coverage   42.50%   42.60%   +0.09%     
==========================================
  Files         354      357       +3     
  Lines       10956    10971      +15     
  Branches     1789     1790       +1     
==========================================
+ Hits         4657     4674      +17     
- Misses       6139     6140       +1     
+ Partials      160      157       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Add a service designed to query feature flags that are fetched from the
API. This behavior is implemented in two classes: one for storing and
querying the currently set flags and one for initially fetching them
from the API.

It is designed like this so that we can test these functionalities
on their own and so that the FeatureFlagService can be used in unit tests
without any mocking. Any components that query FeatureFlags can just use
the service directly and use the `set` method to manipulate feature
flags directly in the test.

PER-9735: Create service to fetch client config
@meisekimiu meisekimiu merged commit 905b866 into main Oct 25, 2024
4 checks passed
@meisekimiu meisekimiu deleted the feature-flag-service branch October 25, 2024 20: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.

3 participants