Add Workers static assets support to the Cloudflare preview action
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
既存の preview-cloudflare Pages アクションと、参照されている #92、#105、#131、および PLAN 項目 5/6 から始め、変更検出、コメント、エイリアス、trust-gate の動作を、提案されている Workers パスと比較します。プラットフォーム、API、設定に関する決定が解決され、Workers のプレビューエイリアスと出力が lecture-dp パイロットで機能し、列挙された制限、保持期間、競合、trust-gate のチェックが検証されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Shell
- スター
- 0
- フォーク
- 1
- 平均マージ
- 20時間 3分
- マージ済み PR(30日)
- 48
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
QuantEcon/actions のほかの issue
-
low-priority
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
bug infrastructure
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
QuantEcon/actions の issue をすべて見る
似ている issue
-
area: helpers bug good first issue priority: low size: S
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
area: scripts area: tests bug ci containers developer-experience devops difficulty: easy docker dx good first issue help wanted island: Test Atoll linting quality rank: 8 kyu smoke-tests tech: docker testing tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
ci: Simplify e2e base image build対応中かも @nealrichardson が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
help wanted new command
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
tldr-pages/tldr#25111 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
AdguardTeam/adguardcert#73 ·