fix(ci-hobby): diagnostics, cleanup, preview deployments
Summary
Fixes and improvements for hobby CI workflow plus new preview deployment feature.
Fixes
- Cleanup now fails loudly instead of silently orphaning droplets
- Added diagnostics - failed deployments show droplet status, error patterns, SSH command
- Disabled cancel-in-progress to prevent orphaned droplets
- Added retry logic for docker pulls (handles transient Docker Hub timeouts)
- Skip health check wait in CI (SKIP_HEALTH_CHECK env var) - CI does its own checks
Preview deployments (hobby-preview label)
New feature to keep droplets alive for PR review. Add hobby-preview label to toggle between:
Smoke test mode (default, no label):
- Creates fresh droplet each run
- Runs health check
- Destroys droplet after
- Good for CI validation
Preview mode (hobby-preview label):
- First run: creates droplet with stable name
do-ci-hobby-pr-{number} - Subsequent runs: finds existing droplet by tag, updates via SSH
- Runs same health check
- Keeps droplet alive for manual testing
- Stable URL:
https://do-ci-hobby-pr-{number}.posthog.cc
Files changed
-
bin/hobby-ci.py: Preview mode logic, SSH update methods, diagnostics -
bin/deploy-hobby: Retry logic, SKIP_HEALTH_CHECK support -
.github/workflows/ci-hobby.yml: Preview mode detection, paramiko install
Size Change: 0 B
Total Size: 3.7 MB
ℹ️ View Unchanged
| Filename | Size |
|---|---|
frontend/dist/toolbar.js |
3.7 MB |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week. If you want to permanentely keep it open, use the waiting label.
This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.
Wiz Scan Summary
| Scanner | Findings |
|---|---|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| Total | - |
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week. If you want to permanentely keep it open, use the waiting label.
🦔 Preview instance
✅ Preview deployment ready
🌐 Access the instance
URL: https://do-ci-hobby-20094080149-2.posthog.cc
SSH: ssh [email protected]
IP: 64.23.162.107
Mode: 🔄 Preview (persistent)
Commit: 68502e8
Workflow run: #4556
Full instance details
Droplet ID: 535969036
Droplet IP: 64.23.162.107
SSH: ssh [email protected]
URL: https://do-ci-hobby-20094080149-2.posthog.cc
Deployment output
Downloading pynacl (1.3MiB)
Downloading cryptography (4.3MiB)
Downloaded pynacl
Downloaded cryptography
Installed 14 packages in 7ms
🔄 Preview mode enabled - checking for existing droplet for PR #40783
✅ Found existing droplet: do-ci-hobby-20094080149-2 (ID: 535969036)
IP: 64.23.162.107
Updating to SHA: 68502e8
🔄 Updating existing deployment to SHA: 68502e864f9e9c1ec15d8144b80f769405c780ac
✅ Updated POSTHOG_APP_TAG to 68502e864f9e9c1ec15d8144b80f769405c780ac
🐋 Pulling new Docker images...
✅ Images pulled successfully
🔄 Restarting services...
✅ Services restarted
⏳ Waiting for services to stabilize...
✅ Deployment updated successfully
✅ Preview deployment updated successfully
🌐 URL: https://do-ci-hobby-20094080149-2.posthog.cc