Skip to content

Commit

Permalink
chore(ci): fix and simplify concurrency groups (vectordotdev#19630)
Browse files Browse the repository at this point in the history
  • Loading branch information
neuronull authored and AndrooTheChen committed Sep 23, 2024
1 parent 786bdb7 commit 18e0ad3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/k8s_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ concurrency:
# change detection. This is a "conservative" approach that means we may have some runs that could be canceled, but it's safer than
# having user's runs canceled when they shouldn't be. In practice this shouldn't happen very often given this component does not change
# often so any increased cost from the conservative approach should be negligible.
group: ${{ github.workflow }}-${{ github.event.comment.html_url || github.event_number || github.event.merge_group.head_sha || github.event.schedule }}
group: ${{ github.workflow }}-${{ github.event.comment.html_url || github.ref || github.event.schedule }}
cancel-in-progress: true

env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/master_merge_queue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ on:
types: [checks_requested]

concurrency:
# `github.event.number` exists for pull requests, otherwise fall back to SHA for merge queue
group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }}
# `github.ref` is unique for MQ runs and PRs
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/protobuf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types: [checks_requested]

concurrency:
# `github.event.number` exists for pull requests, otherwise fall back to SHA for merge queue
group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }}
# `github.ref` is unique for MQ runs and PRs
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ on:
pull_request:

concurrency:
# In flight runs will be canceled only by re-trigger through the merge queue or if additional PR commits are pushed. The comment.html_url should always be unique.
group: ${{ github.workflow }}-${{ github.event.comment.html_url || github.event_number || github.event.merge_group.head_sha }}
# In flight runs will be canceled only by re-trigger through the merge queue or if additional PR commits are pushed.
# The comment.html_url should always be unique.
group: ${{ github.workflow }}-${{ github.event.comment.html_url || github.ref }}
cancel-in-progress: true

env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
types: [checks_requested]

concurrency:
# `github.event.number` exists for pull requests, otherwise fall back to SHA for merge queue
group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }}
# `github.ref` is unique for MQ runs and PRs
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
Expand Down

0 comments on commit 18e0ad3

Please sign in to comment.