You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2026/09/16 10:23:52 UTC
[PR] docs: design for per-PR preview deployments [magpie-site]
potiuk opened a new pull request, #176:
URL: https://github.com/apache/magpie-site/pull/176
Design doc only — no workflows yet. Opening it for review before anything
gets implemented.
## What it proposes
Publish every open PR at `magpie-pr<N>.staged.apache.org`. A maintainer arms a
PR by commenting `/show-preview`; from then on the preview tracks the PR's head
commit until it closes. One scheduled workflow (every 15 min, plus
`workflow_dispatch` with a PR number for the impatient case) does the
announcing, publishing and reaping.
**No `pull_request_target` anywhere.** The only privileged workflow runs on
`schedule` / `workflow_dispatch`, so it always executes the default branch's
copy of itself. It never checks out or builds pull-request code — it consumes
the artifact that `build.yml` already produces in the unprivileged
`pull_request` run, validates the metadata, and pushes static files.
## What was verified against real ASF infra first
I probed this with a throwaway branch on this repo before writing the design
(`preview/pr0-staging`, since deleted):
- An **arbitrary branch** with an explicit `staging: profile:` / `whoami:` does
stage — no Pelican, no `autobuild`, no `autostage`. Prebuilt output works,
exactly like the existing `publish` branch.
- The hostname is `$project-<profile>.staged.apache.org`. `pr<N>.dev.magpie.apache.org`
is not achievable — asfyaml refuses to let a project name its own
`$project.apache.org` space, and there is no wildcard mechanism.
- Propagation is ~3 minutes, not instant.
- **Deleting the branch does not unstage the site.** `magpie-pr0.staged.apache.org`
still served HTTP 200 ten minutes after the branch was deleted. Teardown
therefore has to force-push a tombstone page *before* deleting the branch;
"delete the preview" is not implementable as a branch deletion.
That last point is the main reason this is a design doc rather than a PR full
of YAML.
## Open question for reviewers
Tombstoning stops the PR's content being served, but the hostname keeps
resolving forever. Whether INFRA can purge a staging profile — and whether an
accumulating set of tombstoned preview hostnames is acceptable to them — is
worth asking on `users@infra.apache.org` before this ships.
## Note
`docs/superpowers/` is gitignored, so this file is force-added. Happy to
un-ignore the directory instead, or to keep specs untracked and close this —
whichever matches how the project wants to handle design docs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] docs: design for per-PR preview deployments [magpie-site]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #176:
URL: https://github.com/apache/magpie-site/pull/176
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org