Skip to content

feat: add a second execution of the nuke script#71

Merged
venkatamutyala merged 1 commit into
mainfrom
venkatamutyala-patch-2
Oct 11, 2025
Merged

feat: add a second execution of the nuke script#71
venkatamutyala merged 1 commit into
mainfrom
venkatamutyala-patch-2

Conversation

@venkatamutyala

@venkatamutyala venkatamutyala commented Oct 11, 2025

Copy link
Copy Markdown
Contributor

PR Type

Enhancement


Description

  • Add second execution of aws-nuke command with error tolerance

  • Improve reliability by running nuke operation twice


Diagram Walkthrough

flowchart LR
  A["First aws-nuke execution"] -- "with error tolerance" --> B["Second aws-nuke execution"]
  B -- "ensures cleanup" --> C["Remove config files"]
Loading

File Walkthrough

Relevant files
Enhancement
account-nuke.sh
Add redundant aws-nuke execution with error handling         

tools/aws/account-nuke.sh

  • Add duplicate aws-nuke command execution before existing one
  • First execution includes || true for error tolerance
  • Maintains same configuration and parameters for both runs
+1/-0     

Copilot AI review requested due to automatic review settings October 11, 2025 21:00
@codiumai-pr-agent-free

Copy link
Copy Markdown

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a second execution of the aws-nuke command to improve reliability by running the nuke operation twice, with the first execution configured to continue on failure.

  • Added a duplicate aws-nuke command with || true to suppress failures on the first run
  • Maintained the original aws-nuke command as the second execution

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread tools/aws/account-nuke.sh
Comment thread tools/aws/account-nuke.sh
@codiumai-pr-agent-free

Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Use a variable to avoid duplication

Refactor the duplicated aws-nuke command by storing it in a variable to improve
maintainability and reduce the risk of future inconsistencies.

tools/aws/account-nuke.sh [90-91]

-./aws-nuke nuke -c nuke.yaml --max-wait-retries 200 --no-dry-run --force --log-level debug --log-full-timestamp true --log-caller true || true
-./aws-nuke nuke -c nuke.yaml --max-wait-retries 200 --no-dry-run --force --log-level debug --log-full-timestamp true --log-caller true
+NUKE_COMMAND="./aws-nuke nuke -c nuke.yaml --max-wait-retries 200 --no-dry-run --force --log-level debug --log-full-timestamp true --log-caller true"
 
+# First run, ignore failures to handle dependencies that might be resolved in the second pass.
+$NUKE_COMMAND || true
+
+# Second run, exit on failure to ensure the script reports final errors.
+$NUKE_COMMAND
+
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies duplicated code and proposes using a variable to improve maintainability, which is a valid and good practice.

Low
  • More

@venkatamutyala venkatamutyala merged commit 2643bfd into main Oct 11, 2025
3 checks passed
@venkatamutyala venkatamutyala deleted the venkatamutyala-patch-2 branch October 11, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants