Skip to content

Commit 9d18ee9

Browse files
authored
Hard code workflow name and cancel-in-progress only for PRs (#23431)
This changes the names of concurrency groups in most of our workflows to use their hard-coded names instead of the name of the workflow that triggered them (e.g. `build-wasm-...` and `build-binaries-...` instead of `Release -...` for both). Hopefully this will reduce the number of times the jobs butt heads. I did not make this change for the CI workflow or for the Daily Fuzz workflow since it didn't seem relevant for those, but let me know if I should.
1 parent 7cc15f0 commit 9d18ee9

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

.github/workflows/build-binaries.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ on:
2020
- .github/workflows/build-binaries.yml
2121

2222
concurrency:
23-
group: ${{ github.workflow }}-${{ github.ref }}
24-
cancel-in-progress: true
23+
group: build-binaries-${{ github.ref }}
24+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2525

2626
permissions: {}
2727

.github/workflows/build-wasm.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ on:
1515
- .github/workflows/build-wasm.yml
1616

1717
concurrency:
18-
group: ${{ github.workflow }}-${{ github.ref }}
19-
cancel-in-progress: true
18+
group: build-wasm-${{ github.ref }}
19+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2020

2121
permissions: {}
2222

.github/workflows/memory_report.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ on:
2525
- "!crates/ty_python_semantic/resources/corpus/**"
2626

2727
concurrency:
28-
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
29-
cancel-in-progress: true
28+
group: memory-report-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
29+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3030

3131
env:
3232
CARGO_INCREMENTAL: 0

.github/workflows/mypy_primer.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ on:
2525
- "!crates/ty_python_semantic/resources/corpus/**"
2626

2727
concurrency:
28-
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
29-
cancel-in-progress: true
28+
group: mypy-primer-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
29+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3030

3131
defaults:
3232
run:

.github/workflows/publish-ty-playground.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ on:
1515
- ".github/workflows/publish-ty-playground.yml"
1616

1717
concurrency:
18-
group: ${{ github.workflow }}-${{ github.ref_name }}
19-
cancel-in-progress: true
18+
group: publish-ty-playground-${{ github.ref_name }}
19+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
2020

2121
env:
2222
CARGO_INCREMENTAL: 0

.github/workflows/ty-ecosystem-analyzer.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ on:
1313
- reopened
1414

1515
concurrency:
16-
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
17-
cancel-in-progress: true
16+
group: ty-ecosystem-analyzer-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
17+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1818

1919
env:
2020
CARGO_INCREMENTAL: 0

.github/workflows/typing_conformance.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ on:
2525
- "!crates/ty_python_semantic/resources/corpus/**"
2626

2727
concurrency:
28-
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
29-
cancel-in-progress: true
28+
group: typing-conformance-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
29+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3030

3131
env:
3232
CARGO_INCREMENTAL: 0

0 commit comments

Comments
 (0)