fix: data loss when jira ticket lefts board - #129
Conversation
mfrancisc
left a comment
There was a problem hiding this comment.
Looks good, thanks for looking into it 🙏
I've left few comments.
| // CleanupStaleBoardIssues batch-checks all issues in _tool_jira_board_issues against the | ||
| // board API (100 per request via issue IN (...) JQL) and removes any that are no longer | ||
| // returned. Covers both open and closed issues that moved to a different board or team. | ||
| func CleanupStaleBoardIssues(taskCtx plugin.SubTaskContext) errors.Error { |
There was a problem hiding this comment.
is it possible to add few unit tests for this function ?
|
@mfrancisc thank you so much for your suggestions! Addressed |
|
🤖 Review · |
|
🤖 Finished Review · ✅ Success · Started 3:22 PM UTC · Completed 3:36 PM UTC |
Code Review by Qodo
1.
|
ReviewFindingsMedium
Low
Previous runReviewFindingsMedium
Low
Next steps:
Previous run (2)ReviewFindingsMedium
Low
Previous run (3)ReviewFindingsHigh
Medium
Low
Previous run (4)ReviewFindingsMedium
Low
Labels: PR fixes a data loss bug in the Jira plugin's board-issue synchronization |
|
🤖 Review · ❌ Terminated · Started 3:21 PM UTC · Ended 3:37 PM UTC |
|
Code review by qodo was updated up to the latest commit d83dfa1 |
|
🤖 Finished Review · ✅ Success · Started 3:21 PM UTC · Completed 3:37 PM UTC |
|
🤖 Review · ❌ Terminated · Started 8:51 AM UTC · Ended 9:07 AM UTC Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #129 +/- ##
=======================================
Coverage 40.80% 40.80%
=======================================
Files 147 147
Lines 10189 10189
=======================================
Hits 4158 4158
Misses 5927 5927
Partials 104 104
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Superseded by updated review
|
🤖 Finished Review · ✅ Success · Started 8:51 AM UTC · Completed 9:07 AM UTC Commit: |
|
🤖 Review · Commit: |
bec92a6 to
415cbbb
Compare
|
🤖 Finished Review · ✅ Success · Started 10:29 AM UTC · Completed 10:45 AM UTC Commit: |
mfrancisc
left a comment
There was a problem hiding this comment.
Nice job 👍
Thanks for addressing my comments and sorry for the slow review.
|
🤖 Finished Review · ✅ Success · Started 1:43 PM UTC · Completed 1:56 PM UTC Commit: |
Superseded by updated review
|
/ok-to-test |
Summary
For example, RHIDP-15165 was assigned to RHDH AI but then later to RHDH Frontend Plugins & UI and closed, but devlake didn't update it in the RHDH AI, it still keeps it there:
This happens because devlake relies on Jira's board API that only returns issues that currently belong to that board. Since RHIDP-15165 is now on board 11525, board 10725's endpoint simply won't include it in the response, so it will not update since it does not look to the previously known issues. We need a cleanup mechanism
For more info, check https://redhat-internal.slack.com/archives/C066UL7C0QH/p1783350712079609
Issue ticket number and link
DPROD-1338