Skip to content

fix: correct setup and teardown scripts#179

Merged
saddlepaddle merged 1 commit intomainfrom
fix/setup-teardown-scripts
Nov 29, 2025
Merged

fix: correct setup and teardown scripts#179
saddlepaddle merged 1 commit intomainfrom
fix/setup-teardown-scripts

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented Nov 29, 2025

Summary

  • Fix setup script to properly parse pooled URL from connection_parameters
  • Fix teardown script (was accidentally overwritten with setup content)

Changes

  • superset-setup.sh: Parse pooler_host, password, role, database from Neon output to construct pooled URL correctly
  • superset-teardown.sh: Restore correct teardown logic to delete Neon branch

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added workspace teardown functionality to cleanly remove Superset environments, including automated resource cleanup and graceful error handling.
  • Improvements

    • Enhanced setup process with improved connection parameter handling and optimized environment configuration for better resource management.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 29, 2025

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

Project Deployment Preview Comments Updated (UTC)
website Ready Ready Preview Comment Nov 29, 2025 5:38am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 29, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

These changes modify the Superset Neon integration scripts: the setup script now parses Neon CLI JSON output to extract pooler host connection parameters and constructs a pooled database URL, while the teardown script implements branch deletion logic to clean up the Neon workspace without aborting on errors.

Changes

Cohort / File(s) Summary
Neon setup flow
superset-setup.sh
Updated JSON output handling to filter warnings, extract pooler_host, password, role, and database from connection_uri parameters, and construct DATABASE_POOLED_URL with sslmode=require for .env configuration.
Neon teardown flow
superset-teardown.sh
Replaced setup logic with teardown flow; removed preflight checks (Bun, jq) and dependency installation; introduced branch deletion via neonctl with force flag and graceful error handling; updated messaging.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • JSON parsing logic: Verify the filter for WARNING lines and correct extraction of connection_parameters fields
  • URL construction: Ensure DATABASE_POOLED_URL is correctly assembled with all extracted components and sslmode=require
  • Error handling: Review the teardown script's graceful failure modes (warnings vs. aborts) when branch deletion succeeds, fails, or branch not found
  • Variable extraction: Confirm WORKSPACE_NAME derivation from SUPERSET_WORKSPACE_NAME or current directory works as intended

Possibly related PRs

Poem

🐰 A rabbit hops through setup and teardown dreams,
Parsing JSONs in Neon's pooled streams,
Extract the host, the password, the role,
Build the URL to make databases whole!
Then gracefully delete when the day is through—
No warnings shall stop us, just warnings we brew! 🏗️✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive The PR description provides a clear summary of changes but lacks several required template sections including Related Issues, Type of Change, Testing, and Additional Notes. Complete the description template by adding Type of Change checkboxes, Testing details, and Related Issues if applicable to provide comprehensive context for reviewers.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: correct setup and teardown scripts' accurately summarizes the main changes—fixing both setup and teardown scripts as detailed in the changeset.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8c6d040 and 60f7ac7.

📒 Files selected for processing (2)
  • superset-setup.sh (1 hunks)
  • superset-teardown.sh (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

- Fix setup script to properly parse pooled URL from connection_parameters
- Fix teardown script (was accidentally overwritten with setup content)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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