Skip to content

Commit 68af179

Browse files
rdhyeeclaude
andauthored
Correct Worker name to isamples-data; account_id; route ordering (#121)
Discovered during initial deploy that data.isamples.org was already served by a Cloudflare Worker named 'isamples-data' (not 'data-isamples-org' as I'd named the new one). Also found two wrangler.toml issues: - `routes` appearing after [[r2_buckets]] got TOML-scoped to that table - No explicit account_id meant non-interactive deploys failed with "more than one account available" Fixes: - Rename Worker to 'isamples-data' so `wrangler deploy` atomically replaces the existing Worker at that name (preserving the route binding in one step). - Add account_id for Raymond.yee@gmail.com's account. - Move `routes` above [[r2_buckets]] so TOML parses it as a top-level key. - Update README to document the name choice. Deployed 2026-04-17, verified: Cache-Control: public, max-age=31536000, immutable is now returned for isamples_202601_*.parquet files. Range requests continue to work (206 + Content-Range). Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 5902faa commit 68af179

2 files changed

Lines changed: 17 additions & 11 deletions

File tree

workers/data-isamples-org/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ wrangler deploy
5555

5656
This publishes the Worker and installs the route `data.isamples.org/*`.
5757

58-
> ⚠️ If another Worker is already bound to `data.isamples.org/*` (e.g. a
59-
> legacy proxy from the original setup), `wrangler deploy` will **replace**
60-
> it. Check `wrangler deployments list` or the Cloudflare dashboard
61-
> (Workers → Routes) before deploying if you want to be cautious.
58+
> The Worker is named `isamples-data` in `wrangler.toml` to match the
59+
> pre-existing Worker that owned `data.isamples.org/*` before this repo
60+
> existed. `wrangler deploy` atomically replaces the existing Worker at
61+
> that name. If you rename, also unassign the old Worker from the route
62+
> first (Cloudflare dashboard → Workers → Routes) or the deploy will
63+
> fail with "already assigned to another worker."
6264
6365
## Verifying
6466

workers/data-isamples-org/wrangler.toml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@
44
# caches can treat versioned parquets as immutable. See README.md for deploy
55
# instructions.
66

7-
name = "data-isamples-org"
7+
name = "isamples-data"
88
main = "src/index.js"
99
compatibility_date = "2026-04-01"
1010

11-
# Bind the R2 bucket that holds the iSamples parquet files.
12-
# The binding name (BUCKET) matches env.BUCKET in src/index.js.
13-
[[r2_buckets]]
14-
binding = "BUCKET"
15-
bucket_name = "isamples-ry"
11+
# Raymond.yee@gmail.com's account — owner of the isamples.org zone and the
12+
# isamples-ry R2 bucket.
13+
account_id = "75e8a095c424e5a4e18fd6f5e6145064"
1614

1715
# Route: everything under data.isamples.org goes through this Worker.
18-
# Zone is inferred from isamples.org being in the same Cloudflare account.
16+
# (Declared before [[r2_buckets]] so TOML doesn't scope it to that table.)
1917
routes = [
2018
{ pattern = "data.isamples.org/*", zone_name = "isamples.org" },
2119
]
2220

2321
# Observability: enable Worker logs in the Cloudflare dashboard.
2422
[observability]
2523
enabled = true
24+
25+
# Bind the R2 bucket that holds the iSamples parquet files.
26+
# The binding name (BUCKET) matches env.BUCKET in src/index.js.
27+
[[r2_buckets]]
28+
binding = "BUCKET"
29+
bucket_name = "isamples-ry"

0 commit comments

Comments
 (0)