-
Notifications
You must be signed in to change notification settings - Fork 27
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
refactor: to remove query to load menu feature toggles #3578
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 06a67ac The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
576ba22
to
06a67ac
Compare
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.
💯
Summary
This removes the query to load all menu feature toggles.
Description
Internal applications can be hidden on demand. This can be due to them not being available across all clouds mostly. As applications pass flags of their interest to LD, so that we don't load all flags, we need to pass flags of other applications (not viewed) to LD too so that they're included in the response.
For this, each application (mostly internals) can declare a
featureToggle
property on theirmenu.json
. This query (in a service) then walks over all internal applications and aggregates those feature toggles by name. These are then passed on to LaunchDarkly, so that LD includes them when building up its flag subscription.When adopting feature flagging we first only relied on LD but soon after build more long-lived feature configuration flags into an internal API exposed using the
allFeatures
query. We then recommended to use this to enable/disable applications instead of using LD.Currently, all teams use the allFeatures query to enable/disable applications across environments or projects (during rollout). No team uses, or intends to, use LD for this. In addition with using lazy caching with LD it becomes less interesting to use LD as flag rule changes don't affect running applications instantly any more.
As a result we can remove this query entirely. Saving us a query at boot time of the application. It also lowers the options to hide applications. Internally we will also adopt an
enableApplication*
pattern for features returned from allFeature to make clear if a feature targets an entire application.Note, as a follow-up the query will be deprecated in the API and return an empty array.