Skip to content

Conversation

zzstoatzz
Copy link
Collaborator

summary

adds a --all flag to the prefect automation delete command, following the pattern established by prefect deployment delete --all

details

this change allows users to delete all automations at once with:

prefect automation delete --all

features:

  • interactive confirmation prompt when in interactive mode (no prompt in non-interactive environments)
  • proper validation to ensure --all isn't used with name or id arguments
  • handles edge cases (no automations exist)
  • comprehensive test coverage

the implementation follows the exact pattern from prefect deployment delete --all in src/prefect/cli/deployment.py:1054-1118

test plan

  • added 5 new test cases covering all scenarios
  • all 10 deletion-related tests pass
  • pre-commit hooks pass

🤖 Generated with Claude Code

this change adds a --all flag to the `prefect automation delete` command,
following the pattern established by `prefect deployment delete --all`.

- adds --all option to delete all automations at once
- includes interactive confirmation prompt when in interactive mode
- validates that --all is not used with name or id arguments
- handles edge case where no automations exist
- adds comprehensive test coverage for all scenarios

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Copy link

codspeed-hq bot commented Oct 13, 2025

CodSpeed Performance Report

Merging #19164 will not alter performance

Comparing delete-all-automations-cli (7ba9028) with main (cc76780)

Summary

✅ 2 untouched

switch from sequential deletions to concurrent deletions using
asyncio.gather with a semaphore (limit 10), following the pattern
from deployment schedule pause/resume --all commands
@zzstoatzz zzstoatzz marked this pull request as ready for review October 13, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant