RFR: 8320358: GHA: ignore jdk* branches
Magnus Ihse Bursie
ihse at openjdk.org
Tue Nov 21 16:08:05 UTC 2023
On Tue, 21 Nov 2023 14:42:07 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
> At some point we are likely to use stabilization branches in the mainline jdk repo rather than a separate repo. In preparation, this PR excludes branches matching `jdk*`, like we currently do for `master` and `pr/*`.
>
> A potential drawback of doing this is that it will exclude developer branches named `jdk-8888888` or similar, using a lower-case `jdk`. Developers who want a GHA run will need to use `JDK` (uppercase) or some other prefix.
>
> This is unlikely to be a problem in practice. I checked the most recent 100 open pull requests in the `jdk` repo at the time I created this fix, and while many of them use "JDK" (upper case) as a prefix, I found none that use "jdk" (lower case).
>
>
> #### Testing
>
> I pushed the following branch that was even with `jdk:master` at the time I pushed it (thus without this fix). GHA was run as expected:
>
> * [jdk-8000000](https://github.com/kevinrushforth/jdk/tree/jdk-8000000) : [GHA run](https://github.com/kevinrushforth/jdk/actions/runs/6910232226) (NOTE: once this fix is integrated, such a branch would not get a GHA run)
>
>
> I pushed the following branches that all include this fix. GHA runs were skipped on the branches that start with `jdk` and run on the others:
>
> * [JDK-8320358](https://github.com/kevinrushforth/jdk/tree/JDK-8320358) : [GHA run](https://github.com/kevinrushforth/jdk/actions/runs/6910192534), (you can also see this from this PR's test results)
> * [gha-exclude-jdk](https://github.com/kevinrushforth/jdk/tree/gha-exclude-jdk) : [GHA run](https://github.com/kevinrushforth/jdk/actions/runs/6910204060)
> * [jdk12345](https://github.com/kevinrushforth/jdk/tree/jdk12345) : No GHA run
> * [jdk-8320358-gha](https://github.com/kevinrushforth/jdk/tree/jdk-8320358-gha) : No GHA run
Argh, the syntax is something like a glob-meets-regexp mongrel.
*: Matches zero or more characters, but does not match the / character. For example, Octo* matches Octocat.
**: Matches zero or more of any character.
?: Matches zero or one of the preceding character.
+: Matches one or more of the preceding character.
[] Matches one character listed in the brackets or included in ranges. Ranges can only include a-z, A-Z, and 0-9. For example, the range[0-9a-z] matches any digit or lowercase letter. F
That means that `jdk[0-9-]+` can not work, for including also `jdk-`. On the other hand, we can probably have two rules, one for `jdk[0-9]**` and one for `jdk-**`. But then it maybe does not make sense to "reserve" it even if it is not planned to be used.
Also note that we probably want to use `**` instead of `*`, since the latter does not match all characters. (The person coming up with this syntax must have been smoking something peculiar...)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16763#issuecomment-1821214807
More information about the build-dev
mailing list