@@ -101,29 +101,32 @@ jobs:
101101 echo "BEFORE=$git_status" >> $GITHUB_ENV
102102 echo "Repository status before tests: $git_status"
103103
104- - name : Clone Services
104+ - name : Configure Host Network (The "Magic" Step)
105+ run : |
106+ # Map 'nginx' to localhost so the Host machine can resolve the URLs in the database
107+ echo "127.0.0.1 nginx" | sudo tee -a /etc/hosts
108+ ping -c 1 nginx
109+
110+ - name : Clone Services & Apply Universal Patch
105111 if : matrix.os == 'ubuntu-latest'
106112 run : |
107113 git clone --depth 1 https://github.com/openml/services.git
108114 cd services
109-
110115 git config user.email "ci@openml.org"
111116 git config user.name "CI"
112-
113- git fetch origin pull/13/head:pr-13
114- git merge pr-13 --no-edit
115-
116- git fetch origin pull/15/head:pr-15
117- git merge pr-15 --no-edit
118- sed -i 's/localhost:8000/172.28.0.2:8000/g' config/database/update.sh
117+ git fetch origin pull/13/head:pr-13 && git merge pr-13 --no-edit
118+ git fetch origin pull/15/head:pr-15 && git merge pr-15 --no-edit
119+
120+ # === PATCH 1: Use 'nginx' hostname ===
121+ # This works inside Docker (DNS) and on Host (via /etc/hosts hack above)
122+ sed -i 's/localhost:8000/nginx:8000/g' config/database/update.sh
119123
120- # === PATCH 2: Fix MinIO Path Mismatch ===
121- # The PR uses '/minio/' but Nginx usually expects '/data/' for MinIO
122- # We replace '/minio/' with '/data/' in the URL rewrite script
124+ # === PATCH 2: Fix Path Mismatch ===
125+ # Ensure we use /data/ which Nginx recognizes
123126 sed -i 's|/minio/|/data/|g' config/database/update.sh
124127
125128 echo "=== Patched Update Script ==="
126- cat config/database/update.sh | grep "172.28.0.2 "
129+ cat config/database/update.sh | grep "nginx "
127130
128131 - name : Start Docker Services
129132 if : matrix.os == 'ubuntu-latest'
0 commit comments