ci+chore(mod_whp_symlink): remove racy WHPSymlinkWalk prototype; run the probe test in CI; assert Options All mapping
shared-httpd mod_whp_symlink PR check / Symlink-Module-Probe (pull_request) Successful in 1m15s
shared-httpd mod_whp_symlink PR check / Symlink-Module-Probe (pull_request) Successful in 1m15s
- Remove the WHPSymlinkWalk post-walk lstat prototype (check-then-use race by construction; WHPOwnerGuard is the race-free mechanism): hook, directive, per-dir member, header docs. The directive is now an unknown command. - Probe test: WHP_SYMTEST_REQUIRE=1 turns every SKIP into a FAIL (no docker, no image, container does not start) and a minimum assertion count is enforced. New assertions: bare `Options All` keeps Apache semantics (Indexes on, MultiViews off, same-owner symlink followed, cross-tenant refused) plus None/+MultiViews controls (106 assertions). - CI: new pull_request workflow shared-httpd-symlink-pr.yaml (builds amd64 locally, no push/secrets, runs the probe test); build-push.yaml Build-Shared-httpd runs the probe test against the amd64 digest it just pushed, before the arm64 build and tag assembly, so a failure publishes no tag. Test script added to the shellcheck set; wiring tests added. - docs/shared-httpd-symlink-module.md: behaviour, local run, CI. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
1 parent
1953a176f5
commit
0d9e57e012
7 files changed
+161
-62
No files matched your search
@@ -91,6 +91,7 @@ jobs:
|
||||
scripts/tests/index-platforms.test.sh \
|
||||
scripts/tests/lsphp-abi-gate.test.sh \
|
||||
scripts/tests/lsphp-src-upload-progress.test.sh \
|
||||
scripts/tests/whp-symlink-module.test.sh \
|
||||
.gitea/scripts/resolve-base-image.sh \
|
||||
.gitea/scripts/plan-legs.sh
|
||||
|
||||
@@ -960,6 +961,21 @@ jobs:
|
||||
PKG_CACHE=${{ steps.pkgcache.outputs.url }}
|
||||
outputs: type=image,name=repo.anhonesthost.net/cloud-hosting-platform/shared-httpd,push-by-digest=true,name-canonical=true,push=true
|
||||
|
||||
# Publish gate for mod_whp_symlink: run the live probe test against the very
|
||||
# amd64 image that was just pushed (pulled by digest). The step is fatal and
|
||||
# sits before the arm64 build and the tag-assembly step, so a failed
|
||||
# assertion (or a missing docker/image: WHP_SYMTEST_REQUIRE=1 turns the
|
||||
# local SKIP into a FAIL) publishes no tag. Only the untagged by-digest
|
||||
# blob exists at this point, as after any other failed job.
|
||||
- name: Probe test (mod_whp_symlink, amd64 image by digest)
|
||||
env:
|
||||
AMD64_DIGEST: ${{ steps.amd64.outputs.digest }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
ref="repo.anhonesthost.net/cloud-hosting-platform/shared-httpd@${AMD64_DIGEST}"
|
||||
docker pull "$ref"
|
||||
WHP_SYMTEST_REQUIRE=1 ./scripts/tests/whp-symlink-module.test.sh "$ref"
|
||||
|
||||
# arm64: best effort, built under QEMU on this same trusted x86 runner (no
|
||||
# secret ever leaves it). Same Dockerfile, same build-args (incl. the php.net
|
||||
# EXPECT_PHP_MIN gate, which runs `php -r` on the arm64 binary). Must never
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
name: shared-httpd mod_whp_symlink PR check
|
||||
run-name: mod_whp_symlink probe test for ${{ gitea.actor }}
|
||||
|
||||
## Pull-request gate for the shared-httpd tenant-symlink module. build-push.yaml
|
||||
## only runs on trunk (and publishes); this builds the amd64 shared-httpd image
|
||||
## locally (nothing is pushed, no secrets) and runs the live probe test against
|
||||
## it. WHP_SYMTEST_REQUIRE=1: a missing docker/image or a failed assertion
|
||||
## fails the job. Run the same thing locally: docs/shared-httpd-symlink-module.md.
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/mod_whp_symlink/**'
|
||||
- 'configs/whp-symlink.conf'
|
||||
- 'Dockerfile.shared-httpd'
|
||||
- 'scripts/tests/whp-symlink-module.test.sh'
|
||||
- '.gitea/workflows/shared-httpd-symlink-pr.yaml'
|
||||
|
||||
jobs:
|
||||
Symlink-Module-Probe:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
|
||||
# Runner images differ on whether they are root and whether sudo exists.
|
||||
- name: Install shellcheck
|
||||
run: |
|
||||
if ! command -v shellcheck >/dev/null 2>&1; then
|
||||
(apt-get update && apt-get install -y shellcheck) ||
|
||||
(sudo apt-get update && sudo apt-get install -y shellcheck)
|
||||
fi
|
||||
shellcheck --version
|
||||
|
||||
- name: Lint the probe test
|
||||
run: |
|
||||
bash -n scripts/tests/whp-symlink-module.test.sh
|
||||
shellcheck -S warning scripts/tests/whp-symlink-module.test.sh
|
||||
|
||||
- name: Build shared-httpd (amd64, local only, nothing pushed)
|
||||
run: docker build -f Dockerfile.shared-httpd -t shared-httpd:pr-probe .
|
||||
|
||||
- name: Probe test (fails the job on any failed assertion)
|
||||
run: WHP_SYMTEST_REQUIRE=1 ./scripts/tests/whp-symlink-module.test.sh shared-httpd:pr-probe
|
||||
Reference in new issue
Block a user