Reset OPcache after deploy via itineris-opcache-purge - #68
Merged
Conversation
codepuncher
reviewed
Aug 12, 2026
Calls the mu-plugin endpoint on every site host found in the trellis checkout after the release symlink is promoted. Inert unless the OPCACHE_PURGE_TOKEN secret is passed; never fails a deploy (warning annotation instead). Runs before tailscale down so egress matches the deploy itself. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
itineris-milos
force-pushed
the
feat/opcache-purge-step
branch
from
August 12, 2026 16:34
8d74294 to
9b04946
Compare
petarbajic84
approved these changes
Aug 13, 2026
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.
What
After
trellis deploy, call the itineris-opcache-purge endpoint on every site host found in the trellis checkout'sgroup_vars/<env>/wordpress_sites.yml. This replaces the per-project trellis deploy hook / Galaxy role approach: trellis repos need no changes, ever — the purge lives entirely in this org workflow.Why
Atomic Trellis deploys stack
releases/<id>paths in OPcache until it saturates and PHP recompiles every script on every request (measured: frpadvisory TTFB 2.4→1.0s, stelizabethhospice 4.5→1.1s). Currently fixed on 5 sites via a Galaxy role reading a per-project vault token; per Tim's simplification decision the mechanism moves here, with one org-level token and zero per-project trellis/vault plumbing.Design notes
OPCACHE_PURGE_TOKENget one log line and a clean skip, so this is safe to merge and tag before any caller changes.::warning::annotation (mu-plugin not installed yet, token mismatch, edge block).Deploy, beforetailscale down, so the purge egresses identically to the deploy itself.OPCACHE_PURGE_USER_AGENT(optional org secret) — sent so Kinsta Bot Protection whitelists can match a non-public UA; falls back toItinerisServer/1.0(today's public string) when unset.Both secrets exist at org level already. Verified locally: extracted step script run against a two-site fixture with mocked curl — confirms multi-site fan-out, header/UA/cache-buster shape, OK path, warning path, and the no-token skip.
Rollout (after merge)
0.9/0.9.0.cd.ymls:@0.8→@0.9and replace the explicit secrets list withsecrets: inherit(org secrets then flow without being named).itineris-opcache-purgelands in their bedrock repo with theOPCACHE_PURGE_TOKEN_HASHconfig line (plugin PR ItinerisLtd/itineris-opcache-purge#2).trellis-deploy-radicle.ymldeliberately untouched (out of scope per Milos).🤖 Generated with Claude Code