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

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

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 Apr 28, 2025 10:16am
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Apr 28, 2025 10:16am
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Apr 28, 2025 10:16am

@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-frontend:pr-5393 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-5393 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-5393 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-5393 Finished ✅ Results

Copy link
Contributor

github-actions bot commented Apr 25, 2025

Uffizzi Ephemeral Environment deployment-63156

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

📄 View Application Logs etc.

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.62%. Comparing base (8dc92c3) to head (682fd2b).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #5393    +/-   ##
========================================
  Coverage   97.61%   97.62%            
========================================
  Files        1237     1238     +1     
  Lines       42975    43075   +100     
========================================
+ Hits        41952    42052   +100     
  Misses       1023     1023            

☔ 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 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 Apr 28, 2025
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Apr 28, 2025
@Zaimwa9 Zaimwa9 marked this pull request as ready for review April 28, 2025 10:15
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Apr 28, 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.

1 participant