-
Notifications
You must be signed in to change notification settings - Fork 375
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
Add identity_override_ids
Field to Webhook Payload for Managing Identity-Specific Flag Overrides
#4787
Comments
identity_override_ids
Field to Webhook Payload for Managing Identity-Specific Flag Overrides
Hi @Alyahya-A , unfortunately, querying this data can be quite intensive since it is feasible to have large numbers of identity overrides on any given feature. Could you change the issue into a problem statement, including more information about your use case, rather than suggesting a solution? Specifically, I would like to challenge this statement:
Why is that beneficial? What are you planning to use that information for? I'm also unsure regarding this statement:
From what I can tell, the information in the webhook should be sufficient for you to determine this. The |
Hi @matthewelwell, Problem StatementOur system relies on identity overrides for configuring feature flags per entity. We receive webhook events from Flagsmith for flag updates, but the current webhook payload lacks details to handle identity overrides effectively in our case. Use Case & BenefitsEach microservice acts as a distinct identity in Flagsmith with its own flag overrides. This use case extends beyond microservices to any setup with identity-specific configurations. When we receive a flag update, we need to determine if it:
This clarity is essential for two reasons:
Current Limitation in the Webhook PayloadCurrently, when a global change occurs, the Providing this data in the webhook payload would streamline handling of global and identity-specific updates, reduce redundant API calls, and help maintain accurate flag configurations across services. |
This seems like an unusual case. Do all your microservices share the same feature flags?
What does "custom configurations" mean? |
Thanks for the follow-up questions! Let me clarify:
Yes, each microservice shares the same core feature flags, with some flags using identity-overrides to customize behavior without creating separate flags or projects since we have shared flags across microservices. This need isn’t unique to microservices; any setup with identity overrides would benefit from knowing when a flag update impacts all identities versus specific overrides.
By "custom configurations," I mean identity-specific overrides that differ from global or segment defaults. For example, one service might have a flag enabled while the global setting is disabled. Without knowing which flags have identity-specific overrides, we risk applying global updates that could override intended configurations. Let me know if this clarifies, or if there are more details I can provide. Thanks! |
If I understand the use case correctly, you should be fetching the actual state of flags (i.e. perform remote evaluation) after you receive an update event, to see what the final state of all flags is after applying any overrides for the current identity. This is how regular real-time updates work, where it's up to consumers to fetch flags after they receive an update message: https://docs.flagsmith.com/advanced-use/real-time-flags |
Is your feature request related to a problem? Please describe.
Hello,
Description:
We use Flagsmith in a microservices architecture with real-time feature flag updates managed through webhooks. However, we face challenges differentiating between global flag updates and updates that affect only specific identities with overrides.
Problem Statement
Currently, the webhook payload does not provide enough information to determine:
Example Scenarios:
A feature flag (
FlagA
) has identity-specific overrides (e.g., disabled for one identity and enabled globally). WhenFlagA
is updated in the dashboard at the global level, the webhook event setsidentity_identifier
tonull
, which does not indicate ifFlagA
has identity-specific overrides.In this scenario, there’s ambiguity in determining if the flag has identity overrides without directly querying Flagsmith again. It would be beneficial to know if the current update impacts all identities universally or if it excludes identities with overrides.
Describe the solution you'd like.
Proposed Solution
identity_override_ids
to the webhook payload, which provides a list of allidentity_identifier
values that have specific overrides for the updated flag.identity_identifier
isnull
,identity_override_ids
provides a list of all identities with overrides, allowing services to determine if they should apply the global update or ignore it if their identity is in the list.identity_identifier
is notnull
, it indicates that the update is for that specific identity, and other identities can ignore the event.Example of Proposed Webhook Payload Enhancement
Describe alternatives you've considered
Querying Flagsmith to Retrieve Override Information: One alternative is to make an additional API call to Flagsmith after receiving a webhook to check for any identity-specific overrides on the updated flag. However, this approach increases latency and API call overhead, especially in a microservices environment with multiple webhook recipients.
Using Tags to Identify Microservices: Another option is to incorporate tags to manage microservice-specific flags. If Flagsmith's .NET SDK could support retrieving flags with tags and if tags were included in the webhook payload, this would allow us to filter and retrieve only the flags relevant to a specific microservice, reducing unnecessary data and ensuring accurate flag configuration for each service.
Additional context
No response
The text was updated successfully, but these errors were encountered: