Skip to content

Commit 1db78c2

Browse files
authored
Merge pull request #935 from durable-workflow/rust-325-cell-pull-retry
CI: retry digest-pinned image pulls in the codec deadline cells
2 parents 3bad91f + e3be66e commit 1db78c2

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎scripts/conformance/server-parity/codec-operations-cell.sh‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,25 @@ if test -n "${GITHUB_RUN_ID:-}"; then
3434
revision=$(git rev-parse HEAD)
3535
jq -e --arg revision "$revision" '.source_revision==$revision' "$binary/build.json" >/dev/null
3636
fi
37+
# Every image is pinned by digest, so pulling again is safe. The registry
38+
# mirror sometimes fails to serve one blob for a few minutes ("could not fetch
39+
# content descriptor"); retry before a cell fails on that.
40+
pull_pinned() {
41+
local attempt
42+
for attempt in 1 2 3 4; do
43+
if docker pull --quiet "$1" >/dev/null; then
44+
return 0
45+
fi
46+
echo "::warning::Pull of $1 failed (attempt $attempt of 4)" >&2
47+
if test "$attempt" -lt 4; then sleep $((attempt * 15)); fi
48+
done
49+
return 1
50+
}
51+
pull_pinned "$runtime"
52+
pull_pinned "$observer_image"
53+
if test "$connection" != sqlite; then
54+
pull_pinned "$(jq -r '.image' <<< "$database")"
55+
fi
3756
native_server="$scope-native"
3857
db="$scope-db"
3958
probe="$scope-ready"

0 commit comments

Comments
 (0)