Skip to content

fix(Segments): Segment Change Requests don't inherit rules_data - #8537

Open
emyller wants to merge 2 commits into
mainfrom
fix/segment-change-requests-rules-data
Open

emyller wants to merge 2 commits into
mainfrom
fix/segment-change-requests-rules-data

Conversation

@emyller

@emyller emyller commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

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 #7815

This fixes the commit of a Segment Change Request not inheriting rules_data.

How did you test this code?

New test deprecates another one.

@emyller emyller self-assigned this Sep 16, 2026
@emyller
emyller requested a review from a team as a code owner September 16, 2026 00:54
@emyller
emyller requested review from matthewelwell and removed request for a team September 16, 2026 00:54
@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

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

3 Skipped Deployments
Project Deployment Actions Updated
docs Ignored Ignored Preview Sep 17, 2026 8:58pm UTC
flagsmith-frontend-preview Ignored Ignored Preview Sep 17, 2026 8:58pm UTC
flagsmith-frontend-staging Ignored Ignored Preview Sep 17, 2026 8:58pm UTC

Request Review

@github-actions github-actions Bot added api Issue related to the REST API fix labels Sep 16, 2026
@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

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

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 7367683f-9b0d-4590-affb-ebb6fa119084

📥 Commits

Reviewing files that changed from the base of the PR and between 5ecec28 and 51add8b.

📒 Files selected for processing (1)
  • api/tests/unit/features/workflows/core/test_unit_workflows_models.py

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The commit workflow now copies draft_segment.rules_data to the live segment before saving it. The Segment.rules_data annotation allows nullable default data. The unit test now uses JSON rule data and checks the live segment, preserved revision, and emitted event. The previous ORM-based test remains under a renamed test with a deletion TODO.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 51add

The PR correctly publishes draft JSON rules while preserving revision and legacy rule behavior; no concrete merge-blocking risk remains.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.81%. Comparing base (30098e5) to head (51add8b).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8537      +/-   ##
==========================================
- Coverage   98.82%   98.81%   -0.01%     
==========================================
  Files        1622     1620       -2     
  Lines       66727    66203     -524     
==========================================
- Hits        65942    65418     -524     
  Misses        785      785              

☔ View full report in Codecov by Harness.
📢 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 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor
✅ private-cloud · depot-ubuntu-latest-16 — run #20499 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  50.8 seconds
commit  51add8b
info  🔄 Run: #20499 (attempt 1)

🗂️ Previous results
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #20499 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  37.7 seconds
commit  51add8b
info  🔄 Run: #20499 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #20499 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  39.7 seconds
commit  51add8b
info  🔄 Run: #20499 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #20499 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  20 seconds
commit  51add8b
info  🔄 Run: #20499 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #20473 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  48.7 seconds
commit  5ecec28
info  🔄 Run: #20473 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #20473 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 3 seconds
commit  5ecec28
info  🔄 Run: #20473 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #20473 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  39.5 seconds
commit  5ecec28
info  🔄 Run: #20473 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #20473 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.6 seconds
commit  5ecec28
info  🔄 Run: #20473 (attempt 1)

@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

@github-actions github-actions Bot added fix and removed fix labels Sep 17, 2026
@matthewelwell
matthewelwell self-requested a review September 18, 2026 12:43
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