- Replace http.server with FastAPI for better async/CORS support
- Add complete standalone HTML/CSS/JS frontend with all features:
- Dark theme matching React frontend
- Interactive waveform display with Canvas rendering
- Audio playback with source selection
- Region selection via click/drag or quick-add from segments
- Custom instrumental creation
- Final selection submission with success feedback
- API endpoints now match cloud backend for true feature parity
- Update CLI parity tests for new FastAPI-based server structure
- Add test-instrumental-review.py script for local testing
This enables the same user experience for instrumental review
whether running locally (karaoke-gen) or remotely (karaoke-gen-remote).
Version bump: 0.71.38 → 0.71.39
When a karaoke job completes, the submit-job.sh script now automatically
downloads all output files using gsutil:
- Final videos (mp4, mkv in various qualities)
- Lyrics files (ass, lrc, corrected.txt)
- Audio stems (instrumental, vocals, backing)
Files are saved to output/{artist}-{title}-{job_id}/ directory.
- Add .gcloudignore to reduce upload from 43K files to 317 files (99% less)
- Create Dockerfile.base with pre-built dependencies (~15 min, only when deps change)
- Update Dockerfile to use base image (app builds now ~1-2 min)
- Upgrade Cloud Build to N1_HIGHCPU_32 for faster compilation
- Move Docker build from GitHub Actions to Cloud Build (faster GCP network)
- Fix signed URL generation for Cloud Run (use IAM signBlob API)
- Update submit-job.sh to poll for review completion instead of waiting for Enter
- Sync Cloud Run deploy settings (16Gi RAM, 8 CPU, gen2, proper secrets)
The lyrics transcriber frontend expects:
- baseApiUrl: URL-encoded path to /api/review/{job_id}
- audioHash: optional audio hash for the review
This matches the parameter names expected by the frontend's App.tsx
Usage: ./scripts/submit-job.sh --resume <job_id>
This allows reconnecting to an existing job to continue monitoring
and handle human interaction points (review, instrumental selection).
Messages were going to stdout which caused them to be captured
along with the job_id. Now messages go to stderr so only the
job_id is captured by command substitution.
Creates scripts/submit-job.sh that:
- Accepts filepath, artist, and title as CLI arguments
- Uploads file and submits job to backend
- Polls for status with live terminal updates
- Opens lyrics review UI in browser when review is needed
- Prompts for instrumental selection in terminal
- Shows download URLs when job completes
Usage: ./scripts/submit-job.sh ./song.mp3 "Artist" "Title"
Changes:
- Add backend dependencies to root pyproject.toml
- Configure pytest to discover tests from tests/, backend/tests/
- Skip emulator/integration tests when services not available
- Add run-backend-local.sh for local development
- Add comprehensive TESTING-GUIDE.md documentation
Now you can:
- pytest # Run all 379 tests from repo root
- ./scripts/run-backend-local.sh # Run backend locally
Emulator tests auto-skip unless emulators are running.
Integration tests require RUN_INTEGRATION_TESTS=true.
✅ Features:
- Auto-deploy to Cloud Run after all tests pass
- Only deploys on push to replace-modal-with-google-cloud branch (not PRs)
- Builds Docker image with commit SHA tags for easy rollback
- Verifies deployment health automatically
- ~7 min total time from push to live
📚 Documentation:
- Comprehensive CD setup guide (docs/03-deployment/CD-SETUP.md)
- Automated setup script (scripts/setup-cd.sh)
- Updated GitHub Actions README with CD info
- Deployment status tracking document
🔐 Security:
- Uses GCP service account with minimal necessary permissions
- Requires GitHub secrets: GCP_SA_KEY, ADMIN_TOKENS
- Setup script creates service account and generates key
- Documentation includes security best practices
📋 Next Steps:
1. Run ./scripts/setup-cd.sh to create service account
2. Add GCP_SA_KEY and ADMIN_TOKENS to GitHub secrets
3. Push to branch → automatic deployment!
This completes the CI/CD pipeline:
- CI: 73 automated tests (unit + integration)
- CD: Automatic deployment on test success
- Replace simple sleep with retry loops (30s for Firestore, 10s for GCS)
- Exit early if emulators don't start, show logs
- Add environment variable debug output before tests
- Add emulator status check and logs on test failure
- This should help diagnose CI failures
Local test: ✅ Firestore ready after 2s, all 11 tests pass
- Change localhost to 127.0.0.1 in emulator scripts and conftest
- Linux CI was trying to connect via IPv6 (::1) which failed
- Fixes: Connection refused (111) in emulator tests
- All 11 emulator tests pass locally (1.49s)