Skip to content

Commit

Permalink
gracefully handle rate-limits of snapshot.d.o
Browse files Browse the repository at this point in the history
When building the kas-container in CI, the packages are fetched from
snapshot.d.o. As this service recently applied strict rate limits
(req/s), we need to retry multiple times (with exponential backoff) to
get reliable builds.

Signed-off-by: Felix Moessbauer <[email protected]>
[Jan: fixed up typo]
Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
fmoessbauer authored and jan-kiszka committed Nov 13, 2024
1 parent 2a30644 commit 9f1c2e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=${CACHE_SHARING} \
sed -i -e '/^URIs:/d' -e 's|^# http://snapshot\.|URIs: http://snapshot.|' \
/etc/apt/sources.list.d/debian.sources; \
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/use-snapshot.conf; \
echo 'Acquire::Retries "10";' >> /etc/apt/apt.conf.d/use-snapshot.conf; \
echo 'Acquire::Retries::Delay::Maximum "600";' >> /etc/apt/apt.conf.d/use-snapshot.conf; \
fi && \
apt-get update && \
apt-get install -y locales && \
Expand Down

0 comments on commit 9f1c2e8

Please sign in to comment.