Sorry, something went wrong.
There was a problem hiding this comment.
This PR fixes an issue where save() and delete() operations on epics retrieved through a parent group's epic listing would fail because they used the wrong group path. The fix ensures that operations use the epic's actual group_id attribute to construct the correct API path.
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| gitlab/v4/objects/epics.py | Implements the fix by overriding save() and delete() methods to use epic's group_id for path construction |
| tests/unit/objects/test_epics.py | Adds unit tests to verify save() and delete() operations use the correct group path |
| tests/functional/api/test_epics.py | Adds functional test demonstrating the fix works for nested epics accessed through parent groups |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #3279 +/- ##
==========================================
+ Coverage 92.16% 95.77% +3.61%
==========================================
Files 100 100
Lines 6125 6153 +28
==========================================
+ Hits 5645 5893 +248
+ Misses 480 260 -220
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 22 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Sorry, something went wrong.
|
FYI: This was tested and reported as working #3261 (comment) |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks @JohnVillalovos, looks good and that's a tricky one. Not sure about lazily fetched epics - just have a few questions there.
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
When an epic belonging to a subgroup is retrieved through a parent
group's epic listing, save() and delete() operations would fail because
they used the parent group's path instead of the epic's actual group_id.
Add an internal custom path hook for object save and delete operations, and let
UpdateMixin and DeleteMixin accept an explicit _custom_path keyword. GroupEpic
uses this hook to build mutation paths from the epic's server-provided group_id,
so save() and delete() target the epic's owning group.
Avoid using parent manager attrs as a fallback for the epic group path. Lazy
epics do not have a server-provided group_id, so raise a clear error instead of
silently using the parent group path.
Add unit coverage for custom update/delete paths, GroupEpic save/delete path
selection, and lazy epic path failures. Add a functional test for saving a
subgroup epic discovered through the parent group listing.
Assisted-by: OpenAI Codex (GPT-5)
Closes: #3261