Repository navigation
chore: finish the .superset → .paradev move for repo config, dev data and worktree repair #9265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b11a8fd
4e221e9
0b643e6
afd77cd
482f3a8
a4276d5
4491485
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "setup": ["./.paradev/setup.sh"], | ||
| "teardown": ["./.paradev/teardown.sh"], | ||
| "run": ["bun dev"], | ||
| "start": ["./.paradev/setup.cloud.sh", "./.paradev/dev-stack.cloud.sh"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,22 @@ | ||
| # How Superset sets up, runs and archives this repository's workspaces. | ||
| # How Paradev sets up, runs and archives this repository's workspaces. | ||
| # Reference: apps/docs/content/docs/setup-teardown-scripts.mdx | ||
| # config.json stays until every sandbox runs a host-service that reads this file. | ||
|
|
||
| [setup] | ||
| run = ["./.superset/setup.sh"] | ||
| run = ["./.paradev/setup.sh"] | ||
|
|
||
| [setup.cloud] | ||
| run = ["./.superset/setup.cloud.sh"] | ||
| run = ["./.paradev/setup.cloud.sh"] | ||
|
|
||
| [terminals.dev] | ||
| run = "bun dev" | ||
| default = true | ||
|
|
||
| [terminals.dev.cloud] | ||
| run = "./.superset/dev-stack.cloud.sh" | ||
| run = "./.paradev/dev-stack.cloud.sh" | ||
|
|
||
| [archive] | ||
| run = ["./.superset/teardown.sh"] | ||
| run = ["./.paradev/teardown.sh"] | ||
|
|
||
| [archive.cloud] | ||
| run = ["./.superset/archive.cloud.sh"] | ||
| run = ["./.paradev/archive.cloud.sh"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| #!/usr/bin/env bash | ||
| # In tmux so the logs stay reachable: `tmux attach -t superset`. | ||
| # In tmux so the logs stay reachable: `tmux attach -t paradev`. | ||
| set -uo pipefail | ||
|
|
||
| ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" | ||
|
|
@@ -20,19 +20,19 @@ box_memory_mb() { | |
|
|
||
| [ -f "$ROOT_DIR/.env" ] || { echo "dev-stack: no .env; the provision hook writes it"; exit 0; } | ||
| command -v tmux >/dev/null || { echo "dev-stack: tmux is not installed"; exit 0; } | ||
| tmux has-session -t superset 2>/dev/null && { echo "dev-stack: already running"; exit 0; } | ||
| tmux has-session -t paradev 2>/dev/null && { echo "dev-stack: already running"; exit 0; } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Detect the existing If a developer pulls this change while the old
|
||
| MEMORY_MB="$(box_memory_mb)" | ||
| [ "$MEMORY_MB" -ge "$DEV_SERVERS_MIN_MB" ] || { echo "dev-stack: ${MEMORY_MB} MB box; not starting the dev servers (needs ${DEV_SERVERS_MIN_MB})"; exit 0; } | ||
|
|
||
| mkdir -p "$LOG_DIR" | ||
| tmux new-session -d -s superset -n stack -c "$ROOT_DIR" \ | ||
| tmux new-session -d -s paradev -n stack -c "$ROOT_DIR" \ | ||
| "export NODE_ENV=development; set -a; . '$ROOT_DIR/.env'; set +a; bunx turbo run dev --filter=@superset/api --filter=@superset/web --filter=// 2>&1 | tee '$LOG_DIR/dev-stack.log'" | ||
| if [ "$MEMORY_MB" -ge "$DESKTOP_DEV_MIN_MB" ]; then | ||
| tmux new-window -t superset -n desktop -c "$ROOT_DIR/apps/desktop" \ | ||
| tmux new-window -t paradev -n desktop -c "$ROOT_DIR/apps/desktop" \ | ||
| "export DISPLAY=${DISPLAY:-:1} NODE_ENV=development; set -a; . '$ROOT_DIR/.env'; set +a; unset SUPERSET_SANDBOX_WORKSPACE_ID; bun run dev 2>&1 | tee '$LOG_DIR/desktop-dev.log'" | ||
| else | ||
| echo "dev-stack: ${MEMORY_MB} MB box; skipping the desktop dev build (needs ${DESKTOP_DEV_MIN_MB})" | ||
| fi | ||
| tmux new-window -t superset -n realtime -c "$ROOT_DIR" \ | ||
| tmux new-window -t paradev -n realtime -c "$ROOT_DIR" \ | ||
| "bash '$ROOT_DIR/apps/realtime/scripts/dev-local.sh' 2>&1 | tee '$LOG_DIR/realtime-dev.log'" | ||
| echo "dev-stack: started (tmux attach -t superset)" | ||
| echo "dev-stack: started (tmux attach -t paradev)" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -212,11 +212,8 @@ seed_missing_env_placeholders() { | |
| return 0 | ||
| } | ||
|
|
||
| # The installed app's home: ~/.superset until the installed app has moved it. | ||
| DEV_DATA_DIR="paradev-dev-data" | ||
|
|
||
| prod_app_home() { | ||
| if [ -d "$HOME/.superset" ] && [ ! -L "$HOME/.superset" ]; then | ||
| echo "$HOME/.superset" | ||
| else | ||
| echo "$HOME/.paradev" | ||
| fi | ||
| echo "$HOME/.paradev" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preserve the legacy production home until it moves. If
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -334,7 +334,7 @@ step_write_env() { | |
| # The dev app reads its display title live from the app home's host/*/host.db, | ||
| # so a later workspace rename never needs this file rewritten. | ||
| write_env_var "SUPERSET_WORKSPACE_NAME" "${WORKSPACE_NAME:-$(basename "$PWD")}" | ||
| write_env_var "SUPERSET_HOME_DIR" "$PWD/superset-dev-data" | ||
| write_env_var "SUPERSET_HOME_DIR" "$PWD/$DEV_DATA_DIR" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Migrate the home path in existing cloud workspaces. If a cloud workspace already has its database and
|
||
| echo "" | ||
| echo "# Workspace Database (Neon Branch)" | ||
| if [ -n "${BRANCH_ID:-}" ]; then | ||
|
|
@@ -423,15 +423,15 @@ step_write_env() { | |
|
|
||
| success "Workspace .env written" | ||
|
|
||
| # Generate .superset/ports.json for static port name mapping in the desktop app | ||
| local superset_dir | ||
| superset_dir="${SUPERSET_SCRIPT_DIR:-$(dirname "$0")}" | ||
| # Generate .paradev/ports.json for static port name mapping in the desktop app | ||
| local paradev_dir | ||
| paradev_dir="${PARADEV_SCRIPT_DIR:-$(dirname "$0")}" | ||
| assert_unique_ports "$WEB_PORT" "$API_PORT" "$MARKETING_PORT" "$ADMIN_PORT" \ | ||
| "$DOCS_PORT" "$DESKTOP_VITE_PORT" "$DESKTOP_NOTIFICATIONS_PORT" "$STREAMS_PORT" \ | ||
| "$STREAMS_INTERNAL_PORT" "$CODE_INSPECTOR_PORT" "$RELAY_PORT" "$USERCONTENT_DEV_PORT" \ | ||
| "$SANDBOX_GATE_DEV_PORT" "$REALTIME_PORT" || return 1 | ||
|
|
||
| cat > "$superset_dir/ports.json" <<PORTSJSON | ||
| cat > "$paradev_dir/ports.json" <<PORTSJSON | ||
| { | ||
| "ports": [ | ||
| { "port": $WEB_PORT, "label": "Web" }, | ||
|
|
@@ -449,7 +449,7 @@ step_write_env() { | |
| ] | ||
| } | ||
| PORTSJSON | ||
| success "Port name mapping written to .superset/ports.json" | ||
| success "Port name mapping written to .paradev/ports.json" | ||
|
|
||
| return 0 | ||
| } | ||
|
|
@@ -472,9 +472,9 @@ step_setup_local_mcp() { | |
| local api_port="${API_PORT:-$((${SUPERSET_PORT_BASE:-3000} + 1))}" | ||
| local local_url="http://localhost:${api_port}/api/v2/agent/mcp" | ||
|
|
||
| # Add or update superset-local entry | ||
| # Add or update paradev-local entry | ||
| local tmp_file="${mcp_file}.tmp.$$" | ||
| if ! jq --arg url "$local_url" '.mcpServers["superset-local"] = {"type": "http", "url": $url}' "$mcp_file" > "$tmp_file"; then | ||
| if ! jq --arg url "$local_url" '.mcpServers["paradev-local"] = {"type": "http", "url": $url} | del(.mcpServers["superset-local"])' "$mcp_file" > "$tmp_file"; then | ||
| error "Failed to set local MCP entry" | ||
| rm -f "$tmp_file" | ||
| return 1 | ||
|
|
@@ -490,10 +490,10 @@ step_setup_local_mcp() { | |
| } | ||
|
|
||
| step_seed_auth_token() { | ||
| echo "🔑 Seeding auth token into superset-dev-data/..." | ||
| echo "🔑 Seeding auth token into paradev-dev-data/..." | ||
|
|
||
| local source_token="$(prod_app_home)/auth-token.enc" | ||
| local dev_data_dir="superset-dev-data" | ||
| local dev_data_dir="$DEV_DATA_DIR" | ||
| local dest_token="$dev_data_dir/auth-token.enc" | ||
|
|
||
| if [ ! -f "$source_token" ]; then | ||
|
|
@@ -522,10 +522,10 @@ step_seed_auth_token() { | |
| } | ||
|
|
||
| step_seed_host_dbs() { | ||
| echo "🛰️ Seeding host-service DBs into superset-dev-data/host/..." | ||
| echo "🛰️ Seeding host-service DBs into paradev-dev-data/host/..." | ||
|
|
||
| local source_root="$(prod_app_home)/host" | ||
| local dev_data_dir="superset-dev-data" | ||
| local dev_data_dir="$DEV_DATA_DIR" | ||
| local dest_root="$dev_data_dir/host" | ||
| local force_overwrite="$FORCE_OVERWRITE_DATA" | ||
|
|
||
|
|
@@ -612,10 +612,10 @@ step_seed_host_dbs() { | |
| } | ||
|
|
||
| step_seed_local_db() { | ||
| echo "💾 Seeding local DB into superset-dev-data/..." | ||
| echo "💾 Seeding local DB into paradev-dev-data/..." | ||
|
|
||
| local source_db="$(prod_app_home)/local.db" | ||
| local dev_data_dir="superset-dev-data" | ||
| local dev_data_dir="$DEV_DATA_DIR" | ||
| local dest_db="$dev_data_dir/local.db" | ||
| local force_overwrite="$FORCE_OVERWRITE_DATA" | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The renamed
has-sessionguard no longer detects a dev stack started under the legacysupersettmux session. Re-running the start hook on that box launches a second stack on the same ports. Check the legacy session too until old sessions are gone.Prompt for AI agents