Skip to content

Commit 2e5287a

Browse files
authored
ci: Fix incorrect cancellation and host reporting (#4385)
1 parent 0827e35 commit 2e5287a

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/ci-host.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
name: Build test web assets
7474
uses: ./.github/workflows/test-web-assets.yaml
7575
with:
76+
caller: ci-host
7677
skip_catalog: true
7778
concurrency:
7879
group: ci-host-test-web-assets-${{ github.head_ref || github.run_id }}
@@ -317,7 +318,7 @@ jobs:
317318

318319
host-merge-reports-and-publish:
319320
name: Merge Host reports and publish
320-
if: ${{ !cancelled() }}
321+
if: ${{ !cancelled() && (needs.host-test.result == 'success' || needs.host-test.result == 'failure') }}
321322
concurrency:
322323
group: host-merge-reports-and-publish-${{ github.head_ref || github.run_id }}
323324
cancel-in-progress: true

.github/workflows/ci-software-factory.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
test-web-assets:
3636
name: Build test web assets
3737
uses: ./.github/workflows/test-web-assets.yaml
38+
with:
39+
caller: ci-software-factory
3840

3941
software-factory-test:
4042
name: Software Factory Tests

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ jobs:
121121
needs: change-check
122122
if: needs.change-check.outputs.boxel == 'true' || needs.change-check.outputs.boxel-ui == 'true' || needs.change-check.outputs.matrix == 'true' || needs.change-check.outputs.realm-server == 'true' || needs.change-check.outputs.vscode-boxel-tools == 'true' || needs.change-check.outputs.workspace-sync-cli == 'true' || github.ref == 'refs/heads/main' || needs.change-check.outputs.run_all == 'true'
123123
uses: ./.github/workflows/test-web-assets.yaml
124+
with:
125+
caller: ci
124126
concurrency:
125127
group: ci-test-web-assets-${{ github.head_ref || github.run_id }}
126128
cancel-in-progress: true

.github/workflows/test-web-assets.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Build Test Web Assets
33
on:
44
workflow_call:
55
inputs:
6+
caller:
7+
description: Unique identifier for the calling workflow (used in concurrency group to prevent cross-workflow cancellation)
8+
required: true
9+
type: string
610
skip_catalog:
711
description: Build host test assets with catalog skipped
812
required: false
@@ -24,7 +28,7 @@ jobs:
2428
name: Build and cache test web assets
2529
runs-on: ubuntu-latest
2630
concurrency:
27-
group: test-web-assets-${{ github.ref }}-${{ github.sha }}
31+
group: test-web-assets-${{ inputs.caller }}-${{ github.ref }}-${{ github.sha }}
2832
cancel-in-progress: false
2933

3034
outputs:

0 commit comments

Comments
 (0)