This is an automated email from the ASF dual-hosted git repository.

bharos pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new 8574ed9b90 [#13637] Retry and fall back when fetching libssl1.1 in CI 
(#13639)
8574ed9b90 is described below

commit 8574ed9b9012751ea066e942dbf6b7494f0bfe72
Author: Bharath Krishna <[email protected]>
AuthorDate: Mon Oct 5 16:40:42 2026 -0700

    [#13637] Retry and fall back when fetching libssl1.1 in CI (#13639)
    
    ### What changes were proposed in this pull request?
    
    Four workflows fetch `libssl1.1` from one hardcoded mirror with no retry
    or fallback. They now try three and fail with a clear message if none
    respond:
    
    ```bash
    deb=libssl1.1_1.1.1f-1ubuntu2_amd64.deb
    for host in archive.ubuntu.com nz2.archive.ubuntu.com security.ubuntu.com; 
do
      wget --tries=3 --timeout=30 -O "$deb" 
"https://$host/ubuntu/pool/main/o/openssl/$deb"; && break
      rm -f "$deb"
    done
    [ -s "$deb" ] || { echo "Could not download $deb from any mirror" >&2; exit 
1; }
    sudo dpkg -i "$deb"
    ```
    
    Identical block in `build.yml`, `backend-integration-test-action.yml`,
    `contrib-catalog-test.yml` and
    `iceberg-rest-trino-integration-test-action.yml`.
    
    ### Why are the changes needed?
    
    Part of #13637
    
    When that mirror is unreachable the job fails during setup, before any
    Gravitino code runs, so it reads as a test failure — and since all four
    share the mirror it reddens every branch at once. Seen on `branch-1.3`
    and `main` twenty minutes apart while preparing 1.3.1.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No. CI only.
    
    ### How was this patch tested?
    
    Run under `bash -e` (the Actions default) against real and unreachable
    hosts:
    
    | case | result |
    |---|---|
    | first mirror down, second good | downloads, exit 0 |
    | all mirrors down | `Could not download ... from any mirror`, exit 1 |
    
    `-O` is load-bearing. Without it `wget` will not overwrite, so a partial
    file from a failed mirror survives and the good download lands in
    `$deb.1` — leaving `dpkg` to install the partial.
---
 .github/workflows/backend-integration-test-action.yml          | 10 ++++++++--
 .github/workflows/build.yml                                    | 10 ++++++++--
 .github/workflows/contrib-catalog-test.yml                     | 10 ++++++++--
 .../workflows/iceberg-rest-trino-integration-test-action.yml   | 10 ++++++++--
 4 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/backend-integration-test-action.yml 
b/.github/workflows/backend-integration-test-action.yml
index 6bde642272..cd26d94d6d 100644
--- a/.github/workflows/backend-integration-test-action.yml
+++ b/.github/workflows/backend-integration-test-action.yml
@@ -55,8 +55,14 @@ jobs:
 
       - name: Install dependencies
         run: |
-          wget 
https://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
-          sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb  
+          # libssl1.1 is not in the runner's apt sources, so the .deb is 
fetched directly.
+          deb=libssl1.1_1.1.1f-1ubuntu2_amd64.deb
+          for host in archive.ubuntu.com nz2.archive.ubuntu.com 
security.ubuntu.com; do
+            wget --tries=3 --timeout=30 -O "$deb" 
"https://$host/ubuntu/pool/main/o/openssl/$deb"; && break
+            rm -f "$deb"
+          done
+          [ -s "$deb" ] || { echo "Could not download $deb from any mirror" 
>&2; exit 1; }
+          sudo dpkg -i "$deb"
 
       - name: Backend Integration Test (JDK${{ inputs.java-version }}-${{ 
inputs.test-mode }}-${{ inputs.backend }})
         id: integrationTest
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index cc4fe47ad8..30d5754e27 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -173,8 +173,14 @@ jobs:
 
       - name: Install dependencies
         run: |
-          wget 
https://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
-          sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb  
+          # libssl1.1 is not in the runner's apt sources, so the .deb is 
fetched directly.
+          deb=libssl1.1_1.1.1f-1ubuntu2_amd64.deb
+          for host in archive.ubuntu.com nz2.archive.ubuntu.com 
security.ubuntu.com; do
+            wget --tries=3 --timeout=30 -O "$deb" 
"https://$host/ubuntu/pool/main/o/openssl/$deb"; && break
+            rm -f "$deb"
+          done
+          [ -s "$deb" ] || { echo "Could not download $deb from any mirror" 
>&2; exit 1; }
+          sudo dpkg -i "$deb"
 
       - name: Build with Gradle
         run: |
diff --git a/.github/workflows/contrib-catalog-test.yml 
b/.github/workflows/contrib-catalog-test.yml
index cef67c2097..f2fe60a26c 100644
--- a/.github/workflows/contrib-catalog-test.yml
+++ b/.github/workflows/contrib-catalog-test.yml
@@ -95,8 +95,14 @@ jobs:
 
       - name: Install dependencies
         run: |
-          wget 
https://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
-          sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
+          # libssl1.1 is not in the runner's apt sources, so the .deb is 
fetched directly.
+          deb=libssl1.1_1.1.1f-1ubuntu2_amd64.deb
+          for host in archive.ubuntu.com nz2.archive.ubuntu.com 
security.ubuntu.com; do
+            wget --tries=3 --timeout=30 -O "$deb" 
"https://$host/ubuntu/pool/main/o/openssl/$deb"; && break
+            rm -f "$deb"
+          done
+          [ -s "$deb" ] || { echo "Could not download $deb from any mirror" 
>&2; exit 1; }
+          sudo dpkg -i "$deb"
 
       - name: Run contrib catalog tests
         id: contribCatalogTest
diff --git a/.github/workflows/iceberg-rest-trino-integration-test-action.yml 
b/.github/workflows/iceberg-rest-trino-integration-test-action.yml
index 6d97a62fcb..d7f1640293 100644
--- a/.github/workflows/iceberg-rest-trino-integration-test-action.yml
+++ b/.github/workflows/iceberg-rest-trino-integration-test-action.yml
@@ -45,8 +45,14 @@ jobs:
 
       - name: Install dependencies
         run: |
-          wget 
https://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
-          sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
+          # libssl1.1 is not in the runner's apt sources, so the .deb is 
fetched directly.
+          deb=libssl1.1_1.1.1f-1ubuntu2_amd64.deb
+          for host in archive.ubuntu.com nz2.archive.ubuntu.com 
security.ubuntu.com; do
+            wget --tries=3 --timeout=30 -O "$deb" 
"https://$host/ubuntu/pool/main/o/openssl/$deb"; && break
+            rm -f "$deb"
+          done
+          [ -s "$deb" ] || { echo "Could not download $deb from any mirror" 
>&2; exit 1; }
+          sudo dpkg -i "$deb"
 
       - name: Iceberg REST Trino Integration Test
         id: integrationTest

Reply via email to