fix(ci): wait for versions json upload before dispatch#835
Conversation
|
Claude finished @mbevc1's task in 1m 48s —— View job PR Review: fix(ci): wait for versions json upload before dispatch
Static AnalysisAll green — ReviewThe fix is correct and well-scoped. The two dispatch jobs ( A few observations:
VerdictNo issues found. Clean, minimal, correct fix for a real race condition. LGTM. |
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.
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.