chore(ci): add PHP unit tests with Ceph S3 - #714
Merged
Merged
Conversation
Contributor
|
https://github.com/owncloud/files_primary_s3/actions/runs/29475044481/job/87546140350?pr=714 |
phil-davis
reviewed
Jul 20, 2026
Contributor
|
I suppose that we can merge this, and then port the known-working |
Master (#706) added scality unit-test jobs via the shared owncloud/reusable-workflows php-unit workflow, but that workflow does not support ceph. Add ceph coverage with a local php-unit.yml callable workflow and a php-unit-ceph job in main.yml; scality keeps using the reusable workflow. The ceph setup is verified end-to-end against owncloudci/ceph:tag-build-master-jewel-ubuntu-16.04: - Forward the container env (NETWORK_AUTO_DETECT, RGW_NAME, CEPH_DEMO_*) into `docker run` with `-e`; otherwise the container aborts with "ERROR- CEPH_PUBLIC_NETWORK must be defined". - Use RGW_CIVETWEB_PORT=8080 (the variable the image reads) so radosgw's civetweb frontend binds 8080, matching the ceph.config.php endpoint. CEPH_DEMO_RGW_PORT is ignored by the image. - Create the "OWNCLOUD" bucket (uppercase) that ceph.config.php points at; RGW bucket names are case-sensitive. ceph.config.php endpoint is updated from http://ceph:80/ to http://localhost:8080/ for the host-networked GitHub Actions runner. The core-checkout ref also uses the standard `&&`/`||` expression instead of the invalid `case()` function. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
The Ceph and Scality S3 servers are started detached with `docker run -d` but nothing waited for them to accept connections before the tests used them. The Ceph jewel demo image takes longer than ~20s to bootstrap its RADOS gateway (civetweb on port 8080), so `s3:create-bucket` raced ahead and failed with `cURL error 7: Failed to connect to localhost port 8080`. All four Ceph matrix jobs failed this way while the faster-booting Scality jobs passed by luck. Add a TCP readiness poll after each server launch, mirroring the old Drone CI `wait-for-it ceph:80` / `scality:8000` steps. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
All four Ceph matrix jobs time out at "Wait for Ceph S3 Server" (exit 124): radosgw's civetweb frontend never binds localhost:8080 within the poll window. The same `docker run` reproduces cleanly on a local host in ~90s, so the fault is specific to the GitHub runner environment — yet CI captures no evidence from the ceph container itself, only the postgres service logs. Add a `Ceph diagnostics` step (if: always()) that dumps `docker ps -a`, the host interfaces / /proc/net/dev (what NETWORK_AUTO_DETECT=4 ranks), the resolved ceph.conf (mon host / public network), the in-container listening ports, and `docker logs ceph`. Drop `--rm` from the ceph `docker run` so a crashed container survives for inspection, and shorten the readiness poll 600s -> 180s to speed up the evidence-gathering loop. This commit gathers root-cause evidence; it is not expected to make the job pass. The `--rm` removal is reverted once the real fix lands. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Root cause of the failing Ceph jobs, confirmed from the diagnostics
step: the ceph image's NETWORK_AUTO_DETECT chooses the highest-traffic
interface from /proc/net/dev. Under `docker run --network host` on the
GitHub runner that is the Azure accelerated-networking VF (enP31395s1),
which carries the most traffic but has no IPv4 address. get_ip/get_network
therefore return empty, the mon bootstrap aborts with
ERROR- it looks like we have not been able to discover the network settings
and the container exits 1 before radosgw ever binds civetweb on 8080 —
so "Wait for Ceph S3 Server" timed out (exit 124). It reproduced only in
CI because a typical dev host has a single addressed NIC, leaving
auto-detect nothing wrong to pick.
Set NETWORK_AUTO_DETECT=0 and derive MON_IP / CEPH_PUBLIC_NETWORK at
runtime from the default-route interface (eth0), which is the NIC that
actually has an IPv4 address. Verified locally end-to-end: radosgw binds
8080 in ~15s and ceph.conf gets the real routable mon host / public
network. Loopback (127.0.0.1/8) was tried and rejected by ceph-mon
("unable to find any IP address in networks").
Also switch the Ceph diagnostics step to `if: failure()` so it stays out
of the way on green runs but still captures container logs, resolved
ceph.conf and host interfaces automatically on any future regression.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
The krb5 extension is the only one in the list that must be compiled (via KRB5_LINUX_LIBS: libkrb5-dev), and its build intermittently fails with "Could not install krb5 on PHP 8.3.32", flaking the whole job at the Setup PHP step. This app has no kerberos dependency (info.xml declares only php >= 8.3; nothing in lib/ or tests/ uses krb5/smbclient-kerberos), so it should not pay for an extension it never loads. Remove krb5 from the base extension set and add an optional `additional-php-extensions` input so callers that genuinely need it can opt in (`additional-php-extensions: krb5`). The base set still covers the extensions every app relies on. KRB5_LINUX_LIBS is kept so opting back in still resolves the build dependency. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
phil-davis
force-pushed
the
ci/php-unit-ceph
branch
from
July 21, 2026 03:12
3a16439 to
ced19b5
Compare
Contributor
|
Rebased to get fresh CI with the latest code. |
phil-davis
approved these changes
Jul 21, 2026
phil-davis
left a comment
Contributor
There was a problem hiding this comment.
I will next make a reusable-workflows PR to add this to there, then a PR here to use the reusable-workflow code.
Contributor
|
See owncloud/reusable-workflows#83 and #718 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Ceph S3 PHP-unit CI job to complement the Scality jobs that #706 already merged.
#706 wired scality unit tests through the shared
owncloud/reusable-workflowsphp-unit.yml, but that reusable workflow does not support ceph. This PR adds ceph coverage via a local.github/workflows/php-unit.ymlcallable workflow plus aphp-unit-cephjob inmain.yml. Scality keeps using the reusable workflow untouched.This supersedes the ceph portion of #704 (which was based on the pre-#706 local-workflow approach and is now obsolete). #704 has been left at its original state.
Ceph setup — verified end-to-end against
owncloudci/ceph:tag-build-master-jewel-ubuntu-16.04-e.NETWORK_AUTO_DETECT,RGW_NAME,CEPH_DEMO_*were previously set as step shell env but never passed intodocker run, so the container aborted withERROR- CEPH_PUBLIC_NETWORK must be defined.RGW_CIVETWEB_PORT=8080(the variable the image actually reads;CEPH_DEMO_RGW_PORTis ignored) so radosgw's civetweb frontend binds 8080, matching theceph.config.phpendpoint.OWNCLOUDbucket (uppercase) thatceph.config.phppoints at — RGW bucket names are case-sensitive.ceph.config.phpendpoint updatedhttp://ceph:80/→http://localhost:8080/for the host-networked GitHub Actions runner. The core-checkoutrefalso uses the standard&&/||expression instead of the invalidcase()function.🤖 Generated with Claude Code