Repository navigation
backend setup --analytics basin|duckdb, --ingest, backend migrate (plans/35, 0.19.0) - #44
Merged
Merged
Conversation
…e (plans/35) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…backend migrate; 0.19.0 (plans/35) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d, not written unchecked Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CLI side of plans/35 (backend move and scale-out), built to the plan's Contracts B and C and the A/B migration job contract. Version 0.19.0.
Sink switch (Contracts B)
backend setup --analytics basin --events <url> --recordings <url>writesanalytics = { backend: "basin", events, recordings, token, ...dials }. The token isBASIN_SEND_TOKENfrom env /.env(never a flag, never printed).backendstays as the fleet API.--analytics duckdbmoves analytics back to the backend.--analytics, the record's sink is kept. 0.18 replaced a Basin sink.checkBackendEndpoint({ parts })), so aTYPETORCH_PARTS=fleetbackend passes. The streams are checked too. doctor does the same.--ingest <url>/--ingest none(Contracts C)backend.ingest, checked unless--force:/healthz, plus the game key must get rolegamefrom/v1/auth/check. Without the flag the address is kept and checked again.analyticsduckdb section still points atbackend.url.typetorch backend migrate--from <url>(TYPETORCH_OLD_ADMIN_TOKEN),--from-basin(CLOUDFLARE_ACCOUNT_ID,BASIN_BUCKET,BASIN_SQL_TOKEN,BASIN_NAMESPACE), or--to-basin [--events --recordings](BASIN_SEND_TOKEN; the streams default to the record's). Optional[--rows-per-second].status [--json] [--watch],pause,resume,cancel,resolve <page> resend|skip.--fromchecks first: the old server's/healthzand that the token is admin there.--forceskips these checks. It refuses--fromequal tobackend.url, and warns when the signed record still points at the old URL.statusshows the steps, a bar and percent, rows/s, the cap, the days to go and an ETA. The per-day report gives counts per table and lists every missing / differs / duplicates day. It also showswaitingFor, the decision with bothresolvecommands, anderror.--watchpolls every 5 s, each call has a 10 s timeout, and Ctrl+C exits cleanly.BASIN_SEND_TOKEN,BASIN_SQL_TOKENandTYPETORCH_OLD_ADMIN_TOKENare inSECRET_VARS: scrubbed from output and never passed to a child process.Tests
test/backend-move.test.ts, 14 tests against mocked servers:bodyProblems;--ingestset / kept / removed;--tokenflag is refused;--watch, Ctrl+C, retries.bunx tsc --noEmitclean,bun run buildok,node scripts/smoke.mjspasses.bun test: 884 pass, 6 fail. All 6 also fail on main 84e73d8 in this environment:migrate.test.ts,debug-macros.test.tsandkernel-luau.test.ts;backend blesstest, which depends on test order.Notes
backend setupis no longer needed with this CLI.--ingestkey check needs ingest-role nodes to answerGET /v1/auth/check. Contract C's list of ingest routes doesn't include it; otherwise use--force.🤖 Generated with Claude Code