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

sadpandajoe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new f3f3d10d5cc ci(testcontainers): pre-pull the Db2 image with a bounded 
retry (#46253)
f3f3d10d5cc is described below

commit f3f3d10d5cc3b934c9966d9ae9da7a09aee4d261
Author: Joe Li <[email protected]>
AuthorDate: Mon Nov 16 13:56:15 2026 -0800

    ci(testcontainers): pre-pull the Db2 image with a bounded retry (#46253)
---
 .github/workflows/testcontainers.yml | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/.github/workflows/testcontainers.yml 
b/.github/workflows/testcontainers.yml
index d23823382be..9a34aaff2d9 100644
--- a/.github/workflows/testcontainers.yml
+++ b/.github/workflows/testcontainers.yml
@@ -165,6 +165,26 @@ jobs:
         run: |
           sudo apt-get update
           sudo apt-get install -y libfbclient2
+      - name: Pre-pull Db2 image
+        # testcontainers pulls the fixture's image only when it is missing
+        # locally, in a single attempt (neither it nor docker-py retries a
+        # pull), and one transient dial timeout to icr.io failed ~1.6% of
+        # db2 runs before any test ran. Pull it here instead, retrying only
+        # the pull; each ~30s dial timeout plus the 30s/60s wait spans
+        # icr.io's 60s DNS TTL, so a retry can reach a different address
+        # (it serves one rotating A record). The image name comes from
+        # Db2Container itself so it cannot drift from the fixture's.
+        if: matrix.dialect == 'db2'
+        run: |
+          image="$(python -c 'from testcontainers.community.db2 import 
Db2Container; print(Db2Container().image)')"
+          for delay in 30 60; do
+            docker pull "$image" && exit 0
+            echo "::warning::docker pull $image failed; retrying in ${delay}s"
+            sleep "$delay"
+          done
+          docker pull "$image" && exit 0
+          echo "::error::docker pull $image failed after 3 attempts"
+          exit 1
       - name: Run testcontainers db_engine_specs tests (${{ matrix.dialect }})
         # nightly_only dialects are already excluded from the matrix itself
         # on pull_request runs (see the compute-matrix job above), so this

Reply via email to