Skip to content

fix: Webhook payloads do not include multivariate values#6666

Open
khvn26 wants to merge 3 commits intomainfrom
fix/webhooks-mv-values
Open

fix: Webhook payloads do not include multivariate values#6666
khvn26 wants to merge 3 commits intomainfrom
fix/webhooks-mv-values

Conversation

@khvn26
Copy link
Member

@khvn26 khvn26 commented Feb 5, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Contributes to #6190.

In this PR, we add multivariate_feature_state_values to environment webhook payloads for FLAG_UPDATED events. The payload now includes each multivariate option's ID, value, and percentage allocation in both new_state and previous_state:

"multivariate_feature_state_values": [
  {
    "id": 1,
    "multivariate_feature_option": {
      "id": 10,
      "value": "variant_a"
    },
    "percentage_allocation": 50
  }
]

The documentation and sample webhook value are updated accordingly.

How did you test this code?

Added an integration test reproducing the issue, and will test in staging.

@khvn26 khvn26 requested review from a team as code owners February 5, 2026 19:07
@khvn26 khvn26 removed the request for review from a team February 5, 2026 19:07
@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 5, 2026 9:48pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ignored Ignored Preview Feb 5, 2026 9:48pm
flagsmith-frontend-staging Ignored Ignored Preview Feb 5, 2026 9:48pm

Request Review

@khvn26 khvn26 requested review from Zaimwa9 and adamvialpando and removed request for a team February 5, 2026 19:07
@khvn26 khvn26 changed the title Fix/webhooks mv values fix: Webhook payloads do not include multivariate values Feb 5, 2026
@github-actions github-actions bot added api Issue related to the REST API docs Documentation updates labels Feb 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-6666 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-6666 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-6666 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-6666 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-6666 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-6666 Finished ✅ Results

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.20%. Comparing base (f644ab2) to head (aa79ef9).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6666   +/-   ##
=======================================
  Coverage   98.20%   98.20%           
=======================================
  Files        1298     1298           
  Lines       47108    47169   +61     
=======================================
+ Hits        46262    46323   +61     
  Misses        846      846           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants