Skip to content

Conversation

huanshenyi
Copy link

Description

Brief description of changes

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring

Testing

  • Unit tests pass locally
  • Integration tests pass (if applicable)
  • Test coverage remains above 80%
  • Manual testing completed

Checklist

  • My code follows the project's style guidelines (ruff/pre-commit)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Security Checklist

  • No hardcoded secrets or credentials

  • No new security warnings from bandit

  • Dependencies are from trusted sources

  • No sensitive data logged

    Breaking Changes

    N/A - This is an additive feature that doesn't modify existing functionality.

    Additional Notes

    New Command Usage

    agentcore destroy                    # Destroy default agent (with confirmation)
    agentcore destroy --agent my-agent  # Destroy specific agent
    agentcore destroy --dry-run         # Preview what would be destroyed
    agentcore destroy --force           # Skip confirmation prompts
    
    Resources Cleaned Up
    
    - Bedrock AgentCore endpoints
    - Bedrock AgentCore agent runtimes
    - ECR images (latest tag only for safety)
    - CodeBuild projects
    - IAM execution roles (only if not used by other agents)
    - Agent deployment configuration
    
    Safety Features
    
    - Confirmation prompts by default
    - Dry-run mode to preview changes
    - Shared resource protection (won't delete IAM roles used by multiple agents)
    - Comprehensive error handling and logging
    - Graceful handling of already-deleted resources
    
    Test Coverage
    
    - 25+ comprehensive unit tests covering all scenarios
    - CLI integration tests
    - Error handling and edge case testing
    - Mock-based testing for AWS service interactions

@huanshenyi huanshenyi force-pushed the feature/add-destroy-command branch from deb99f2 to f54c0a7 Compare August 5, 2025 07:35
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