chore(ci): PHP unit tests with scalitys3 - #706
Merged
Merged
Conversation
phil-davis
force-pushed
the
phpunit-scality-s3-reusable-workflow
branch
from
May 5, 2026 06:28
fcc5927 to
d4a9c0a
Compare
phil-davis
marked this pull request as ready for review
May 5, 2026 06:54
phil-davis
commented
May 5, 2026
|
|
||
| # bin file definitions | ||
| PHPUNIT=php -d zend.enable_gc=0 "$(PWD)/../../lib/composer/bin/phpunit" | ||
| PHPUNIT=php -d memory_limit=16G -d zend.enable_gc=0 "$(PWD)/../../lib/composer/bin/phpunit" |
Contributor
Author
There was a problem hiding this comment.
Note: the scality S3 workflows run the entire core PHP unit test suite. It ran out of memory. I tried with 4GB then 8GB, but it got about 85% through with 8GB memory. Maybe it will finish OK with 10GB or 12GB. But I changed it to 16GB, the same as in the PHPUNITDBG command in the line below. May as well be sure!
Normally a lot of memory is needed when coverage data is being gathered. So I am not sure why an ordinary run needs this much memory. We could try to investigate that later, if it is important to know.
DeepDiver1975
approved these changes
May 5, 2026
DeepDiver1975
added a commit
that referenced
this pull request
Jul 15, 2026
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>
phil-davis
pushed a commit
that referenced
this pull request
Jul 21, 2026
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>
phil-davis
added a commit
that referenced
this pull request
Jul 21, 2026
* chore(ci): add PHP unit tests with Ceph S3 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> * fix(ci): wait for S3 server readiness before running tests 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> * ci: instrument Ceph job to capture bootstrap evidence 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> * fix(ci): pin Ceph network to default-route NIC instead of auto-detect 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> * ci: drop krb5 from base PHP extensions, make it opt-in 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> * chore(ci): use case() function in workflow --------- Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Phil Davis <phil@jankaritech.com>
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.
No description provided.