Skip to content

Conversation

@jormundur00
Copy link
Member

What does this PR do?

This PR introduces automatic closing of open GitHub pre-release version issues generated by automation, when the corresponding full release version becomes available.

The workflow step closes issues in two situations:

  1. If a test fails for the full version (and we open an issue for that version), we close the pre-release issue for that version.
  2. If a test passes for a full release version and a pre-release issue exists for that version, we close the pre-release issue.

The changes to the workflow have been tested on a fork. Examples of both situations can be found here:

  1. Situation 1: pre-release issue closed when full version fails
  2. Situation 2: pre-release issue closed when full version passes

The new workflow step uses the same regex logic when looking for pre-release versions as it does in the tests/tck-build-logic/src/main/java/org/graalvm/internal/tck/TestedVersionUpdaterTask.java, just converted to a bash compatible regex.

Fixes: #807

…-release issues when full release is present
@jormundur00 jormundur00 requested a review from vjovanov November 25, 2025 14:19
@jormundur00 jormundur00 self-assigned this Nov 25, 2025
@jormundur00 jormundur00 added the enhancement New feature or request label Nov 25, 2025
@jormundur00 jormundur00 requested a review from kimeta November 25, 2025 14:19
if [[ -z "$VERSION" ]]; then continue; fi
# Parse version
VERSION_REGEX="^([0-9]+(\.[0-9]+)*)(\.Final)?([-.](alpha[0-9]*|beta[0-9]*|rc[0-9]*|cr[0-9]*|m[0-9]+|ea[0-9]*|b[0-9]+|[0-9]+|preview)([-.].*)?)?$"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reuse this regex?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the PRE_RELEASE_SUFFIX to be an env var, and then we reuse it when creating VERSION_REGEX.

If you meant reuse it from the gradle tasks where we use it, I don't believe we can, as we don't have a way to extract it to bash (and bash uses slightly different regex syntax).

continue
fi
PRE_RELEASE_SUFFIX="(alpha[0-9]*|beta[0-9]*|rc[0-9]*|cr[0-9]*|m[0-9]+|ea[0-9]*|b[0-9]+|[0-9]+|preview)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These regexes should be in one place.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PRE_RELEASE_SUFFIX is now moved to the env vars. PRE_RELEASE_REGEX is constructed only after VERSION_REGEX successfully matches, because we need the parsed base version before we can build the PRE_RELEASE_REGEX used to match issues.

@jormundur00 jormundur00 merged commit 4bfa6d6 into master Dec 4, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Automatically close RC (and friends) tickets for a library when the new version exists

2 participants