RFR: 1608: Handle shenandoah tags in IssueNotifier

Erik Joelsson erikj at openjdk.org
Mon Oct 31 22:07:05 UTC 2022

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 a tag when matching it to the fixVersion. 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.


Commit messages:
 - SKARA-1608

Changes: https://git.openjdk.org/skara/pull/1406/files
 Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1406&range=00
  Issue: https://bugs.openjdk.org/browse/SKARA-1608
  Stats: 149 lines in 6 files changed: 134 ins; 0 del; 15 mod
  Patch: https://git.openjdk.org/skara/pull/1406.diff
  Fetch: git fetch https://git.openjdk.org/skara pull/1406/head:pull/1406

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

More information about the skara-dev mailing list