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

Zhao Song zsong at openjdk.org
Fri May 19 23:18:50 UTC 2023

> 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


  - all: https://git.openjdk.org/skara/pull/1522/files
  - new: https://git.openjdk.org/skara/pull/1522/files/16ff6694..dd45d5b0

 - full: https://webrevs.openjdk.org/?repo=skara&pr=1522&range=02
 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1522&range=01-02

  Stats: 16 lines in 2 files changed: 8 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/skara/pull/1522.diff
  Fetch: git fetch https://git.openjdk.org/skara.git pull/1522/head:pull/1522

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

More information about the skara-dev mailing list