Skip to content

feat: Backend for Context values#5798

Merged
khvn26 merged 3 commits intomainfrom
feat/context-values
Jul 22, 2025
Merged

feat: Backend for Context values#5798
khvn26 merged 3 commits intomainfrom
feat/context-values

Conversation

@khvn26
Copy link
Copy Markdown
Member

@khvn26 khvn26 commented Jul 21, 2025

Closes #5674.

As part of this, I realised that using flagsmith-flag-engine ^6.0.0 together with the Flagsmith SDK is impossible, so had to publish flagsmith-flag-engine 5.4.3 with a backport of get_identity_segments.

  • 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

This bumps Flagsmith Engine to a version supporting Context values, enabling Context values evaluation in the Core API. Some code paths were updated to support the context object now expected by some of the Engine's internal-ish APIs.

How did you test this code?

Updated relevant tests. The evaluation itself was tested in the engine. This will be tested on staging as part of the integration testing, together with UI.

@khvn26 khvn26 requested a review from a team as a code owner July 21, 2025 19:54
@khvn26 khvn26 requested review from Zaimwa9 and removed request for a team July 21, 2025 19:54
@vercel
Copy link
Copy Markdown

vercel bot commented Jul 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Jul 22, 2025 10:55am
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Jul 22, 2025 10:55am
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Jul 22, 2025 10:55am

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

github-actions bot commented Jul 21, 2025

Docker builds report

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

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.81%. Comparing base (e977ace) to head (e692a89).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5798   +/-   ##
=======================================
  Coverage   97.81%   97.81%           
=======================================
  Files        1257     1257           
  Lines       44617    44625    +8     
=======================================
+ Hits        43643    43651    +8     
  Misses        974      974           

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

@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Jul 21, 2025
Zaimwa9
Zaimwa9 previously approved these changes Jul 22, 2025
Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM code-wise

Copy link
Copy Markdown
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see that no tests needed to change for this!

Comment thread api/util/mappers/engine.py Outdated
@khvn26 khvn26 force-pushed the feat/context-values branch from 3b77929 to e692a89 Compare July 22, 2025 10:54
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Jul 22, 2025
@khvn26 khvn26 merged commit d06acd3 into main Jul 22, 2025
29 checks passed
@khvn26 khvn26 deleted the feat/context-values branch July 22, 2025 11:04
khvn26 added a commit that referenced this pull request Jul 23, 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.

Backend: Implement Context values for Segments

3 participants