posthog icon indicating copy to clipboard operation
posthog copied to clipboard

fix(ci-hobby): diagnostics, cleanup, preview deployments

Open webjunkie opened this issue 2 months ago • 5 comments

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

webjunkie avatar Nov 03 '25 09:11 webjunkie

Size Change: 0 B

Total Size: 3.7 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 3.7 MB

compressed-size-action

github-actions[bot] avatar Nov 03 '25 09:11 github-actions[bot]

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.

posthog-bot avatar Nov 11 '25 07:11 posthog-bot

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

posthog-bot avatar Nov 18 '25 07:11 posthog-bot

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Supply Chain Finding Software Supply Chain Findings -
Total -

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

wiz-7ad640923b[bot] avatar Nov 24 '25 09:11 wiz-7ad640923b[bot]

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.

posthog-bot avatar Dec 02 '25 07:12 posthog-bot

🦔 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

github-actions[bot] avatar Dec 15 '25 14:12 github-actions[bot]