Skip to content

FLAG_UPDATE webhook shows incorrect states when removing segment override (and missing when versioning enabled) #6241

@gagantrivedi

Description

@gagantrivedi

Description

There's an inconsistency in the FLAG_UPDATE webhook behavior when removing a segment override from an environment, with different problems depending on whether versioning is enabled.

Current Behavior

Without versioning:

  • FLAG_UPDATE webhook is triggered ✅
  • Problem: Both new_state and previous_state contain the same data - the feature state that was removed

With versioning:

  • FLAG_UPDATE webhook is not triggered at all

Expected Behavior

  1. FLAG_UPDATE should be triggered consistently for both versioning and non-versioning environments
  2. The webhook payload should accurately reflect the state change:
    • previous_state: The segment override that is being removed
    • new_state: The environment default feature state (which will now apply after the override is removed)

Proposed Solution

  • Ensure FLAG_UPDATE is triggered when removing segment overrides in versioned environments
  • Populate new_state with the environment default feature state?
  • Populate previous_state with the segment override being removed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions