RFR: 2451: Skara bot fails to transition bug to Resolved due to empty response from api [v2]

Erik Joelsson erikj at openjdk.org
Mon Mar 3 18:56:36 UTC 2025


On Mon, 3 Mar 2025 17:56:58 GMT, Zhao Song <zsong at openjdk.org> wrote:

>> Zhao Song has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java
>>   
>>   Co-authored-by: Erik Joelsson <37597443+erikj79 at users.noreply.github.com>
>
> issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java line 268:
> 
>> 266:                 } else {
>> 267:                     // The issue is most likely closed - skip transitioning
>> 268:                     log.warning("Can't transition the issue to Resolved or Open");
> 
> @erikj79 You suggested that 
> 
>> The else clause should at the very least log something so we know that is what happened. we should also verify that the state is either closed or resolved and throw RuntimeException if not. 
> 
> I thought about it, then I realized that the Skara bot should have already verified the state before calling Issue.setState(Issue.State.RESOLVED) like [this](https://github.com/openjdk/skara/blob/b8a99e211aae1cec3ae5b6477e9c0c91c0761284/bots/notify/src/main/java/org/openjdk/skara/bots/notify/issue/IssueNotifier.java#L211).
> 
> Also, it's will be a little hard to verify the Issue state since we need to change the interface of Issue.setState.

I think logging is good enough for now.

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

PR Review Comment: https://git.openjdk.org/skara/pull/1706#discussion_r1978020087


More information about the skara-dev mailing list