-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Transform featureFlags into configFlags #4562
Comments
How exactly do you want the caching to be implemented? |
@capaj Tbh I didn't really think about it in details while writing the issue. |
I can make it async and configurable. Default to in memory, but you could just supply a redis URL in env var to use redis. Redis is perfect as caching layer. When you say cache service-do you mean something like upstash? |
@capaj No I meant that we already have an abstraction layer called "Cache Storage . Service" you can find the file in the project. Env var is |
can you link me to where it is defined? twenty/packages/twenty-server/src/integrations/message-queue/message-queue.module-factory.ts Line 35 in 735e75b
|
https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/integrations/cache-storage/cache-storage.service.ts The file you're looking at is not up-to-date btw (not on main branch anymore) |
What we could do eventually is put an additional layer for the config so that the first time we ask for a config flag it's retrieved from redis but all flags are stored in a var, so that if we access other feature flag/config values in the same request, it takes the in-memory value and not do other redis calls |
Hi @FelixMalfait, can you assign me this issue? I will try to solve it. |
Thanks @saadfrhan ; @capaj are you working on it already? |
No, I have not started on this. Assign this to anyone else.
I was only considering it.
…On Tue, 16 Apr 2024, 09:45 Félix Malfait, ***@***.***> wrote:
Thanks @saadfrhan <https://github.com/saadfrhan> ; @capaj
<https://github.com/capaj> are you working on it already?
—
Reply to this email directly, view it on GitHub
<#4562 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ6WITSI6C3AEJSW3VXT4DY5TJILAVCNFSM6AAAAABE36XILOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJYGQ2DQNZRGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hey @saadfrhan this is not an easy one. Ping me on Discord if you need guidance! Thanks |
Yes. I will ping you if I stuck somewhere. Thanks! |
I apologize. I thought I could solve it. |
Context
The line between feature flag and environment variables is blurry.
Ex:
If I set a config var like
FREE_TRIAL_LENGTH
, maybe I will want to overwrite it at the user-level?If I create a variable
GOOGLE_API_KEY
maybe I want people who self-host to be able to set its value directly from the admin panel, etc.Is
IS_BILLING_ENABLED
a feature flag or a config?See how Flagsmith blends both concepts under a single object:
As of today featureFlags are used:
And environment variables are used:
Proposal
We need to extend
FeatureFlag
to becomeConfigFlag
, that means:Steps:
get
method and refactor existing code. We want to keep a great developer experience for "features flags" in particularUse-cases
The text was updated successfully, but these errors were encountered: