upaas/internal/handlers
user 16640ef88e fix: cancel in-progress deploy on new webhook trigger
When a webhook-triggered deploy starts for an app that already has a deploy
in progress, the new deploy now cancels the existing one via context
cancellation, waits for the lock to be released, and then starts the new
deploy.

Changes:
- Add per-app context cancellation (appCancels sync.Map) to deploy.Service
- Deploy() creates a cancellable context and registers it for the app
- Add CancelAppDeploy() method to cancel an in-progress deploy
- Add ErrDeployCancelled sentinel error for cancelled deploys
- Handle context cancellation in build and deploy phases, marking
  deployments as failed with a clear cancellation message
- Webhook triggerDeployment() now cancels in-progress deploys and retries
  until the lock is released (up to 30 attempts with 2s delay)

fixes #38
2026-02-15 22:13:20 -08:00
..
app_name_validation_test.go Add server-side app name validation (closes #37) 2026-02-15 22:06:08 -08:00
app_name_validation.go Add server-side app name validation (closes #37) 2026-02-15 22:06:08 -08:00
app.go fix: cancel in-progress deploy on new webhook trigger 2026-02-15 22:13:20 -08:00
auth.go fix: buffer template execution to prevent corrupt HTML responses (closes #42) 2026-02-15 22:04:09 -08:00
dashboard.go fix: buffer template execution to prevent corrupt HTML responses (closes #42) 2026-02-15 22:04:09 -08:00
handlers_test.go fix: resolve all golangci-lint issues 2026-02-15 21:55:24 -08:00
handlers.go fix: buffer template execution to prevent corrupt HTML responses (closes #42) 2026-02-15 22:04:09 -08:00
healthcheck.go Initial commit with server startup infrastructure 2025-12-29 15:46:03 +07:00
port_validation_test.go fix: resolve all golangci-lint issues 2026-02-15 21:55:24 -08:00
render_template_test.go fix: buffer template execution to prevent corrupt HTML responses (closes #42) 2026-02-15 22:04:09 -08:00
setup.go fix: buffer template execution to prevent corrupt HTML responses (closes #42) 2026-02-15 22:04:09 -08:00
tail_validation_test.go fix: validate and clamp container log tail parameter (closes #24) 2026-02-15 21:50:00 -08:00
webhook.go fix: limit webhook request body size to 1MB to prevent DoS (closes #1) 2026-02-08 12:02:06 -08:00