diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6f4b5ae876..a5c98965d32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,7 @@ jobs: strategy: fail-fast: false matrix: - part: [1, 2] # TODO: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR + part: [1, 2, 3, 4] # FIXME: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 @@ -107,7 +107,27 @@ jobs: name: acceptance-ocis-part-${{ matrix.part }} path: tmp/testrunner/tests/acceptance/output/ - # TODO: acceptance-tests-s3ng skipped — blocked on Ceph networking — follow-up PR + acceptance-tests-s3ng: + needs: [unit-tests] + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + part: [1, 2, 3, 4, 5, 6] + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 + with: + go-version-file: go.mod + - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2 + with: + php-version: "8.4" + - run: python3 tests/acceptance/run-acceptance.py --storage s3ng --total-parts 6 --run-part ${{ matrix.part }} + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + if: failure() + with: + name: acceptance-s3ng-part-${{ matrix.part }} + path: tmp/testrunner/tests/acceptance/output/ acceptance-tests-posixfs: needs: [unit-tests] @@ -115,7 +135,7 @@ jobs: strategy: fail-fast: false matrix: - part: [1, 2] # TODO: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR + part: [1, 2, 3, 4] # FIXME: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 @@ -142,6 +162,7 @@ jobs: - litmus - cs3api-validator - acceptance-tests-ocis + - acceptance-tests-s3ng - acceptance-tests-posixfs runs-on: ubuntu-latest steps: @@ -154,6 +175,7 @@ jobs: "${{ needs.litmus.result }}" "${{ needs.cs3api-validator.result }}" "${{ needs.acceptance-tests-ocis.result }}" + "${{ needs.acceptance-tests-s3ng.result }}" "${{ needs.acceptance-tests-posixfs.result }}" ) for r in "${results[@]}"; do diff --git a/tests/acceptance/run-acceptance.py b/tests/acceptance/run-acceptance.py index 40287c8650e..8b822de9d6e 100755 --- a/tests/acceptance/run-acceptance.py +++ b/tests/acceptance/run-acceptance.py @@ -185,6 +185,16 @@ def start_redis(): wait_for_port(REDIS_PORT, timeout=30, label="Redis") +def ceph_rgw_ready(): + """Check RGW is actually responding (not just Docker proxy listening).""" + r = subprocess.run( + ["curl", "-sf", "--max-time", "2", f"http://localhost:{CEPH_PORT}"], + capture_output=True, + ) + # RGW returns XML even for anonymous requests — any HTTP response means it's up + return r.returncode == 0 + + def start_ceph(): print("Starting Ceph...") subprocess.run( @@ -203,9 +213,18 @@ def start_ceph(): CEPH_IMAGE], check=True, ) - wait_for_port(CEPH_PORT, timeout=180, label="Ceph RGW") - # Wait for demo bucket creation after RGW starts accepting connections - time.sleep(15) + # Docker port mapping makes TCP port appear open before RGW binds inside container. + # Must use HTTP check to verify RGW is actually responding. + start = time.time() + while time.time() - start < 180: + if ceph_rgw_ready(): + print("Ceph RGW ready.", flush=True) + # Extra wait for demo bucket creation after RGW starts + time.sleep(10) + return + time.sleep(2) + subprocess.run(["docker", "logs", "--tail", "50", "ceph"]) + sys.exit("Timeout waiting for Ceph RGW after 180s") SERVICE_STARTERS = { diff --git a/tests/acceptance/run-cs3api.py b/tests/acceptance/run-cs3api.py index 21f5a6f06ca..ca960c82f9d 100755 --- a/tests/acceptance/run-cs3api.py +++ b/tests/acceptance/run-cs3api.py @@ -114,6 +114,14 @@ def prepare_configs(storage): return config_dir +def ceph_rgw_ready(): + r = subprocess.run( + ["curl", "-sf", "--max-time", "2", f"http://localhost:{CEPH_PORT}"], + capture_output=True, + ) + return r.returncode == 0 + + def start_ceph(): print("Starting Ceph...") env_args = [] @@ -126,9 +134,15 @@ def start_ceph(): env_args + [CEPH_IMAGE], check=True, ) - wait_for_port(CEPH_PORT, timeout=180, label="Ceph RGW") - # Wait for demo bucket creation after RGW starts accepting connections - time.sleep(15) + start = time.time() + while time.time() - start < 180: + if ceph_rgw_ready(): + print("Ceph RGW ready.", flush=True) + time.sleep(10) + return + time.sleep(2) + subprocess.run(["docker", "logs", "--tail", "50", "ceph"]) + sys.exit("Timeout waiting for Ceph RGW after 180s") def start_revad_services(config_dir, storage):