Skip to content

feat: phased rollout - #5890

Merged
gagantrivedi merged 7 commits into
mainfrom
feat/5675-phased-rollout
Aug 13, 2025
Merged

feat: phased rollout#5890
gagantrivedi merged 7 commits into
mainfrom
feat/5675-phased-rollout

Conversation

@gagantrivedi

@gagantrivedi gagantrivedi commented Aug 5, 2025

Copy link
Copy Markdown
Member

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

Add database models required by release-pipeline-logic to implement phased rollout

How did you test this code?

Covered by unit tests

@vercel

vercel Bot commented Aug 5, 2025

Copy link
Copy Markdown

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

3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
docs ⬜️ Ignored Preview Aug 13, 2025 11:15am
flagsmith-frontend-preview ⬜️ Ignored Preview Aug 13, 2025 11:15am
flagsmith-frontend-staging ⬜️ Ignored Preview Aug 13, 2025 11:15am

@github-actions github-actions Bot added the api Issue related to the REST API label Aug 5, 2025
Comment thread api/features/versioning/migrations/0007_phased_rollout.py Outdated
@gagantrivedi
gagantrivedi force-pushed the feat/5675-phased-rollout branch 2 times, most recently from 6ed3028 to 6878dfc Compare August 6, 2025 03:19
@codecov

codecov Bot commented Aug 6, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.84%. Comparing base (c533d95) to head (f68303c).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5890      +/-   ##
==========================================
+ Coverage   97.83%   97.84%   +0.01%     
==========================================
  Files        1258     1261       +3     
  Lines       44630    44883     +253     
==========================================
+ Hits        43664    43917     +253     
  Misses        966      966              

☔ 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 force-pushed the feat/5675-phased-rollout branch 2 times, most recently from 2b97bb9 to 7b1d747 Compare August 11, 2025 05:35
@gagantrivedi
gagantrivedi requested a review from Copilot August 11, 2025 05:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a phased rollout feature for release pipelines, enabling gradual feature deployment through system segments with automated split percentage increases.

  • Adds system segments that are hidden from regular API operations and skip audit logging
  • Implements PhasedRolloutState model for managing gradual rollout progression
  • Introduces new pipeline stage action type for phased rollouts with automated split increases

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
api/segments/models.py Adds is_system_segment field and audit log skipping logic
api/segments/views.py Filters out system segments from API responses
api/features/release_pipelines/core/models.py Implements PhasedRolloutState model and phased rollout stage action
api/features/versioning/models.py Links feature versions to phased rollout states
Various test files Comprehensive test coverage for new functionality
Migration files Database schema changes for new fields and models

Comment thread api/tests/unit/conftest.py Outdated
Comment thread api/tests/unit/segments/test_unit_segments_views.py Outdated
Comment thread api/features/release_pipelines/core/models.py
Comment thread api/features/release_pipelines/core/models.py
@gagantrivedi gagantrivedi changed the title wip: phased rollout feat: phased rollout Aug 11, 2025
@gagantrivedi
gagantrivedi marked this pull request as ready for review August 11, 2025 06:04
@gagantrivedi
gagantrivedi requested a review from a team as a code owner August 11, 2025 06:04
@gagantrivedi
gagantrivedi requested review from khvn26 and removed request for a team August 11, 2025 06:04
@gagantrivedi
gagantrivedi force-pushed the feat/5675-phased-rollout branch from 7b1d747 to cab9cdf Compare August 11, 2025 06:05
@github-actions

github-actions Bot commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

Docker builds report

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

@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Aug 11, 2025
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Aug 12, 2025
@gagantrivedi
gagantrivedi requested a review from Zaimwa9 August 12, 2025 07:07

@Zaimwa9 Zaimwa9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Kudos for the thorough test cases.
2 comments:

  • To me we have a One-one relationship EFV <> rollout_state no? it would make sense the DB follows
  • A default timezone not at the right place

Comment thread api/features/release_pipelines/core/models.py Outdated
Comment thread api/tests/unit/segments/test_unit_segments_models.py Outdated
Comment thread api/features/versioning/migrations/0007_add_phased_rollout.py Outdated
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Aug 12, 2025
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Aug 12, 2025
@gagantrivedi
gagantrivedi force-pushed the feat/5675-phased-rollout branch from 892355a to f7a9858 Compare August 12, 2025 11:12
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Aug 12, 2025
@gagantrivedi
gagantrivedi force-pushed the feat/5675-phased-rollout branch from 4365da4 to 0250809 Compare August 12, 2025 11:41
@gagantrivedi
gagantrivedi requested a review from Zaimwa9 August 12, 2025 11:41
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Aug 12, 2025
Zaimwa9
Zaimwa9 previously approved these changes Aug 13, 2025

@Zaimwa9 Zaimwa9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Aug 13, 2025
@gagantrivedi
gagantrivedi merged commit d52c452 into main Aug 13, 2025
29 checks passed
@gagantrivedi
gagantrivedi deleted the feat/5675-phased-rollout branch August 13, 2025 12:19
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.

3 participants