fix(GitLab): Orphaned feature tag after unlinking an issue or merge request#7327
fix(GitLab): Orphaned feature tag after unlinking an issue or merge request#7327
Conversation
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
Docker builds report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7327 +/- ##
=======================================
Coverage 98.42% 98.42%
=======================================
Files 1391 1392 +1
Lines 52219 52270 +51
=======================================
+ Hits 51396 51447 +51
Misses 823 823 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Visual Regression16 screenshots compared. See report for details. |
3cc29b8 to
29e523a
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
29e523a to
af0e733
Compare
There was a problem hiding this comment.
Sorry, something smells in the architecture of this.
For instance, I don't like that we import the component clear_tag_for_resource, having such a generic name, into integration.vcs, but it's from GitLab domain. And I don't think the fix here is to rename GitLab service functions with a gitlab_ namespace — although that would be cool since they're exported out of integrations.gitlab it seems?
I think we should define a protocol/interface (via OOP?) that clears out the list of all use cases involved in linking to GitHub and GitLab currently, allowing us to class BitBucketService(VCSIntegrationService): later. This part might fall into the scope of #7315.
I appreciate this should have been raised in #7162, but I was not around, sorry.
af0e733 to
1eb0656
Compare
… request Follow-up to #7306. Linking a feature applied a GitLab tag; unlinking left it on the feature with no corresponding FER. Add clear_tag_for_resource in the tagging service and call it from dispatch_vcs_on_resource_destroy. It removes the Issue/MR-kind tag from the feature only when no other linked FER of the same kind remains, so features linked to several issues (or both an issue and an MR) keep the still-valid tag. The helper excludes `resource.pk` from its survivor query so it works whether the caller has already destroyed the row or not.
1eb0656 to
3847cc6
Compare
emyller
left a comment
There was a problem hiding this comment.
Looks great now. Thank you!
Thanks for submitting a PR! Please check the boxes below:
I have added information todocs/if required so people know about the feature.Changes
Follow-up to #7306.
Linking a feature to a GitLab issue or merge request applies a GitLab tag (e.g.
Issue Open,MR Draft). Unlinking left that tag on the feature with no correspondingFeatureExternalResource.Introduce
clear_tag_for_resourcein the GitLab tagging service and wire it intodispatch_vcs_on_resource_destroy. It removes the Issue/MR-kind tag from the feature only when no other linked FER of the same kind remains — features linked to several issues, or to both an issue and an MR, keep the still-valid tag. The helper excludesresource.pkfrom its survivor query so it's safe to call regardless of whether the caller has already destroyed the row.Review effort: 1/5
How did you test this code?
Unit tests for the new helper cover: