Skip to content

feat: backend-clone-segments #5393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
May 26, 2025
Merged

feat: backend-clone-segments #5393

merged 42 commits into from
May 26, 2025

Conversation

Zaimwa9
Copy link
Contributor

@Zaimwa9 Zaimwa9 commented Apr 25, 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

This PR implements the backend cloning/duplication of segments

  • New CloneSegmentSerializer, requiring a name and performing the duplication
  • New endpoint /api/v1/projects/{projectId}/segments/{segmentId}/clone/ accepting a (required) name as body payload
  • Metadata new method deep_clone_for_new_entity, taking an entity (segment/env/feature) to deep clone and create the related new metadata

How did you test this code?

  • New tests
  • Postman requests
  • Fullstack branch feat/clone-segments-and-feature-segments

Project Segment creation
https://www.loom.com/share/27ec8d4a2d8d4c24b443ac5d2b12231e?focus_title=1&muted=1&from_recorder=1

Feature specific segment creation
https://www.loom.com/share/8cc4d8e92ce84c459dfb6598ebb42acb

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner April 25, 2025 14:31
@Zaimwa9 Zaimwa9 requested review from gagantrivedi and removed request for a team April 25, 2025 14:31
Copy link

vercel bot commented Apr 25, 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 May 26, 2025 7:46am
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview May 26, 2025 7:46am
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview May 26, 2025 7:46am

@Zaimwa9 Zaimwa9 marked this pull request as draft April 25, 2025 14:31
@github-actions github-actions bot added api Issue related to the REST API feature New feature or request labels Apr 25, 2025
Copy link
Contributor

github-actions bot commented Apr 25, 2025

Docker builds report

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

Copy link
Contributor

github-actions bot commented Apr 25, 2025

Uffizzi Ephemeral Environment Deploying

☁️ https://app.uffizzi.com/github.com/Flagsmith/flagsmith/pull/5393

⚙️ Updating now by workflow run 15249039850.

What is Uffizzi? Learn more!

@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Apr 25, 2025
Copy link

codecov bot commented Apr 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.66%. Comparing base (a0e7c5b) to head (a345e36).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #5393    +/-   ##
========================================
  Coverage   97.65%   97.66%            
========================================
  Files        1235     1237     +2     
  Lines       43334    43473   +139     
========================================
+ Hits        42317    42456   +139     
  Misses       1017     1017            

☔ 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 Apr 25, 2025
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Apr 25, 2025
@github-actions github-actions bot removed the feature New feature or request label Apr 25, 2025
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels May 22, 2025
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels May 22, 2025
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels May 23, 2025
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels May 23, 2025
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels May 23, 2025
Copy link
Contributor

@emyller emyller left a comment

Choose a reason for hiding this comment

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

Looking great. A few minor adjustments needed — sorry we didn't have time while pairing today, but we're close!

@Zaimwa9 Zaimwa9 requested a review from emyller May 26, 2025 07:45
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels May 26, 2025
Copy link
Contributor

@emyller emyller left a comment

Choose a reason for hiding this comment

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

LGTM

@Zaimwa9 Zaimwa9 merged commit 365ad46 into main May 26, 2025
32 checks passed
@Zaimwa9 Zaimwa9 deleted the feat/backend-clone-segments branch May 26, 2025 14:02
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.

4 participants