console
console copied to clipboard
fix: prevent deletion of all deployments with pending builds
Fixed an issue where attempting to delete all deployments (including those still building/processing) would result in 404 errors and orphaned functions.
Changes:
- Added validation to block deletion when all deployments are selected and any are in 'waiting', 'processing', or 'building' status
- Returns proper error message to display in UI instead of allowing the operation to proceed
- Maintains ability to delete all completed deployments (leaves function in clean "no deployments" state)
- Preserves error tracking for analytics
This prevents the edge case where deleting all deployments while builds are in progress would corrupt the function state.
Summary by CodeRabbit
-
Bug Fixes
- Prevented accidental deletion of all deployments when selected deployments are still processing or pending.