This repository was archived by the owner on Jun 11, 2025. It is now read-only.
350 all resource cleanups should happen properly when environment is getting deleted it is not deleting all the resources under it#353
Merged
Conversation
Reviewer's Guide by SourceryThis pull request addresses the issue of incomplete resource cleanup when an environment is deleted. The changes ensure that all associated resources are properly deleted when an environment is removed. File-Level Changes
Tips
|
There was a problem hiding this comment.
Hey @abdheshnayak - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
| t "github.com/kloudlite/api/pkg/types" | ||
| ) | ||
|
|
||
| func (d *domain) cleanupEnvironment(ctx ConsoleContext, envName string) error { |
There was a problem hiding this comment.
suggestion: Consider adding a log statement at the start of the cleanupEnvironment function.
Adding a log statement at the beginning of the cleanupEnvironment function can help in debugging and tracking the flow of the cleanup process.
Suggested change
| func (d *domain) cleanupEnvironment(ctx ConsoleContext, envName string) error { | |
| func (d *domain) cleanupEnvironment(ctx ConsoleContext, envName string) error { | |
| log.Printf("Starting cleanup for environment: %s in account: %s", envName, ctx.AccountName) |
abdheshnayak
added a commit
that referenced
this pull request
Nov 5, 2024
…getting deleted it is not deleting all the resources under it (#353) * 🎨 Added env resources deletion when env is deleted * 🎨 Added imported-mres for deletion while deleting environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
This pull request ensures that all resources associated with an environment are properly deleted when the environment itself is deleted. This includes applications, external applications, secrets, configurations, routers, and imported resources.