-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: remove project resources automatically when delete the project #1421
bug: remove project resources automatically when delete the project #1421
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dry run flag is not being respected in handler. Ideally, the dry run flag will instead of deleting resources, return a list of them and let the user confirm the deletion of those resources. But we can also just display "...will delete ALL resources!!!" and let it go through after just the initial confirmation in CLI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I just have a couple of questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just left a nit
gateway/src/api/project_caller.rs
Outdated
if let Some(deployments) = deployments { | ||
Ok(deployments) | ||
} else { | ||
Ok(Vec::new()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: should we use Ok(deployments.unwrap_or_default()
? Same in get_resources
below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We sure can 😍 Thanks O!
Description of change
This causes a delete project request to try and remove all the resources automatically if possible. Else return a helpful error message.
How has this been tested? (if applicable)
By adding new tests