From fb919b97d561825571e66f081f25603c2fa3e274 Mon Sep 17 00:00:00 2001 From: JuliaEdom Date: Mon, 20 Jul 2026 21:33:43 +0300 Subject: [PATCH] ci(flink-image): abort throttled archive.apache.org downloads instead of hanging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The flink binary tarball comes from archive.apache.org, which throttles aggressively; a wedged connection produces zero curl output and the image build hung 10-30 min on four flink-smoke runs today (#213/#218/#219/#220 lanes) — always right after the ca-certificates layer, i.e. at this curl. Speed guard: abort any transfer below 64 KB/s for 60 s, retry up to 5 times; combined with the bounded build from #220 the lane now self-heals. Co-Authored-By: Claude Fable 5 --- src/processing/flink_jobs/Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/processing/flink_jobs/Dockerfile b/src/processing/flink_jobs/Dockerfile index 6a4f249c..56334c47 100644 --- a/src/processing/flink_jobs/Dockerfile +++ b/src/processing/flink_jobs/Dockerfile @@ -13,12 +13,18 @@ ARG PYFLINK_KAFKA_JAR_VERSION=5.0.0-2.2 # away from the Flink binary distribution version above. COPY processing/flink_jobs/requirements.txt /tmp/flink-requirements.txt +# archive.apache.org throttles aggressively and a wedged connection produces +# zero curl output — CI builds hung here for 10-30 min (flink-smoke #213/#218/ +# #219/#220 lanes). The speed guard aborts any transfer crawling below 64 KB/s +# for 60 s and retries, so a throttled mirror fails fast instead of hanging. +ARG CURL_GUARDS="--connect-timeout 30 --speed-limit 65536 --speed-time 60 --retry 5 --retry-all-errors" + RUN apt-get update \ && apt-get install -y --no-install-recommends bash ca-certificates curl openjdk-17-jre-headless \ - && curl -fsSL "https://archive.apache.org/dist/flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-scala_${SCALA_VERSION}.tgz" -o /tmp/flink.tgz \ + && curl -fsSL $CURL_GUARDS "https://archive.apache.org/dist/flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-scala_${SCALA_VERSION}.tgz" -o /tmp/flink.tgz \ && tar -xzf /tmp/flink.tgz -C /opt \ && ln -s "/opt/flink-${FLINK_VERSION}" /opt/flink \ - && curl -fsSL "https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-kafka/${PYFLINK_KAFKA_JAR_VERSION}/flink-sql-connector-kafka-${PYFLINK_KAFKA_JAR_VERSION}.jar" -o "/opt/flink/lib/flink-sql-connector-kafka-${PYFLINK_KAFKA_JAR_VERSION}.jar" \ + && curl -fsSL $CURL_GUARDS "https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-kafka/${PYFLINK_KAFKA_JAR_VERSION}/flink-sql-connector-kafka-${PYFLINK_KAFKA_JAR_VERSION}.jar" -o "/opt/flink/lib/flink-sql-connector-kafka-${PYFLINK_KAFKA_JAR_VERSION}.jar" \ && mkdir -p /opt/flink/plugins/s3-fs-hadoop \ && ln -s "/opt/flink/opt/flink-s3-fs-hadoop-${FLINK_VERSION}.jar" "/opt/flink/plugins/s3-fs-hadoop/flink-s3-fs-hadoop-${FLINK_VERSION}.jar" \ && test -e "/opt/flink/plugins/s3-fs-hadoop/flink-s3-fs-hadoop-${FLINK_VERSION}.jar" \