Integrated: 1914: IssuePoller always returns the most recently updated issue even if it has already been handled

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


On Fri, 19 May 2023 18:16:24 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.

This pull request has now been integrated.

Changeset: 63d149ad
Author:    Zhao Song <zsong at openjdk.org>
URL:       https://git.openjdk.org/skara/commit/63d149adb0a4b4640875f9a6462f6bc2c5f60340
Stats:     63 lines in 5 files changed: 56 ins; 0 del; 7 mod

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

Reviewed-by: erikj

-------------

PR: https://git.openjdk.org/skara/pull/1522


More information about the skara-dev mailing list