Commit Graph

13 Commits

Author SHA1 Message Date
Maxime Beauchemin
6fe0655e72 feat: Import updated showtime workflows from development session
Replace workflows with improved versions that properly handle showtime CLI output format and fix conditional step execution. Key fixes:
- Match sync_needed output from showtime CLI
- Use target_sha for proper SHA handling
- Remove invalid pattern properties
- Cleaner workflow structure

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 13:23:22 -07:00
Maxime Beauchemin
d310dfdc79 fix: Match workflow conditions with actual showtime CLI output
Update output extraction to use 'sync_needed' and 'target_sha' to match what showtime CLI actually returns. This fixes the issue where sync steps were skipped despite sync_needed=true.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 13:23:22 -07:00
Maxime Beauchemin
e394f98687 perf: Skip Docker Compose installation in showtime workflow
Add install-docker-compose: false to setup-docker action since showtime workflows don't need Docker Compose. This saves 1-2 minutes by skipping unnecessary apt operations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 13:23:22 -07:00
Maxime Beauchemin
180d5b70ce fix: Fetch PR SHA via GitHub API for workflow_dispatch
For manual workflow_dispatch with PR number, fetch the latest SHA for that specific PR via GitHub API instead of using the current branch SHA. This ensures we build and deploy the actual PR code, not the workflow branch code.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 13:23:22 -07:00
Maxime Beauchemin
6ca977ddd5 fix: Use github.sha fallback for workflow_dispatch SHA resolution
When no SHA is provided in workflow_dispatch and there's no PR context, fallback to github.sha (current commit). This fixes the 'No SHA available' error for manual triggers.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 13:23:22 -07:00
Maxime Beauchemin
e2a9e28313 perf: Optimize workflow step order for efficiency
Reorder steps to check what's needed first, then only set up Docker environment if build is actually required. This avoids expensive Docker setup when only label changes occur.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 13:23:22 -07:00
Maxime Beauchemin
390da591b1 fix: Add SHA handling for push events in showtime workflow
Use github.sha for push events since they don't have pull_request context. This fixes the 'No SHA available' error when the workflow runs on push.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 13:23:22 -07:00
Maxime Beauchemin
acf7b61200 perf: Use shallow clone for faster checkout in showtime workflow
Add fetch-depth: 1 to speed up repository checkout when accessing local actions. Only the latest commit is needed for workflow execution.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 13:23:22 -07:00
Maxime Beauchemin
e19841fc46 fix: Add checkout step before using local actions
The workflow needs to checkout the repository before using local actions like setup-docker. This resolves the 'Can't find action.yml' error.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 13:23:22 -07:00
Maxime Beauchemin
71497054a8 showtime version 2025-08-25 13:23:22 -07:00
Maxime Beauchemin
9fd5815803 fix: Remove pattern property from workflow_dispatch SHA input
GitHub Actions workflow_dispatch inputs don't support the pattern property. SHA validation is now handled in the workflow logic instead.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 13:23:22 -07:00
Maxime Beauchemin
fefc2023a9 fix: Handle push events in showtime-trigger workflow
Skip push events in the workflow logic since they're only used for workflow registration. This prevents errors when the workflow runs on push but has no PR context.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 13:23:22 -07:00
Maxime Beauchemin
91d0cc5805 feat: Integrate Superset Showtime GitHub Actions workflows
Replaces legacy ephemeral environment system with the new Superset Showtime tool (https://github.com/mistercrunch/superset-showtime), providing automated PR environment management using Docker containers deployed to AWS ECS.

## Key Changes

### New Showtime Workflows
- `showtime-trigger.yml`: Handles all PR events (labeled, synchronize, closed) with intelligent build detection
- `showtime-cleanup.yml`: Scheduled cleanup every 6 hours with manual trigger support

### Legacy Workflow Deprecation
- Added deprecation notices to `ephemeral-env.yml` and `ephemeral-env-pr-close.yml`
- Clear migration guidance from "testenv-up" to "🎪 trigger-start" labels
- Both systems coexist during transition period

### Architecture Improvements
- **Simplified Logic**: GitHub Actions just triggers, showtime CLI handles all decisions
- **Smart Building**: Only builds Docker images when code changes, not label changes
- **DuckDB Support**: Configured with `LOAD_EXAMPLES_DUCKDB=true` build arg
- **Environment Variables**: Requires `SUPERSET__SQLALCHEMY_EXAMPLES_URI` in ECS (showtime CLI responsibility)

## Testing

Simple 3-step test on PR 34831:
1. Set label: `gh pr edit 34831 --add-label "🎪 trigger-start"`
2. Run command: `gh workflow run showtime-trigger.yml --ref showtime_gha --field pr_number=34831`
3. Expected outcome: Environment accessible with DuckDB examples

## Benefits
- **Reliability**: Dedicated Python package vs complex YAML logic
- **Maintainability**: All environment logic centralized in showtime CLI
- **Efficiency**: Conditional builds and smart resource management
- **Testability**: Manual workflow_dispatch for development and debugging

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 13:23:22 -07:00