VersionControl:PRs/pickipedia/175: Difference between revisions

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
DrivingThatTrain (talk | contribs)
cryptograss/pickipedia#175, as GitHub has it
DrivingThatTrain (talk | contribs)
cryptograss/pickipedia#175, as GitHub has it
 
Line 16: Line 16:
|deploy=
|deploy=
}}
}}
<pre class="pr-body">Justin, in #interfaces (6 Nov): "Notification of every edit fires from pickipedia to magenta."
- `src/MagentaPush.php`: after a save (`PageSaveComplete`), a move (`PageMoveComplete`, with the title it had) or an upload (`UploadComplete`), POSTs `{title, revid, user, kind, at}` as JSON to magenta's `/api/wiki/hook/` (`$wgPickiPediaContentMagentaUrl` + the path), signed `X-Magenta-Signature: sha256=&lt;HMAC-SHA256 of the body&gt;` with `$wgPickiPediaContentMagentaHookSecret`. Sent as a deferred update, after the response, with a 5 s timeout: a save never waits on magenta. A push that fails is logged (channel PickiPediaContent) and let go: magenta sweeps our recent changes once a minute and catches it, saying so in its #ops.
- No secret configured: nothing is sent, and the sweep alone serves. The secret is the same value as magenta's `WIKI_HOOK_SECRET` (magenta#404, maybelle-config PR to follow). Set it in `LocalSettings.local.php` on the wiki host as `$wgPickiPediaContentMagentaHookSecret`, or as `MAGENTA_HOOK_SECRET` in the environment.
- `tests/check-magenta-push.php` (payload, signature vector, URL), in the Jenkinsfile and the checks workflow.
Not run in a live wiki here (my container is Justin's worktree, not this branch): the hook signatures are MediaWiki 1.43's, checked against the container's interfaces.
Redeploy: pickipedia (then put the secret in LocalSettings.local.php there, the same one as magenta's)
Worked on by: magent, justin, in #interfaces</pre>

Latest revision as of 18:06, 9 November 2026

pickipedia#175: Each save, move and upload is pushed to magenta at once
State 🟣 merged 2026-11-06 16:58:52
Worked on by magent, justin
Moods #interfaces
Deploy not said
Branch magenta-push → production, by magent-cryptograss
Opened · last pushed 2026-11-06 04:45:40 · 2026-11-06 04:45:35
Justin, in #interfaces (6 Nov): "Notification of every edit fires from pickipedia to magenta."

- `src/MagentaPush.php`: after a save (`PageSaveComplete`), a move (`PageMoveComplete`, with the title it had) or an upload (`UploadComplete`), POSTs `{title, revid, user, kind, at}` as JSON to magenta's `/api/wiki/hook/` (`$wgPickiPediaContentMagentaUrl` + the path), signed `X-Magenta-Signature: sha256=<HMAC-SHA256 of the body>` with `$wgPickiPediaContentMagentaHookSecret`. Sent as a deferred update, after the response, with a 5 s timeout: a save never waits on magenta. A push that fails is logged (channel PickiPediaContent) and let go: magenta sweeps our recent changes once a minute and catches it, saying so in its #ops.
- No secret configured: nothing is sent, and the sweep alone serves. The secret is the same value as magenta's `WIKI_HOOK_SECRET` (magenta#404, maybelle-config PR to follow). Set it in `LocalSettings.local.php` on the wiki host as `$wgPickiPediaContentMagentaHookSecret`, or as `MAGENTA_HOOK_SECRET` in the environment.
- `tests/check-magenta-push.php` (payload, signature vector, URL), in the Jenkinsfile and the checks workflow.

Not run in a live wiki here (my container is Justin's worktree, not this branch): the hook signatures are MediaWiki 1.43's, checked against the container's interfaces.

Redeploy: pickipedia (then put the secret in LocalSettings.local.php there, the same one as magenta's)
Worked on by: magent, justin, in #interfaces