Shared Environments - ideas for a solution #3767
Replies: 4 comments
-
|
Beta Was this translation helpful? Give feedback.
-
For a v1, I think just having all flags shared is OK? Most use cases want a shared set and a service/app specific set, and hence the example I described above tends to work for most use cases? We maybe need to do more customer development here.
I think in this situation there's generally a "lead" Flagsmith project - this would be selected when creating the shared project, and Identities would just be stored there. Or they could be stored in the shared project itself. We could maybe allow this to be defined by the user.
Tags don't get sent to clients? So I don't see how this helps?
They would work as they currently do? Not sure what you mean? |
Beta Was this translation helpful? Give feedback.
-
An alternative solution is Cross-Project dependencies |
Beta Was this translation helpful? Give feedback.
-
For me, this is way over-engineered. I think the solution to the problem defined in the discussion would be to better solve by utilising tags. To achieve this, we would need to:
Unless I'm missing something, that solves the problems that you have described above. You would just create a single project and tag features accordingly. You can also use tag-based permissions as required to ensure that users cannot modify flags that they shouldn't be able to. |
Beta Was this translation helpful? Give feedback.
-
Sometimes people want to be able to share flags from more than 1 enviroment amongst their own applications/services.
There are several use cases for this, but for the sake of this example, imagine there was a mobile app with iOS and Android versions, split across two completely separate code-bases. Some flags would want to be shared between both iOS and Android applications, but some would be specific to each platform. Currently there are two main ways to achieve this in Flagsmith:
How else could we solve this situation?
My Idea: "Meta Projects"
Create 3 regular Flagsmith projects:
The "Mobile Platform" project would contain shared flags across both iOS and Android.
Now create 2 "Meta Projects". Meta projects are basically just references to more than 1 Project that have their own SDK keys.
Each Meta Project would have its own SDK keys. Requesting Flags for that Project would return a single document that combines the flags from all the referenced Projects.
Problems
Identities
Suggest there is 1 "lead" project defined within the Meta Project that stores Identities. This could be the same shared project. We don't care.
Flag namespaces
Each Project reference could contain a flag name prefix. So for example, the iOS project namespace could be
ios.
. Then a Flag in the iOS project calledenableOAuth
would be referenced in the Flagsmith sdk with the flag nameios.enableOAuth
.Beta Was this translation helpful? Give feedback.
All reactions