Skip to content

Conversation

@gagantrivedi
Copy link
Member

@gagantrivedi gagantrivedi commented Nov 4, 2025

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

  • 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?
  • I have used a Conventional Commit title for this Pull Request

Changes

When a new version is published in v2 versioning environments, trigger FLAG_UPDATED webhooks for individual feature states that have changed, in addition to the existing NEW_VERSION_PUBLISHED webhook. This allows webhook consumers to receive granular per-feature updates in the same format as non-versioned environments.

Changes:

  • Add get_updated_feature_states() method to EnvironmentFeatureVersion to detect changed feature states by comparing enabled and value fields
  • Trigger FLAG_UPDATED webhooks for each changed feature state before NEW_VERSION_PUBLISHED webhook in trigger_update_version_webhooks

How did you test this code?

Adds unit tests

@gagantrivedi gagantrivedi requested a review from a team as a code owner November 4, 2025 11:00
@gagantrivedi gagantrivedi requested review from Zaimwa9 and removed request for a team November 4, 2025 11:00
@vercel
Copy link

vercel bot commented Nov 4, 2025

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

3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
docs Ignored Ignored Preview Nov 6, 2025 6:32am
flagsmith-frontend-preview Ignored Ignored Preview Nov 6, 2025 6:32am
flagsmith-frontend-staging Ignored Ignored Preview Nov 6, 2025 6:32am

@github-actions github-actions bot added api Issue related to the REST API feature New feature or request labels Nov 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

Docker builds report

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

@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.01%. Comparing base (3f8b260) to head (1fbb5a6).

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #6240    +/-   ##
========================================
  Coverage   98.01%   98.01%            
========================================
  Files        1278     1278            
  Lines       45178    45324   +146     
========================================
+ Hits        44280    44426   +146     
  Misses        898      898            

☔ 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.

@gagantrivedi gagantrivedi requested review from a team and khvn26 and removed request for a team and Zaimwa9 November 4, 2025 11:08
When a new version is published in v2 versioning environments, trigger
FLAG_UPDATED webhooks for individual feature states that have changed,
in addition to the existing NEW_VERSION_PUBLISHED webhook. This allows
webhook consumers to receive granular per-feature updates in the same
format as non-versioned environments.

Changes:
- Add get_updated_feature_states() method to EnvironmentFeatureVersion
  to detect changed feature states by comparing enabled and value fields
- Trigger FLAG_UPDATED webhooks for each changed feature state before
  NEW_VERSION_PUBLISHED webhook in trigger_update_version_webhooks
@gagantrivedi gagantrivedi force-pushed the fix/6191-fs-update-webhook branch from a1d62b4 to 1fbb5a6 Compare November 6, 2025 06:31
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Nov 6, 2025
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 feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Environment webhook payload does not match between versioning v1 and v2

2 participants