Skip to content

Retry presto-deps dependency downloads on transient network failures - #359

Open
Avinash-Raj wants to merge 1 commit into
mainfrom
retry-presto-deps-network-downloads
Open

Retry presto-deps dependency downloads on transient network failures#359
Avinash-Raj wants to merge 1 commit into
mainfrom
retry-presto-deps-network-downloads

Conversation

@Avinash-Raj

@Avinash-Raj Avinash-Raj commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

The presto-deps image build runs many unguarded curl/wget/dnf downloads from upstream Presto/Velox setup scripts, which intermittently fail on transient network blips. Inject retry/timeout config into the staged dependency Dockerfile so those downloads become resilient without forking the upstream scripts:

  • CURL_OPTIONS (honoured by velox's wget_and_untar) for curl tarball fetches
  • dnf.conf retries/timeout/minrate for dnf installs (incl. the CUDA repo)
  • /etc/wgetrc tries/wait,retry for direct wget downloads

A grep guard fails the step loudly if the upstream Dockerfile anchor changes.

This failure should be addressed by this PR, which allows the curl command to retry on network failures.

@Avinash-Raj
Avinash-Raj requested a review from a team as a code owner June 9, 2026 11:50
@Avinash-Raj
Avinash-Raj requested a review from bdice June 9, 2026 11:50
# - /etc/wgetrc covers the remaining direct `wget` downloads (e.g. minio)
dockerfile=presto-deps-context/scripts/dockerfiles/centos-dependency.dockerfile
sed -i \
-e '/^ENV UCX_VERSION/a ENV CURL_OPTIONS="--retry 5 --retry-delay 5 --retry-all-errors --retry-connrefused --connect-timeout 30"' \

@Avinash-Raj Avinash-Raj Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this append happens after ENV UCX_VERSION line and we believe that the line should always be exists on the presto's centos deps dockerfile.

-e '/^ENV UCX_VERSION/a ENV CURL_OPTIONS="--retry 5 --retry-delay 5 --retry-all-errors --retry-connrefused --connect-timeout 30"' \
-e '/^ENV UCX_VERSION/a RUN { echo retries=10; echo timeout=60; echo minrate=500; } >> /etc/dnf/dnf.conf && { echo tries=5; echo timeout=30; echo waitretry=5; echo retry_connrefused=on; echo read_timeout=300; } >> /etc/wgetrc' \
"$dockerfile"
grep -q '^ENV CURL_OPTIONS=' "$dockerfile" || { echo "::error::failed to inject network-retry config (anchor 'ENV UCX_VERSION' not found in upstream dockerfile)"; exit 1; }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Else it won't build the deps image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant