- Notifications
You must be signed in to change notification settings - Fork676
fix(epics): use actual group_id for save/delete operations on nested epics#3279
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Pull Request Overview
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.
- Overrides save() and delete() methods in GroupEpic to use the epic's group_id for API path construction
- Adds helper method
_epic_path()to compute the correct API path using the epic's real group - Adds comprehensive test coverage for both unit and functional scenarios
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| 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 orlearn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
0f7065d to3e75d60CompareThere 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.
Pull Request Overview
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 orlearn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
3e75d60 to3993fe7CompareThere 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.
Pull Request Overview
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 orlearn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
3e855f3 to27bd80cCompareThere 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.
Pull Request Overview
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 orlearn how to get started.
Uh oh!
There was an error while loading.Please reload this page.
27bd80c todcc9847Comparecodecovbot commentedOct 22, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #3279 +/- ##==========================================+ Coverage 95.72% 95.73% +0.01%========================================== Files 98 98 Lines 6052 6068 +16 ==========================================+ Hits 5793 5809 +16 Misses 259 259
Flags with carried forward coverage won't be shown.Click here to find out more.
🚀 New features to boost your workflow:
|
dcc9847 tof420862CompareThere 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.
Pull Request Overview
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 orlearn how to get started.
…epicsWhen an epic belonging to a subgroup is retrieved through a parentgroup's epic listing, save() and delete() operations would fail becausethey used the parent group's path instead of the epic's actual group_id.This commit overrides save() and delete() methods in GroupEpic to usethe epic's group_id attribute to construct the correct API path, ensuringoperations work correctly regardless of how the epic was retrieved.Also add the ability to pass a custom path using `_pg_custom_path` tothe `UpdateMixin.update()` and `SaveMixin.save()` methods. This allowedthe override of the `update()` method to re-use the `SaveMixin.save()`method.Closes:#3261
f420862 toa9638eeCompare
Uh oh!
There was an error while loading.Please reload this page.
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.
This commit overrides save() and delete() methods in GroupEpic to use
the epic's group_id attribute to construct the correct API path, ensuring
operations work correctly regardless of how the epic was retrieved.
Also add the ability to pass a custom path using
_pg_custom_pathtothe
UpdateMixin.update()andSaveMixin.save()methods. This allowedthe override of the
update()method to re-use theSaveMixin.save()method.
Closes:#3261