RFR: 1608: Handle shenandoah tags in IssueNotifier

Magnus Ihse Bursie ihse at openjdk.org
Tue Nov 8 09:09:27 UTC 2022

On Mon, 31 Oct 2022 22:03:19 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> This patch aims to add support for notifying JBS when tags are added in the shenandoah-jdk8u repository. This repository is special because it's a jdk8u 'project' repo that is never going to be merged upstream. Instead it's a downstream repo that produces its own releases. Because of this it has its own fixVersion configured in .jcheck/conf and its own tag format, to keep them apart from the main JDK jdk8u tags.
> The logic for matching fixVersions and tags is already a bit convoluted due to conventions that have been added over time. This repo will now add another matching rule. A typical fixVersion would be `shenandoah8u332` and a corresponding tag `shenandoah8u332-b01`. This is actually a pretty neat pattern to match for as the tag prefix is exactly the fixVersion, which is why I agreed to implement support for this. The complicating factors are that for mainline OpenJDK jdk8u we have fixVersion `openjdk8u332` and tag `jdk8u332-b01` (and for Oracle jdk8u the fixVersion is `8u332` but with the same tag format). This special handling of a 'jdk' prefix for a tag, and ignoring any prefix in the fixVersion is what complicates things.
> So currently we ignore any prefix before the main version number in both a tag and fixVersion when matching them. For shenandoah-jdk8u we want to exactly match this prefix. To handle this, I've added a new configuration option for the notifier:
> "issue": {  // existing config element
>   "tag": {  // existing config element
>     "matchprefix": true  // new
>   }
> }
> The default value for this option is `false` to reflect the current behavior. When set true, a fixVersion and tag version must match exactly. Note though that the special handling of the tag prefix 'jdk' will still be at play due to the way OpenJDKTag currently parses a JdkVersion from a tag, and I don't dare changing it. This means that if this option is set, then a fixVersion `8u332` will match tags `jdk8u332-b01` and `8u332-b01`, but a fixVersion `jdk8u332` would not match the tag `jdk8u332-b01`. We don't currently use the 'jdk' prefix in any fixVersions in JBS, so this should be fine. I just want to make it clear.

Looks good, as far as I can tell. I agree with Erik that here be worms (and dragons). I wish it were possible to get a organization-wide grip on the problem and reorganize the principles behind tags, but I realize how futile such a wish is...


Marked as reviewed by ihse (Reviewer).

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

More information about the skara-dev mailing list