Skip to content

Commit 5857ea8

Browse files
authored
fix: jitter Docker build startup (#3646)
ECR Public will throttle to 1 image pull/second. Since we start multiple workflows in parallel, make sure they don't all pull from ECR Public at the exact same time by jittering their start times. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
1 parent 3fda710 commit 5857ea8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/docker-images.yml

+7
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ jobs:
8282
${{ runner.os }}-buildx-${{ hashFiles('superchain/*') }}-
8383
${{ runner.os }}-buildx-
8484
85+
# 1 pull per second from ECR Public
86+
- name: Jitter the start time to avoid ECR Public throttling
87+
id: sleep-start
88+
if: steps.should-run.outputs.result == 'true'
89+
run: |-
90+
sleep $((RANDOM % 60))
91+
8592
- name: Determine build time
8693
id: build-time
8794
if: steps.should-run.outputs.result == 'true'

0 commit comments

Comments
 (0)