Integrated: 8282225: GHA: Allow one concurrent run per PR only

Aleksey Shipilev shade at openjdk.java.net
Wed Feb 23 12:36:55 UTC 2022


On Tue, 22 Feb 2022 07:05:40 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Since last year, GHA allows concurrency control over GHA runs:
>  https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/
>  https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
> 
> Our GHA workflows trigger on every PR update, sometimes doing multiple runs per PR. This is seldom useful and wastes resources with our very large jobs. For example, one can push a commit, quickly realize there is a mistake, push another commit, and this would do *two* GHA runs, both taking many hours.
> 
> I think we can say that only one run per branch is good, and all running/pending runs should be cancelled when a new run starts.
> 
> Additional testing:
>  - [x] Verified queued run gets cancelled on new commit
>  - [x] Verified in-progress run gets cancelled on new commit
>  - [x] Verified in-progress run gets cancelled on merge
>  - [x] Verified in-progress run gets cancelled on rebase + force-push

This pull request has now been integrated.

Changeset: aaab2cb4
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/aaab2cb41666af8520fd01de70e2c4f9c87ef5fd
Stats:     4 lines in 1 file changed: 4 ins; 0 del; 0 mod

8282225: GHA: Allow one concurrent run per PR only

Reviewed-by: ihse

-------------

PR: https://git.openjdk.java.net/jdk/pull/7570



More information about the build-dev mailing list