Skip to content

Commit 0ddc356

Browse files
committed
fix(ci): wait for versions json upload before dispatch
The evidence-reporter-upload-package-and-deploy and environment-reporter-upload-package-and-deploy jobs fire repository_dispatch events into other Kosli repos. Those repos dispatch onward to further downstream repos, which read lambda_layer_versions.json from S3 -- the file written by environment-reporter-upload-layer in this workflow. Until now, the two dispatching jobs only declared pre-build and goreleaser as needs, so they could run before environment-reporter-upload-layer had finished uploading lambda_layer_versions.json. Jobs at the end of the dispatch chain were intermittently failing because the file was not yet in S3; manually re-running them succeeded, since by then the upload had completed -- a clear race-condition defect. Add environment-reporter-upload-layer to the needs list for both jobs so the dispatches only fire once the file is in S3.
1 parent 2023a6e commit 0ddc356

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ jobs:
299299
client-payload: '{"kosli_cli_tag": "${{ needs.pre-build.outputs.tag }}"}'
300300

301301
evidence-reporter-upload-package-and-deploy:
302-
needs: [pre-build, goreleaser]
302+
needs: [pre-build, goreleaser, environment-reporter-upload-layer]
303303
runs-on: ubuntu-latest
304304
steps:
305305
- name: Harden Runner
@@ -316,7 +316,7 @@ jobs:
316316
client-payload: '{"kosli_cli_tag": "${{ needs.pre-build.outputs.tag }}"}'
317317

318318
environment-reporter-upload-package-and-deploy:
319-
needs: [pre-build, goreleaser]
319+
needs: [pre-build, goreleaser, environment-reporter-upload-layer]
320320
runs-on: ubuntu-latest
321321
steps:
322322
- name: Harden Runner

0 commit comments

Comments
 (0)