Skip to content

ci(playwright): give Nextcloud a cache backend — there was none at all - #573

Merged
rubenvdlinde merged 1 commit into
mainfrom
fix/ci-needs-a-cache-backend
Aug 25, 2026
Merged

ci(playwright): give Nextcloud a cache backend — there was none at all#573
rubenvdlinde merged 1 commit into
mainfrom
fix/ci-needs-a-cache-backend

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

There was no cache backend at all

This workflow is 7k lines and configures none: no memcache.*, and no cache
extension in any setup-php. Nextcloud has no cache unless one is configured,
so ICacheFactory::createDistributed() handed every caller a null cache and
nothing survived from one HTTP request to the next.

No real instance runs that way, and it silently changes the behaviour of
anything session- or cache-backed.

Measured on filinq

OpenRegister's McpProtocolService keeps MCP sessions in
$cacheFactory->createDistributed(...). Every JSON-RPC call therefore arrived
without its session, and the whole agent-document-editing suite (6 tests)
stood down with:

the MCP session does not survive between requests on this instance …
OpenRegister stores sessions in a cache and this harness has no cache
backend. These specs pass against a real instance.

That skip was correct about the environment. The environment was the defect.

What this adds

apcu in the Playwright job's extensions plus ini-values: apc.enable_cli=1php -S is the CLI SAPI, and without that flag APCu loads but stays inert, which looks exactly like never having installed it
a Configure the Nextcloud cache backend step right after maintenance:install, before the app under test is enabled; sets memcache.local and memcache.distributed

APCu for both tiers — right here, wrong in production: this job is a single
php -S process tree on one runner, so "local" and "distributed" are the same
memory, and forked workers inherit APCu's shared segment.

The step fails loudly if apcu is missing or disabled rather than proceeding
without a cache, because a silently absent cache is the exact failure being
fixed. Guard verified in both directions locally: the apcu form exits 1 where
apcu is absent, and the same shape exits 0 for an extension that is present.

Scope

Deliberately the Playwright job only. The newman and phpunit jobs have the
same gap and are left for a follow-up — this is the one with a measured
consequence, and a shared workflow that all 18 fleet apps run should change one
job at a time.

YAML re-parsed after the edit: the new step is index 6 of 32, between "Install
Nextcloud" and "Cache Composer downloads".

Surfaced by the e2e skip-discipline gate, #559.

This workflow is 7k lines and configures no cache: no `memcache.*`, and no
cache extension in any `setup-php`. Nextcloud has none unless one is
configured, so `ICacheFactory::createDistributed()` handed every caller a null
cache and nothing survived from one HTTP request to the next. No real instance
runs that way, and it silently changes the behaviour of anything session- or
cache-backed.

MEASURED ON filinq

OpenRegister's McpProtocolService keeps MCP sessions in
`$cacheFactory->createDistributed(...)`. Every JSON-RPC call therefore arrived
without its session, and the whole agent-document-editing suite (6 tests) stood
down with:

    "the MCP session does not survive between requests on this instance …
     OpenRegister stores sessions in a cache and this harness has no cache
     backend. These specs pass against a real instance."

That skip was correct about the environment. The environment was the defect.

WHAT THIS ADDS

  * `apcu` to the Playwright job's PHP extensions, plus
    `ini-values: apc.enable_cli=1` — `php -S` IS the CLI SAPI, and without that
    flag APCu loads but stays inert, which looks exactly like never having
    installed it.
  * A "Configure the Nextcloud cache backend" step, immediately after
    `maintenance:install` and before the app under test is enabled, setting
    `memcache.local` and `memcache.distributed` to `\OC\Memcache\APCu`.

APCu for BOTH tiers, which is right here and would be wrong in production: this
job is a single `php -S` process tree on one runner, so "local" and
"distributed" are the same memory, and forked workers inherit APCu's shared
segment.

The step FAILS LOUDLY if apcu is missing or disabled rather than proceeding
without a cache, because a silently absent cache is the exact failure being
fixed. Guard verified in both directions locally: the apcu form exits 1 where
apcu is absent, and the same shape exits 0 for an extension that is present.

Scoped to the Playwright job. The newman and phpunit jobs have the same gap and
are deliberately left for a follow-up: this is the one with a measured
consequence, and a shared workflow that all 18 fleet apps run should change one
job at a time.

YAML re-parsed after the edit: the new step is index 6 of 32, between "Install
Nextcloud" and "Cache Composer downloads".
@rubenvdlinde
rubenvdlinde merged commit 78f9079 into main Aug 25, 2026
36 checks passed
@rubenvdlinde
rubenvdlinde deleted the fix/ci-needs-a-cache-backend branch August 25, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant