Skip to content

Commit

Permalink
use head sha not base for merge queue concurrency check
Browse files Browse the repository at this point in the history
  • Loading branch information
neuronull committed May 26, 2023
1 parent 6266cc3 commit 2df9e86
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

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.base_sha }}
group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }}
cancel-in-progress: true

env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/k8s_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
- cron: '0 0 * * 2-6'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.event.comment.html_url || github.event.merge_group.base_sha || github.event.schedule || github.sha }}
group: ${{ github.workflow }}-${{ github.event.number || github.event.comment.html_url || github.event.merge_group.head_sha || github.event.schedule || github.sha }}

cancel-in-progress: true

Expand Down
20 changes: 1 addition & 19 deletions .github/workflows/master_merge_queue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

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.base_sha }}
group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }}
cancel-in-progress: true

env:
Expand Down Expand Up @@ -106,24 +106,6 @@ jobs:
needs: changes
secrets: inherit

# TODO: in a followup PR, run the regression workflow here, as a single reusable workflow.
#
# NOTE: This design of passing in the pr-number to the Regression workflow requires that the merge queue
# be configured contain a maximum of one PR per execution. This is so that the regression report generated
# by the workflow can be posted as a comment to the PR.
# At a later time, we may want to revisit this in order to allow multiple PRs to be included in a merge
# queue execution. At such time, the logic of uploading of the report will need to change to account for
# multiple PRs.
# regression:
# if: needs.changes.outputs.source == 'true'
# uses: ./.github/workflows/regression.yml
# with:
# pr_number: ${{ needs.changes.outputs.pr-number }}
# base_sha: ${{ github.event.merge_group.base_sha }}
# head_sha: ${{ github.event.merge_group.head_sha }}
# needs: changes
# secrets: inherit

master-merge-queue-check:
name: Master Merge Queue Suite
# Always run this so that pull_request triggers are marked as success.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.merge_group.base_sha || github.sha }}
group: ${{ github.workflow }}-${{ github.event.merge_group.head_sha || github.sha }}
cancel-in-progress: true

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

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.base_sha }}
group: ${{ github.workflow }}-${{ github.event.number || github.event.merge_group.head_sha }}
cancel-in-progress: true

env:
Expand Down

0 comments on commit 2df9e86

Please sign in to comment.