# ๐ช Superset Showtime
**Modern ephemeral environment management for Apache Superset using circus tent emoji labels**
[](https://badge.fury.io/py/superset-showtime)
[](https://www.python.org/downloads/)
## ๐ฏ What is Showtime?
Superset Showtime is a CLI tool designed primarily for **GitHub Actions** to manage Apache Superset ephemeral environments. It uses **circus tent emoji labels** as a visual state management system and depends on Superset's existing build infrastructure.
## ๐ Quick Start for Superset Contributors
**Create an ephemeral environment:**
1. Go to your PR in GitHub
2. Add label: `๐ช โก showtime-trigger-start`
3. Watch the magic happen - labels will update automatically
4. When you see `๐ช ๐ฆ {sha} running`, your environment is ready!
5. Get URL from `๐ช ๐ {sha} {ip}` โ `http://{ip}:8080`
6. **Every new commit automatically deploys a fresh environment** (zero-downtime)
**To test a specific commit without auto-updates:**
- Add label: `๐ช ๐ง showtime-freeze` (prevents auto-sync on new commits)
**Clean up when done:**
```bash
# Add this label:
๐ช ๐ showtime-trigger-stop
# All circus labels disappear, AWS resources cleaned up
```
## ๐ช How It Works
**๐ช GitHub labels become a visual state machine:**
```bash
# User adds trigger label in GitHub UI:
๐ช โก showtime-trigger-start
# System responds with state labels:
๐ช abc123f ๐ฆ building # Environment abc123f is building
๐ช ๐ฏ abc123f # abc123f is the active environment
๐ช abc123f ๐
2024-01-15T14-30 # Created timestamp
๐ช abc123f โ 24h # Time-to-live policy
๐ช abc123f ๐คก maxime # Requested by maxime (clown emoji!)
# When ready:
๐ช abc123f ๐ฆ running # Environment is now running
๐ช abc123f ๐ 52-1-2-3 # Available at http://52.1.2.3:8080
```
### ๐ Showtime Workflow
```mermaid
flowchart TD
A[User adds ๐ช โก trigger-start] --> B[GitHub Actions: sync]
B --> C{Current state?}
C -->|No environment| D[๐ Claim: Remove trigger + Set building]
C -->|Running + new SHA| E[๐ Claim: Remove trigger + Set building]
C -->|Already building| F[โ Exit: Another job active]
C -->|No triggers| G[โ Exit: Nothing to do]
D --> H[๐ State: building]
E --> H
H --> I[๐ณ Docker build]
I -->|Success| J[๐ State: built]
I -->|Fail| K[๐ State: failed]
J --> L[๐ State: deploying]
L --> M[โ๏ธ AWS Deploy]
M -->|Success| N[๐ State: running]
M -->|Fail| O[๐ State: failed]
N --> P[๐ช Environment ready!]
Q[User adds ๐ช ๐ trigger-stop] --> R[๐งน Cleanup AWS + Remove labels]
```
**Install CLI for debugging:**
```bash
pip install superset-showtime
export GITHUB_TOKEN=your_token
```
**Monitor and debug:**
```bash
showtime list # See all active environments
showtime status 1234 # Debug specific environment
showtime labels # Complete label reference
```
**Testing/development:**
```bash
showtime sync 1234 --dry-run-aws --dry-run-docker # Test without costs
showtime cleanup --dry-run --older-than 1h # Test cleanup logic
```
> **Architecture**: This CLI implements ACID-style atomic transactions with direct Docker integration. It handles complete environment lifecycle from Docker build to AWS deployment with race condition prevention.
## ๐ช Complete Label Reference
### ๐ฏ Trigger Labels (Add These to Your PR)
| Label | Action | Result |
|-------|---------|---------|
| `๐ช โก showtime-trigger-start` | Create environment | Builds and deploys ephemeral environment with blue-green deployment |
| `๐ช ๐ showtime-trigger-stop` | Destroy environment | Cleans up AWS resources and removes all labels |
| `๐ช ๐ง showtime-freeze` | Freeze environment | Prevents auto-sync on new commits (for testing specific SHAs) |
### ๐ State Labels (Automatically Managed)
| Label Pattern | Meaning | Example |
|---------------|---------|---------|
| `๐ช {sha} ๐ฆ {status}` | Environment status | `๐ช abc123f ๐ฆ running` |
| `๐ช ๐ฏ {sha}` | Active environment pointer | `๐ช ๐ฏ abc123f` |
| `๐ช ๐๏ธ {sha}` | Building environment pointer | `๐ช ๐๏ธ def456a` |
| `๐ช {sha} ๐
{timestamp}` | Creation time | `๐ช abc123f ๐
2024-01-15T14-30` |
| `๐ช {sha} ๐ {ip:port}` | Environment URL | `๐ช abc123f ๐ 52.1.2.3:8080` |
| `๐ช {sha} โ {ttl}` | Time-to-live policy | `๐ช abc123f โ 24h` |
| `๐ช {sha} ๐คก {username}` | Who requested | `๐ช abc123f ๐คก maxime` |
## ๐ง Testing Configuration Changes
**Approach**: Modify configuration directly in your PR code, then trigger environment.
**Workflow**:
1. Modify `superset_config.py` with your changes
2. Push commit โ Creates new SHA (e.g., `def456a`)
3. Add `๐ช โก showtime-trigger-start` โ Deploys with your config
4. Test environment reflects your exact code changes
This approach creates traceable, reviewable changes that are part of your git history.
## ๐ Complete Workflows
### Creating Your First Environment
1. **Add trigger label** in GitHub UI: `๐ช โก showtime-trigger-start`
2. **Watch state labels appear:**
```
๐ช abc123f ๐ฆ building โ Environment is building
๐ช ๐ฏ abc123f โ This is the active environment
๐ช abc123f ๐
2024-01-15T14-30 โ Started building at this time
```
3. **Wait for completion:**
```
๐ช abc123f ๐ฆ running โ Now ready!
๐ช abc123f ๐ 52.1.2.3:8080 โ Visit http://52.1.2.3:8080
```
### Testing Specific Commits
1. **Add freeze label:** `๐ช ๐ง showtime-freeze`
2. **Result:** Environment won't auto-update on new commits
3. **Use case:** Test specific SHA while continuing development
4. **Override:** Add `๐ช โก showtime-trigger-start` to force update despite freeze
### Rolling Updates (Automatic!)
When you push new commits, Showtime automatically:
1. **Detects new commit** via GitHub webhook
2. **Builds new environment** alongside old one
3. **Switches traffic** when new environment is ready
4. **Cleans up old environment**
You'll see:
```bash
# During update:
๐ช abc123f ๐ฆ running # Old environment still serving
๐ช def456a ๐ฆ building # New environment building
๐ช ๐ฏ abc123f # Traffic still on old
๐ช ๐๏ธ def456a # New one being prepared
# After update:
๐ช def456a ๐ฆ running # New environment live
๐ช ๐ฏ def456a # Traffic switched
๐ช def456a ๐ 52-4-5-6 # New IP address
# All abc123f labels removed automatically
```
## ๐ Security & Permissions
### Who Can Use This?
- **โ
Superset maintainers** (with write access) can add trigger labels
- **โ External contributors** cannot trigger environments (no write access to add labels)
- **๐ Secure by design** - only trusted users can create expensive AWS resources
### GitHub Actions Integration
**๐ฏ Live Workflow**: [showtime-trigger.yml](https://github.com/apache/superset/actions/workflows/showtime-trigger.yml)
**How it works:**
- Triggers on PR label changes, commits, and closures
- Installs `superset-showtime` from PyPI (trusted code, not PR code)
- Runs `showtime sync` to handle trigger processing and deployments
- Supports manual testing via `workflow_dispatch` with specific SHA override
**Commands used:**
```bash
showtime sync PR_NUMBER --check-only # Determine build_needed + target_sha
showtime sync PR_NUMBER --sha SHA # Execute atomic claim + build + deploy
```
## ๐ ๏ธ CLI Usage
The CLI is primarily used by GitHub Actions, but available for debugging and advanced users:
```bash
pip install superset-showtime
export GITHUB_TOKEN=your_token
# Core commands:
showtime sync PR_NUMBER # Sync to desired state (main command)
showtime start PR_NUMBER # Create new environment
showtime stop PR_NUMBER # Delete environment
showtime status PR_NUMBER # Show current state
showtime list # List all environments
showtime cleanup --older-than 48h # Clean up expired environments
```
## ๐ค Contributing
### Testing Your Changes
**Test with real PRs safely:**
```bash
# Test full workflow without costs:
showtime sync YOUR_PR_NUMBER --dry-run-aws --dry-run-docker
# Test cleanup logic:
showtime cleanup --dry-run --older-than 24h
```
### Development Setup
```bash
git clone https://github.com/mistercrunch/superset-showtime
cd superset-showtime
# Using uv (recommended):
uv pip install -e ".[dev]"
make pre-commit
make test
# Traditional pip:
pip install -e ".[dev]"
pre-commit install
pytest
```
## ๐ License
Apache License 2.0 - same as Apache Superset.
---
**๐ช "Ladies and gentlemen, welcome to Superset Showtime - where ephemeral environments are always under the big top!"** ๐ช๐คกโจ
Raw data
{
"_id": null,
"home_page": null,
"name": "superset-showtime",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "aws, circus, devops, environments, ephemeral, github, showtime, superset",
"author": null,
"author_email": "Maxime Beauchemin <maximebeauchemin@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/fb/48/f90be708fd2bd553d217f4cd9dd6b4fd1c230c35bbe256321762c3214939/superset_showtime-0.6.4.tar.gz",
"platform": null,
"description": "# \ud83c\udfaa Superset Showtime\n\n**Modern ephemeral environment management for Apache Superset using circus tent emoji labels**\n\n[](https://badge.fury.io/py/superset-showtime)\n[](https://www.python.org/downloads/)\n\n## \ud83c\udfaf What is Showtime?\n\nSuperset Showtime is a CLI tool designed primarily for **GitHub Actions** to manage Apache Superset ephemeral environments. It uses **circus tent emoji labels** as a visual state management system and depends on Superset's existing build infrastructure.\n\n## \ud83d\ude80 Quick Start for Superset Contributors\n\n**Create an ephemeral environment:**\n1. Go to your PR in GitHub\n2. Add label: `\ud83c\udfaa \u26a1 showtime-trigger-start`\n3. Watch the magic happen - labels will update automatically\n4. When you see `\ud83c\udfaa \ud83d\udea6 {sha} running`, your environment is ready!\n5. Get URL from `\ud83c\udfaa \ud83c\udf10 {sha} {ip}` \u2192 `http://{ip}:8080`\n6. **Every new commit automatically deploys a fresh environment** (zero-downtime)\n\n**To test a specific commit without auto-updates:**\n- Add label: `\ud83c\udfaa \ud83e\uddca showtime-freeze` (prevents auto-sync on new commits)\n\n**Clean up when done:**\n```bash\n# Add this label:\n\ud83c\udfaa \ud83d\uded1 showtime-trigger-stop\n# All circus labels disappear, AWS resources cleaned up\n```\n\n## \ud83c\udfaa How It Works\n\n**\ud83c\udfaa GitHub labels become a visual state machine:**\n```bash\n# User adds trigger label in GitHub UI:\n\ud83c\udfaa \u26a1 showtime-trigger-start\n\n# System responds with state labels:\n\ud83c\udfaa abc123f \ud83d\udea6 building # Environment abc123f is building\n\ud83c\udfaa \ud83c\udfaf abc123f # abc123f is the active environment\n\ud83c\udfaa abc123f \ud83d\udcc5 2024-01-15T14-30 # Created timestamp\n\ud83c\udfaa abc123f \u231b 24h # Time-to-live policy\n\ud83c\udfaa abc123f \ud83e\udd21 maxime # Requested by maxime (clown emoji!)\n\n# When ready:\n\ud83c\udfaa abc123f \ud83d\udea6 running # Environment is now running\n\ud83c\udfaa abc123f \ud83c\udf10 52-1-2-3 # Available at http://52.1.2.3:8080\n```\n\n### \ud83d\udd04 Showtime Workflow\n\n```mermaid\nflowchart TD\n A[User adds \ud83c\udfaa \u26a1 trigger-start] --> B[GitHub Actions: sync]\n B --> C{Current state?}\n\n C -->|No environment| D[\ud83d\udd12 Claim: Remove trigger + Set building]\n C -->|Running + new SHA| E[\ud83d\udd12 Claim: Remove trigger + Set building]\n C -->|Already building| F[\u274c Exit: Another job active]\n C -->|No triggers| G[\u274c Exit: Nothing to do]\n\n D --> H[\ud83d\udccb State: building]\n E --> H\n H --> I[\ud83d\udc33 Docker build]\n I -->|Success| J[\ud83d\udccb State: built]\n I -->|Fail| K[\ud83d\udccb State: failed]\n\n J --> L[\ud83d\udccb State: deploying]\n L --> M[\u2601\ufe0f AWS Deploy]\n M -->|Success| N[\ud83d\udccb State: running]\n M -->|Fail| O[\ud83d\udccb State: failed]\n\n N --> P[\ud83c\udfaa Environment ready!]\n\n Q[User adds \ud83c\udfaa \ud83d\uded1 trigger-stop] --> R[\ud83e\uddf9 Cleanup AWS + Remove labels]\n```\n\n\n**Install CLI for debugging:**\n```bash\npip install superset-showtime\nexport GITHUB_TOKEN=your_token\n```\n\n**Monitor and debug:**\n```bash\nshowtime list # See all active environments\nshowtime status 1234 # Debug specific environment\nshowtime labels # Complete label reference\n```\n\n**Testing/development:**\n```bash\nshowtime sync 1234 --dry-run-aws --dry-run-docker # Test without costs\nshowtime cleanup --dry-run --older-than 1h # Test cleanup logic\n```\n\n> **Architecture**: This CLI implements ACID-style atomic transactions with direct Docker integration. It handles complete environment lifecycle from Docker build to AWS deployment with race condition prevention.\n\n## \ud83c\udfaa Complete Label Reference\n\n### \ud83c\udfaf Trigger Labels (Add These to Your PR)\n\n| Label | Action | Result |\n|-------|---------|---------|\n| `\ud83c\udfaa \u26a1 showtime-trigger-start` | Create environment | Builds and deploys ephemeral environment with blue-green deployment |\n| `\ud83c\udfaa \ud83d\uded1 showtime-trigger-stop` | Destroy environment | Cleans up AWS resources and removes all labels |\n| `\ud83c\udfaa \ud83e\uddca showtime-freeze` | Freeze environment | Prevents auto-sync on new commits (for testing specific SHAs) |\n\n### \ud83d\udcca State Labels (Automatically Managed)\n\n| Label Pattern | Meaning | Example |\n|---------------|---------|---------|\n| `\ud83c\udfaa {sha} \ud83d\udea6 {status}` | Environment status | `\ud83c\udfaa abc123f \ud83d\udea6 running` |\n| `\ud83c\udfaa \ud83c\udfaf {sha}` | Active environment pointer | `\ud83c\udfaa \ud83c\udfaf abc123f` |\n| `\ud83c\udfaa \ud83c\udfd7\ufe0f {sha}` | Building environment pointer | `\ud83c\udfaa \ud83c\udfd7\ufe0f def456a` |\n| `\ud83c\udfaa {sha} \ud83d\udcc5 {timestamp}` | Creation time | `\ud83c\udfaa abc123f \ud83d\udcc5 2024-01-15T14-30` |\n| `\ud83c\udfaa {sha} \ud83c\udf10 {ip:port}` | Environment URL | `\ud83c\udfaa abc123f \ud83c\udf10 52.1.2.3:8080` |\n| `\ud83c\udfaa {sha} \u231b {ttl}` | Time-to-live policy | `\ud83c\udfaa abc123f \u231b 24h` |\n| `\ud83c\udfaa {sha} \ud83e\udd21 {username}` | Who requested | `\ud83c\udfaa abc123f \ud83e\udd21 maxime` |\n\n## \ud83d\udd27 Testing Configuration Changes\n\n**Approach**: Modify configuration directly in your PR code, then trigger environment.\n\n**Workflow**:\n1. Modify `superset_config.py` with your changes\n2. Push commit \u2192 Creates new SHA (e.g., `def456a`)\n3. Add `\ud83c\udfaa \u26a1 showtime-trigger-start` \u2192 Deploys with your config\n4. Test environment reflects your exact code changes\n\nThis approach creates traceable, reviewable changes that are part of your git history.\n\n## \ud83d\udd04 Complete Workflows\n\n### Creating Your First Environment\n\n1. **Add trigger label** in GitHub UI: `\ud83c\udfaa \u26a1 showtime-trigger-start`\n2. **Watch state labels appear:**\n ```\n \ud83c\udfaa abc123f \ud83d\udea6 building \u2190 Environment is building\n \ud83c\udfaa \ud83c\udfaf abc123f \u2190 This is the active environment\n \ud83c\udfaa abc123f \ud83d\udcc5 2024-01-15T14-30 \u2190 Started building at this time\n ```\n3. **Wait for completion:**\n ```\n \ud83c\udfaa abc123f \ud83d\udea6 running \u2190 Now ready!\n \ud83c\udfaa abc123f \ud83c\udf10 52.1.2.3:8080 \u2190 Visit http://52.1.2.3:8080\n ```\n\n### Testing Specific Commits\n\n1. **Add freeze label:** `\ud83c\udfaa \ud83e\uddca showtime-freeze`\n2. **Result:** Environment won't auto-update on new commits\n3. **Use case:** Test specific SHA while continuing development\n4. **Override:** Add `\ud83c\udfaa \u26a1 showtime-trigger-start` to force update despite freeze\n\n### Rolling Updates (Automatic!)\n\nWhen you push new commits, Showtime automatically:\n1. **Detects new commit** via GitHub webhook\n2. **Builds new environment** alongside old one\n3. **Switches traffic** when new environment is ready\n4. **Cleans up old environment**\n\nYou'll see:\n```bash\n# During update:\n\ud83c\udfaa abc123f \ud83d\udea6 running # Old environment still serving\n\ud83c\udfaa def456a \ud83d\udea6 building # New environment building\n\ud83c\udfaa \ud83c\udfaf abc123f # Traffic still on old\n\ud83c\udfaa \ud83c\udfd7\ufe0f def456a # New one being prepared\n\n# After update:\n\ud83c\udfaa def456a \ud83d\udea6 running # New environment live\n\ud83c\udfaa \ud83c\udfaf def456a # Traffic switched\n\ud83c\udfaa def456a \ud83c\udf10 52-4-5-6 # New IP address\n# All abc123f labels removed automatically\n```\n\n## \ud83d\udd12 Security & Permissions\n\n### Who Can Use This?\n\n- **\u2705 Superset maintainers** (with write access) can add trigger labels\n- **\u274c External contributors** cannot trigger environments (no write access to add labels)\n- **\ud83d\udd12 Secure by design** - only trusted users can create expensive AWS resources\n\n### GitHub Actions Integration\n\n**\ud83c\udfaf Live Workflow**: [showtime-trigger.yml](https://github.com/apache/superset/actions/workflows/showtime-trigger.yml)\n\n**How it works:**\n- Triggers on PR label changes, commits, and closures\n- Installs `superset-showtime` from PyPI (trusted code, not PR code)\n- Runs `showtime sync` to handle trigger processing and deployments\n- Supports manual testing via `workflow_dispatch` with specific SHA override\n\n**Commands used:**\n```bash\nshowtime sync PR_NUMBER --check-only # Determine build_needed + target_sha\nshowtime sync PR_NUMBER --sha SHA # Execute atomic claim + build + deploy\n```\n\n## \ud83d\udee0\ufe0f CLI Usage\n\nThe CLI is primarily used by GitHub Actions, but available for debugging and advanced users:\n\n```bash\npip install superset-showtime\nexport GITHUB_TOKEN=your_token\n\n# Core commands:\nshowtime sync PR_NUMBER # Sync to desired state (main command)\nshowtime start PR_NUMBER # Create new environment\nshowtime stop PR_NUMBER # Delete environment\nshowtime status PR_NUMBER # Show current state\nshowtime list # List all environments\nshowtime cleanup --older-than 48h # Clean up expired environments\n```\n\n\n\n## \ud83e\udd1d Contributing\n\n### Testing Your Changes\n\n**Test with real PRs safely:**\n```bash\n# Test full workflow without costs:\nshowtime sync YOUR_PR_NUMBER --dry-run-aws --dry-run-docker\n\n# Test cleanup logic:\nshowtime cleanup --dry-run --older-than 24h\n```\n\n### Development Setup\n\n```bash\ngit clone https://github.com/mistercrunch/superset-showtime\ncd superset-showtime\n\n# Using uv (recommended):\nuv pip install -e \".[dev]\"\nmake pre-commit\nmake test\n\n# Traditional pip:\npip install -e \".[dev]\"\npre-commit install\npytest\n```\n\n## \ud83d\udcc4 License\n\nApache License 2.0 - same as Apache Superset.\n\n---\n\n**\ud83c\udfaa \"Ladies and gentlemen, welcome to Superset Showtime - where ephemeral environments are always under the big top!\"** \ud83c\udfaa\ud83e\udd21\u2728\n",
"bugtrack_url": null,
"license": null,
"summary": "\ud83c\udfaa Apache Superset ephemeral environment management with circus tent emoji state tracking",
"version": "0.6.4",
"project_urls": {
"Bug Tracker": "https://github.com/apache/superset-showtime/issues",
"Changelog": "https://github.com/apache/superset-showtime/blob/main/CHANGELOG.md",
"Documentation": "https://superset-showtime.readthedocs.io/",
"Homepage": "https://github.com/apache/superset-showtime",
"Repository": "https://github.com/apache/superset-showtime.git"
},
"split_keywords": [
"aws",
" circus",
" devops",
" environments",
" ephemeral",
" github",
" showtime",
" superset"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9f1c6d0a8445b76f7e1fcdbb938b38b2336f7be99d2a66d6262a4f4021aeea8f",
"md5": "cb0c6fb3c1516cd0075d33191204cd4f",
"sha256": "e55e976fc7b21f641b79e31a00d90e9cdab173439f1fcc15838a4753f0aa0515"
},
"downloads": -1,
"filename": "superset_showtime-0.6.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cb0c6fb3c1516cd0075d33191204cd4f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 43843,
"upload_time": "2025-08-29T23:36:19",
"upload_time_iso_8601": "2025-08-29T23:36:19.329260Z",
"url": "https://files.pythonhosted.org/packages/9f/1c/6d0a8445b76f7e1fcdbb938b38b2336f7be99d2a66d6262a4f4021aeea8f/superset_showtime-0.6.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fb48f90be708fd2bd553d217f4cd9dd6b4fd1c230c35bbe256321762c3214939",
"md5": "489278528575b2ccb7c8f03d06a4d352",
"sha256": "f20862705daa8df384d13bbfe43ed06fc88ca899afe48a6fcd2812834bf35803"
},
"downloads": -1,
"filename": "superset_showtime-0.6.4.tar.gz",
"has_sig": false,
"md5_digest": "489278528575b2ccb7c8f03d06a4d352",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 57331,
"upload_time": "2025-08-29T23:36:20",
"upload_time_iso_8601": "2025-08-29T23:36:20.467760Z",
"url": "https://files.pythonhosted.org/packages/fb/48/f90be708fd2bd553d217f4cd9dd6b4fd1c230c35bbe256321762c3214939/superset_showtime-0.6.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-29 23:36:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "apache",
"github_project": "superset-showtime",
"github_not_found": true,
"lcname": "superset-showtime"
}