RFR: 2226: Make it possible to avoid "forward backports"
Erik Duveblad
ehelin at openjdk.org
Wed Apr 24 14:45:37 UTC 2024
On Fri, 12 Apr 2024 18:08:17 GMT, Zhao Song <zsong at openjdk.org> wrote:
>> Hi all,
>>
>> please review this re-implementation of avoiding so called "forward backports", this time around in the `IssueNotifier`, meaning that Skara will avoid to create a "forward backport" _after_ a pull request has been integrated. Solving the problem in the `IssueNotifier` turned out to be a much more natural fit, so thanks @zhaosongzs and @erikj79 for the discussion in #1630.
>>
>> The new implementation will avoid creating a "foward backport" if _no_ suitable backport (or "forward backport") is found. That is, if JBS already contains a backport (or "forward backport") that can be used, then that backport (or "forward backport") will be used. This makes sense to me because in this scenario the user has (most likely) set up the issues in JBS for this to happen. But when Skara decides to create a _new_ backport, then (if `"avoidforwardports"` is `true` in the configuration) the code will never create "forward backport", instead opting to create a backport with the primary issue's `fixVersions` and setting `fixVersions` of the primary issue to the value found in the repository's `.jcheck/conf`.
>>
>> I also added a number of new unit tests. Note that this pull request depends on #1636 in order for the tests to pass, so the tests will fail until #1636 is integrated.
>>
>> Thanks,
>> Erik
>
> bots/notify/src/test/java/org/openjdk/skara/bots/notify/issue/IssueNotifierTests.java line 2330:
>
>> 2328: issue.setProperty("priority", JSON.of("1"));
>> 2329: issue.addLabel("test");
>> 2330: issue.addLabel("temporary");
>
> In this case, maybe it's better to set the main issue as RESOLVED
Why? I want to check that the main issue remains open and that a backport is created? The `RESOLVED_IN_BUILD` property is set to verify that certain custom properties aren't propagating IIRC.
> bots/notify/src/test/java/org/openjdk/skara/bots/notify/issue/IssueNotifierTests.java line 2462:
>
>> 2460: issue.addLabel("temporary");
>> 2461:
>> 2462: // Create an explicit "forwardport"
>
> Should be `Create an explicit "backport"`
Thanks, will fix 👍
-------------
PR Review Comment: https://git.openjdk.org/skara/pull/1637#discussion_r1578016169
PR Review Comment: https://git.openjdk.org/skara/pull/1637#discussion_r1578016745
More information about the skara-dev
mailing list