-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: use featureFlagGroup claim for feature flags #329
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Playwright test resultsDetails Open report ↗︎ Skipped testsNo persona › tests/auth.test.ts › authenticate through Clerk UI |
}); | ||
|
||
log.info("Bootstrapping feature flags", features); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth logging some of the new properties here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea. Will do
|
||
const distinctId = userId ?? getDistinctIdFromCookie(headers) ?? "0"; | ||
log.info("Evaluating feature flags for", distinctId); | ||
|
||
const personProperties = sessionClaims?.labs?.featureFlagGroup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is labs already decided? I believe we're using "aila" as the name for everything now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we already have a number of keys under labs. It comes from when the teacher squad started their proof of concept for Clerk. They have owa
and we have labs
. There's no reason why we can't change it, but we'd need some code to read both for a time
Quality Gate passedIssues Measures |
🎉 This PR is included in version 1.14.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
In #320 we added local evaluation of feature flags. Local evaluation calculates the feature flags for the user, but only has user data from the session token. That works for feature flags which are either on or off, but we sometimes want feature flags for a specific group of users, like the AI team or external testers
This work:
ai-team
for the teamfeatureFlagGroup
into the feature flag evaluation, so that we can calculate the user's flags without needing their email addressTesting:
ai-team
ai-team
set in clerk metadata (I've set it for all of our Oak emails)Bootstrapping feature flags { 'download-all-button': true }
in the server logBootstrapping feature flags { 'download-all-button': false }
in the server log