You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a feature is toggled for an identity to override an environment default, and later that feature is reset for the identity, the payload of emitted webhook is not accurate.
To Reproduce
Steps to reproduce the behavior:
Have a feature which defaults to off
Toggle the feature on for an identity (webhook is emitted)
Reset the feature for the identity (webhook is emitted)
Observe the emitted webhook payload incorrectly describes the new_state: data.new_state.enabled == true.
Expected behavior
The new_state in the webhook payload should correspond to the default state of the feature for the environment
How are you running Flagsmith?
SaaS at flagsmith.com
Additional context
I first brought this up in #148, so I'll just repeat my comment verbatim below because that issue was closed. I want to emphasize, however, that the problem statement of #148is not true. Webhooks are emitted when someone resets the state for an identity! #148 was labeled as tech debt to introduce a desired feature, but I am opening this issue as a bug because the functionality exists but is incorrect.
The behavior I'm seeing here is that a webhook is sent when a feature is reset for an identity, however, the resulting payload shows enabled: true when the default is false. Here's an example (with some redactions) of a webhook payload emitted when resetting a feature that defaults to off:
Note that data.new_state.enabled == true even though data.new_state.feature.default_enabled == false. The expectation is that data.new_state.enabled == data.new_state.feature.default_enabled when resetting a feature for an identity.
The text was updated successfully, but these errors were encountered:
@jjorissen52 - I am not able to replicate this. Are you able to confirm whether your project is using Edge or Core? You should be able to tell this by checking the label underneath your project name in the top left of the dashboard.
Describe the bug
When a feature is toggled for an identity to override an environment default, and later that feature is reset for the identity, the payload of emitted webhook is not accurate.
To Reproduce
Steps to reproduce the behavior:
data.new_state.enabled == true
.Expected behavior
How are you running Flagsmith?
Additional context
I first brought this up in #148, so I'll just repeat my comment verbatim below because that issue was closed. I want to emphasize, however, that the problem statement of #148 is not true. Webhooks are emitted when someone resets the state for an identity! #148 was labeled as tech debt to introduce a desired feature, but I am opening this issue as a bug because the functionality exists but is incorrect.
The behavior I'm seeing here is that a webhook is sent when a feature is reset for an identity, however, the resulting payload shows
enabled: true
when the default is false. Here's an example (with some redactions) of a webhook payload emitted when resetting a feature that defaults to off:Note that
data.new_state.enabled == true
even thoughdata.new_state.feature.default_enabled == false
. The expectation is thatdata.new_state.enabled == data.new_state.feature.default_enabled
when resetting a feature for an identity.The text was updated successfully, but these errors were encountered: