Skip to content

Commit b947502

Browse files
committed
feat: [OCISDEV-774] ci, part 1
feat: [OCISDEV-774] ci, part 2 ci: trigger CI feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci
1 parent d1e2a4c commit b947502

3 files changed

Lines changed: 64 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
strategy:
9292
fail-fast: false
9393
matrix:
94-
part: [1, 2] # TODO: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR
94+
part: [1, 2, 3, 4] # FIXME: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR
9595
steps:
9696
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
9797
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
@@ -107,15 +107,35 @@ jobs:
107107
name: acceptance-ocis-part-${{ matrix.part }}
108108
path: tmp/testrunner/tests/acceptance/output/
109109

110-
# TODO: acceptance-tests-s3ng skipped — blocked on Ceph networking — follow-up PR
110+
acceptance-tests-s3ng:
111+
needs: [unit-tests]
112+
runs-on: ubuntu-latest
113+
strategy:
114+
fail-fast: false
115+
matrix:
116+
part: [1, 2, 3, 4, 5, 6]
117+
steps:
118+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
119+
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
120+
with:
121+
go-version-file: go.mod
122+
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
123+
with:
124+
php-version: "8.4"
125+
- run: python3 tests/acceptance/run-acceptance.py --storage s3ng --total-parts 6 --run-part ${{ matrix.part }}
126+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
127+
if: failure()
128+
with:
129+
name: acceptance-s3ng-part-${{ matrix.part }}
130+
path: tmp/testrunner/tests/acceptance/output/
111131

112132
acceptance-tests-posixfs:
113133
needs: [unit-tests]
114134
runs-on: ubuntu-latest
115135
strategy:
116136
fail-fast: false
117137
matrix:
118-
part: [1, 2] # TODO: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR
138+
part: [1, 2, 3, 4] # FIXME: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR
119139
steps:
120140
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
121141
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
@@ -142,6 +162,7 @@ jobs:
142162
- litmus
143163
- cs3api-validator
144164
- acceptance-tests-ocis
165+
- acceptance-tests-s3ng
145166
- acceptance-tests-posixfs
146167
runs-on: ubuntu-latest
147168
steps:
@@ -154,6 +175,7 @@ jobs:
154175
"${{ needs.litmus.result }}"
155176
"${{ needs.cs3api-validator.result }}"
156177
"${{ needs.acceptance-tests-ocis.result }}"
178+
"${{ needs.acceptance-tests-s3ng.result }}"
157179
"${{ needs.acceptance-tests-posixfs.result }}"
158180
)
159181
for r in "${results[@]}"; do

tests/acceptance/run-acceptance.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,16 @@ def start_redis():
185185
wait_for_port(REDIS_PORT, timeout=30, label="Redis")
186186

187187

188+
def ceph_rgw_ready():
189+
"""Check RGW is actually responding (not just Docker proxy listening)."""
190+
r = subprocess.run(
191+
["curl", "-sf", "--max-time", "2", f"http://localhost:{CEPH_PORT}"],
192+
capture_output=True,
193+
)
194+
# RGW returns XML even for anonymous requests — any HTTP response means it's up
195+
return r.returncode == 0
196+
197+
188198
def start_ceph():
189199
print("Starting Ceph...")
190200
subprocess.run(
@@ -203,9 +213,18 @@ def start_ceph():
203213
CEPH_IMAGE],
204214
check=True,
205215
)
206-
wait_for_port(CEPH_PORT, timeout=180, label="Ceph RGW")
207-
# Wait for demo bucket creation after RGW starts accepting connections
208-
time.sleep(15)
216+
# Docker port mapping makes TCP port appear open before RGW binds inside container.
217+
# Must use HTTP check to verify RGW is actually responding.
218+
start = time.time()
219+
while time.time() - start < 180:
220+
if ceph_rgw_ready():
221+
print("Ceph RGW ready.", flush=True)
222+
# Extra wait for demo bucket creation after RGW starts
223+
time.sleep(10)
224+
return
225+
time.sleep(2)
226+
subprocess.run(["docker", "logs", "--tail", "50", "ceph"])
227+
sys.exit("Timeout waiting for Ceph RGW after 180s")
209228

210229

211230
SERVICE_STARTERS = {

tests/acceptance/run-cs3api.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ def prepare_configs(storage):
114114
return config_dir
115115

116116

117+
def ceph_rgw_ready():
118+
r = subprocess.run(
119+
["curl", "-sf", "--max-time", "2", f"http://localhost:{CEPH_PORT}"],
120+
capture_output=True,
121+
)
122+
return r.returncode == 0
123+
124+
117125
def start_ceph():
118126
print("Starting Ceph...")
119127
env_args = []
@@ -126,9 +134,15 @@ def start_ceph():
126134
env_args + [CEPH_IMAGE],
127135
check=True,
128136
)
129-
wait_for_port(CEPH_PORT, timeout=180, label="Ceph RGW")
130-
# Wait for demo bucket creation after RGW starts accepting connections
131-
time.sleep(15)
137+
start = time.time()
138+
while time.time() - start < 180:
139+
if ceph_rgw_ready():
140+
print("Ceph RGW ready.", flush=True)
141+
time.sleep(10)
142+
return
143+
time.sleep(2)
144+
subprocess.run(["docker", "logs", "--tail", "50", "ceph"])
145+
sys.exit("Timeout waiting for Ceph RGW after 180s")
132146

133147

134148
def start_revad_services(config_dir, storage):

0 commit comments

Comments
 (0)