-
Notifications
You must be signed in to change notification settings - Fork 375
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
feat: Create change requests for segments #4265
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Ephemeral Environment
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4265 +/- ##
==========================================
+ Coverage 97.33% 97.35% +0.02%
==========================================
Files 1182 1187 +5
Lines 41267 41245 -22
==========================================
- Hits 40167 40156 -11
+ Misses 1100 1089 -11 ☔ View full report in Codecov by Sentry. |
Ok it took a while, but I've updated the repo with references to the flagsmith-common repo and of course removed the now unnecessary code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few minor comments
@@ -196,7 +196,7 @@ flagsmith-ldap = { git = "https://github.com/flagsmith/flagsmith-ldap", tag = "v | |||
optional = true | |||
|
|||
[tool.poetry.group.workflows.dependencies] | |||
workflows-logic = { git = "https://github.com/flagsmith/flagsmith-workflows", tag = "v2.5.0" } | |||
workflows-logic = { git = "https://github.com/flagsmith/flagsmith-workflows", branch = "feat/add_change_requests_to_segments" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a reminder that we'll need to update this before the merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good to me now - there's just the (new?) conflicts to resolve, and the CI failures.
Conflicts and CI failures have been resolved. Are we good to merge (other than the update to the workflows repo which needs to be merged itself)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving this now, but we need to consider the release plan as this is quite a meaty change. It will need a fair amount of regression testing in staging.
Changes
This PR works in concert with this other PR on the workflows repo.
This PR introduces many changes to support the addition of segments in change requests. The primary logic around transferring change request segment data into the target segment data involves re-using logic that was originally written for the segment versioning.
Due to the primary manager (
.objects
) now including versioned or change requested segments copies, some amount of work was necessary to get all the aspects of the existing code to pass. The.live_objects
manager is used for segments that are not merely versions or change request segments but in some places manually filtering segments was the only solution.How did you test this code?
Added tests across the test suite, including new tests for duplicate segments to test filtering, as well as tests located in with the other workflows PR to get coverage of edge cases.