Skip to content

Run live E2E against a single CI workspace without user tokens - #188

Draft
sandshoes wants to merge 1 commit into
mainfrom
e2e-live-workspace-tokens
Draft

sandshoes wants to merge 1 commit into
mainfrom
e2e-live-workspace-tokens

Conversation

@sandshoes

@sandshoes sandshoes commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Live E2E suites no longer use a user token or create/delete a workspace per suite. They run against a single CI workspace with two workspace-scoped tokens:

Secret Used for
TINYBIRD_E2E_WORKSPACE_TOKEN branches, ingest, query, pull
TINYBIRD_E2E_DEPLOY_TOKEN production deploys (deploy, pull suites)

Changes

  • e2e-live/cloud-workspace.ts: removed the workspace create/fetch/delete helpers and the admin-token check. Added createRunScopedName, and deployToProduction, which deploys with the deploy token and then switches back to the workspace token.
  • Branch suites (init, build, append, null-engine) run on per-run branches in the shared workspace.
  • Production suites (deploy, pull) deploy with allowDestructiveOperations, because each deploy replaces whatever the previous one left.
  • Bug fix: the suites now clear GITHUB_HEAD_REF. The SDK prefers it over GITHUB_REF_NAME, so on pull_request runs every suite was using the PR's branch name instead of its own.
  • e2e-live/global-setup.ts deletes leftover live_* branches from cancelled or crashed runs.
  • append and build assertions check per-run values, not fixed strings or rows > 0.
  • ci.yml: the e2e job uses the e2e-live environment, a concurrency group (runs share one workspace) and the new secret names.

Verification

  • pnpm typecheck and pnpm test:run pass, and e2e-live/*.ts typechecks.
  • With no token set, all live suites are skipped, as before.
  • Not yet run against a live workspace.

Requires the CI workspace and secrets to be configured before merge (tracked internally).

🤖 Generated with Claude Code

Live E2E suites used a personal user token to create and delete a
temporary workspace per suite. Switch to one dedicated CI workspace:

- Workspace admin token for branches, ingest, query and pull.
- WORKSPACE:DEPLOY token for production deploys (falls back to the
  admin token locally).
- Remove workspace create/delete helpers and the admin-token check.
- Clear GITHUB_HEAD_REF in suites: the SDK prefers it over
  GITHUB_REF_NAME, so on pull_request runs every suite used the PR
  branch name instead of its own run-scoped branch.
- Global setup deletes leftover live_* branches from killed runs.
- Assertions in append/build use per-run values.
- CI: e2e-live environment, concurrency group, new secret names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
e2e-live — 77036b2e Deployed Nov 9, 2026 by sandshoes via e2e #440
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant