Skip to content

Commit 52c2c9d

Browse files
committed
Prevent a the new workflows from running concurrently
The newly-added workflows update global state. This global state is held in Git notes in the `gitgitgadget/git` repository and is updated in reaction to updates to the Git mailing list mirror and to the `seen` branch. While there is now logic in GitGitGadget's Git notes handling to allow for "distributed updates", it makes more sense to hold off from trying to perform (nearly-)identical updates in parallel. Note: In the case of `handle-pr-comment` and `handle-pr-push`, let's be mindful that it should be possible to handle different PRs concurrently, which is definitely a change of behavior from the current Azure Pipelines setup, where only one job can be run at any given time, _across_ Azure Pipelines (for example, a lengthy `Update GitGitGadget's PRs` run can easily delay any `/submit` from being processed). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 81a4f4d commit 52c2c9d

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

.github/workflows/handle-new-mails.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
# GitGitGadget's GitHub App is expected to trigger this on `git-mailing-list-mirror` updates
55
workflow_dispatch:
66

7+
concurrency:
8+
group: ${{ github.workflow }}
9+
710
jobs:
811
handle-new-mails:
912
runs-on: ubuntu-latest

.github/workflows/handle-pr-comment.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
env:
1414
PR_COMMENT_URL: ${{ inputs.pr-comment-url }}
1515

16+
concurrency:
17+
group: ${{ github.workflow }}-${{ inputs.pr-comment-url }}
18+
1619
jobs:
1720
handle-pr-comment:
1821
runs-on: ubuntu-latest

.github/workflows/handle-pr-push.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
env:
1414
PR_URL: ${{ inputs.pr-url }}
1515

16+
concurrency:
17+
group: ${{ github.workflow }}-${{ inputs.pr-url }}
18+
1619
jobs:
1720
handle-pr-push:
1821
runs-on: ubuntu-latest

.github/workflows/update-mail-to-commit-notes.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
# GitGitGadget's GitHub App is expected to trigger this on `seen` updates
66
workflow_dispatch:
77

8+
concurrency:
9+
group: ${{ github.workflow }}
10+
811
jobs:
912
update-mail-to-commit-notes:
1013
runs-on: ubuntu-latest

.github/workflows/update-prs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
# GitGitGadget's GitHub App is expected to trigger this on `seen` updates
55
workflow_dispatch:
66

7+
concurrency:
8+
group: ${{ github.workflow }}
9+
710
jobs:
811
update-prs:
912
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)