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

Added basic support for local feature flagging #278

Merged
merged 7 commits into from
Apr 18, 2024

Conversation

jcq
Copy link
Contributor

@jcq jcq commented Jan 10, 2024

Ticket

Resolves #263

Changes

  • filled out functionality in LocalFeatureFlagManager
  • uses env variables
  • supports hot reload
  • requires "FEATURE_" prefix for server-side feature flags
  • requires "NEXT_PUBLIC_FEATURE_" prefix for client-side feature flags

Context for reviewers

Ali had already implemented FeatureFlagManager for managing prod flags via AWS Evidently. This simply adds a fallback for testing locally where a connection to Evidently might not be possible.

- uses env variables
- supports hot reload
Copy link

github-actions bot commented Jan 10, 2024

Coverage report for app

St.
Category Percentage Covered / Total
🟢 Statements
93.02% (+16.48% 🔼)
80/86
🟢 Branches
82.35% (+18.07% 🔼)
14/17
🟢 Functions
93.33% (+21.9% 🔼)
14/15
🟢 Lines
93.51% (+18.51% 🔼)
72/77
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / MockAdapter.ts
83.33% 0% 100% 83.33%
🟢
... / EvidentlyAdapter.ts
100% 100% 100% 100%
🟢
... / server-utils.ts
100% 100% 100% 100%
🟢
... / index.ts
100% 100% 100% 100%
🟢
... / setup.ts
100% 50% 100% 100%

Test suite run success

16 tests passing in 5 suites.

Report generated by 🧪jest coverage report action from fbd37c1

@jcq jcq marked this pull request as ready for review January 10, 2024 12:50
@sawyerh sawyerh merged commit 184df2e into main Apr 18, 2024
7 checks passed
@sawyerh sawyerh deleted the jc/263-local-feature-flagging branch April 18, 2024 23:30
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.

Feature flagging: Add local feature flagging implementation that doesn't rely on evidently
2 participants