Add Workers static assets support to the Cloudflare preview action
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia con l’azione Pages esistente preview-cloudflare e gli elementi referenziati #92, #105, #131 e PLAN 5/6; confronta il suo comportamento relativo al rilevamento delle modifiche, ai commenti, agli alias e ai trust-gate con il percorso Workers proposto. Il lavoro è completato quando le decisioni relative a piattaforma, API e configurazione sono risolte, gli alias di preview e gli output di Workers funzionano per il pilot lecture-dp e sono verificate le verifiche elencate su limiti, conservazione, race condition e trust-gate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
The org is migrating lecture PR previews from Netlify to Cloudflare
(QuantEcon/infrastructure#4). Cloudflare's investment has moved from Pages
to Workers static assets (Pages is maintenance mode; Workers reached
static-asset feature parity in 2026), and Workers now supports the one
mechanism our design depends on: deterministic, stable per-PR preview
aliases via wrangler versions upload --preview-alias pr-N
(Wrangler ≥ 4.21.0), yielding:
https://pr-{N}-{worker-name}.{account-subdomain}.workers.dev
Since no repo has cut over yet, we target Workers directly rather than
migrating the fleet through Pages. preview-cloudflare (Pages, v0.11.1)
stays as released fallback.
Proposed change
Either a platform: input on preview-cloudflare (pages | workers,
default workers) or a sibling preview-workers action — maintainer's
choice; the shared change-detection and comment machinery is identical
either way (aligns with PLAN item 6, shared comment-script extraction).
Deploy-step differences from the Pages path:
wrangler pages deploy $BUILD_DIR --project-name=X --branch=pr-N
→wrangler versions upload --preview-alias pr-N
(assets dir + worker name come from a minimalwrangler.toml/.jsonc
with[assets] directoryandpreview_urls = true, generated by the
action or committed per repo — decide below)versions uploadnever touches production traffic — no accidental
"deploy" concept for preview-only workers- Alias URL is CONSTRUCTED, not parsed (same #131 discipline). New
required input:account-subdomain(workers.dev subdomain). The
official wrangler-action doesn't expose the aliased URL in outputs, so
construction remains the right call. - Alias-safety: reuse the existing lowercase/dash mapping;
pr-Nalready
conforms
Design decisions
-
platform:input vs sibling action - wrangler config: generated ephemerally by the action (keeps consumer
repos config-free, like today) vs committed per repo - Pin wrangler ≥ 4.21.0 (also update the pinned CLI baked into the
quantecon-previewimage / GPU AMI per PROJECT-OPTIMIZE-PREVIEWS —
wrangler, not netlify-cli) - Outputs: keep
deploy-url(stable alias) +deployment-url
(per-version hash URL) semantics identical to the Pages action
Verify during pilot (lecture-dp)
- Static asset file-count and 25 MiB limits per Worker version
against the largest repos'_build/html(unclear whether Workers
got the 100k paid bump Pages received Jan 2026) - Version retention: how long old versions + aliased URLs persist;
pruning mechanism (differs from Pages deployments) - Alias stability across many pushes to one PR; behaviour when two
uploads race (concurrency-cancellation from #92 Phase 1 should land
first) - Fork/dependabot trust gate carries over unchanged
- Optional: Cloudflare Access in front of preview URLs (works on
workers.dev previews) for any repo needing gated drafts
Out of scope
- Production publishing (stays on GH Pages)
preview-netlifyremoval (tracked in QuantEcon/infrastructure#4 decommission)
Refs
- QuantEcon/infrastructure#4 (org migration project) · #92 (preview optimization) ·
#105 (pipefail in wrangler output capture — fix before rollout) ·
#131 (constructed alias URL) · PLAN items 5/6
- Lingua principale
- Shell
- Stelle
- 0
- Fork
- 1
- Merge medio
- 20h 3m
- PR unite (30g)
- 48
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di QuantEcon/actions
-
low-priority
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
bug infrastructure
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di QuantEcon/actions
Issue simili
-
ready-for-pr
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
kunchenguid/firstmate#8332 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
fullsend-ai/agents#1932 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
status: ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
melodic-software/claude-code-plugins#15008 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Blacklist | solotogel.orgAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 60/100