Skip to content

Conversation

blva
Copy link
Collaborator

@blva blva commented Oct 14, 2025

Proposed changes

  • clenanup script should clean as much as possible and then group errors

Checklist

@blva blva marked this pull request as ready for review October 14, 2025 10:51
@blva blva requested a review from a team as a code owner October 14, 2025 10:51
@Copilot Copilot AI review requested due to automatic review settings October 14, 2025 10:51
@blva blva marked this pull request as draft October 14, 2025 10:52
Copy link
Contributor

@Copilot Copilot AI left a comment

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 improves the cleanup script's error handling by ensuring it attempts to clean up as many resources as possible before reporting failures. Instead of stopping on the first error, the script now collects all errors and reports them at the end.

Key changes:

  • Modified error handling to collect errors rather than fail immediately
  • Enhanced cluster deletion to return error information instead of throwing
  • Added comprehensive error reporting at the end of the cleanup process

Comment on lines +117 to +118
const errorStr = String(error);
const errorMessage = `Failed to delete project ${project.name} (${project.id}): ${errorStr}`;
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

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

Consider extracting the error message formatting into a helper function since similar patterns are used in lines 63 and 67. This would reduce code duplication and improve consistency.

Copilot uses AI. Check for mistakes.

@blva blva marked this pull request as ready for review October 14, 2025 11:00
@blva blva merged commit 6ee6353 into main Oct 14, 2025
16 of 18 checks passed
@blva blva deleted the fix-cleanup branch October 14, 2025 11:39
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.

3 participants