RFR: 1914: IssuePoller always returns the most recently updated issue even if it has already been handled [v3]

Zhao Song zsong at openjdk.org
Mon May 22 16:16:33 UTC 2023

On Fri, 19 May 2023 23:18:50 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> When I was testing with [SKARA-1912](https://bugs.openjdk.org/browse/SKARA-1912), I observed an issue in the IssuePoller. Although some updated csr issues has been handled in the previous round, the most recently updated csr issue would be returned again in the next round. Therefore, this would trigger the CSRIssueWorkItem and CheckWorkItem to update the PR very frequently. 
>> Erik investigated it and found the root cause. 
>> In the IssuePoller#updatedIssues, the poller first queries for updated issues (which may include some handled issues due to the imprecise timestamp, measured in minutes). Subsequently, the poller checks whether the issues have been really updated by comparing them with their copies using JiraIssue#equals. In this method, we compare the json of the issue with our own copy. If the issues are really updated, the poller returns them. 
>> Originally, the JiraIssue#equals method worked well. However, now, when the poller uses the REST API to retrieve the JSON of the issue, it includes a field called "customfield_11700," which represents the "Development" field used by Jira to display data quickly and easily in the issues. Within this field, there are various objects, such as "[SummaryItemBean at 5e105688](mailto:SummaryItemBean at 5e105688)." These objects change each time the poller makes a query. Therefore, even if the issue has not actually been updated, the JiraIssue#equals method will return false.
>> In this patch, some fields will be filtered out before comparing the jsons.
> Zhao Song has updated the pull request incrementally with one additional commit since the last revision:
>   fix test

Thanks for the review!


PR Comment: https://git.openjdk.org/skara/pull/1522#issuecomment-1557516999

More information about the skara-dev mailing list