Skip to content

Configure Superset for parallel workspaces - #30

Merged
Programcode merged 1 commit into
mainfrom
superset-repo-config
Sep 5, 2026
Merged

Programcode merged 1 commit into
mainfrom
superset-repo-config

Conversation

@Programcode

@Programcode Programcode commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add .superset/config.json (setup/run/teardown) so a new Superset workspace installs deps automatically and starts the dev server through .superset/dev.sh.
  • Add a shared port allocator (.superset/lib/port-alloc.cjs + .superset/lib/lock.sh) so parallel worktrees each get a unique port instead of colliding on the hardcoded :8080 in vite.config.ts (now reads process.env.PORT first).
  • Add .superset/db-gate.sh to serialize the Docker-backed Supabase DB gate (supabase db start / npm run test:db) across workspaces, since supabase/config.toml has no per-project port config and two workspaces running it at once collide in Docker.
  • Document the above in AGENTS.md and gitignore personal .superset/config.local.json overrides.

Test plan

  • bash -n on all new shell scripts, node --check on the port allocator, JSON validated
  • Allocator verified directly: sequential ports for distinct workspace keys, reuse on repeat calls, clean release
  • npm ci + ./.superset/dev.sh end-to-end: allocated port 8080, curl returned HTTP 200, ./.superset/teardown.sh released the allocation
  • npm run typecheck and npm run lint pass with the vite.config.ts change

🤖 Generated with Claude Code

https://claude.ai/code/session_0163LcrphWJjYjTXM33mQuH6

Summary by CodeRabbit

  • New Features
    • Added support for running multiple development workspaces concurrently with automatic port allocation.
    • Added safeguards to coordinate local database startup and database tests.
    • Added automated workspace cleanup for allocated development ports and local services.
  • Documentation
    • Documented setup and workflow guidance for concurrent workspaces.
  • Developer Experience
    • Development servers now honor a configured port and default to port 8080 when none is provided.
    • Added local configuration support for workspace tooling.

Wire up .superset/config.json (setup/run/teardown) so a new workspace
installs deps automatically, and add a shared port allocator so several
worktrees can run `npm run dev` at once without colliding on the
hardcoded :8080. Serialize the Docker-backed Supabase DB gate behind a
lock instead, since it has no per-project port config.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0163LcrphWJjYjTXM33mQuH6
@vercel

vercel Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
debate-navigator Ready Ready Preview Sep 5, 2026 3:30pm UTC

@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Free

Run ID: 325ccc0f-bb02-4941-867a-b7e151ab8911

📥 Commits

Reviewing files that changed from the base of the PR and between 89529bf and 410ff27.

📒 Files selected for processing (9)
  • .gitignore
  • .superset/config.json
  • .superset/db-gate.sh
  • .superset/dev.sh
  • .superset/lib/lock.sh
  • .superset/lib/port-alloc.cjs
  • .superset/teardown.sh
  • AGENTS.md
  • vite.config.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Added tooling for concurrent Superset workspaces. The tooling allocates ports, coordinates shared locks, manages Supabase lifecycle operations, configures Vite, and documents workspace setup.

Changes

Superset workspace tooling

Layer / File(s) Summary
Coordination primitives
.superset/lib/lock.sh, .superset/lib/port-alloc.cjs
Added advisory locking and persistent workspace port allocation.
Workspace lifecycle integration
.superset/dev.sh, .superset/teardown.sh, vite.config.ts
Added port allocation and cleanup scripts. Vite now reads the selected PORT value.
Database test gate
.superset/db-gate.sh
Added exclusive Supabase locking, database startup, database tests, and cleanup.
Workspace configuration and guidance
.superset/config.json, AGENTS.md, .gitignore
Added setup commands, teardown commands, parallel-workspace guidance, and local configuration ignores.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Workspace as Superset workspace
  participant DevScript as .superset/dev.sh
  participant PortAllocator as port-alloc.cjs
  participant Vite as Vite dev server
  Workspace->>DevScript: start development
  DevScript->>PortAllocator: allocate workspace port
  PortAllocator-->>DevScript: return port
  DevScript->>Vite: run with PORT
  Vite-->>Workspace: serve on allocated localhost port
Loading

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

@Programcode
Programcode merged commit 7b1dfc8 into main Sep 5, 2026
7 checks passed
@Programcode
Programcode deleted the superset-repo-config branch September 5, 2026 15:44

This branch was successfully deployed

1 active deployment
Preview — 410ff27d Deployed Sep 5, 2026 by vercel[bot]
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