Skip to content
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

CLOUDP-88737: Do not try to delete non-existing Atlas projects #240

Merged
merged 2 commits into from
May 26, 2021

Conversation

fabritsius
Copy link
Contributor

I've added an extra check in the Delete method for Projects.

  • I thought it makes sense to have this new check right after the first function comment
    (so it is clear that that's a part of delete process)
  • No error is thrown

Copy link
Contributor

@antonlisovenko antonlisovenko left a comment

Choose a reason for hiding this comment

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

Looks great! 👍

@@ -133,6 +133,11 @@ func (r *AtlasProjectReconciler) Delete(e event.DeleteEvent) error {
log := r.Log.With("atlasproject", kube.ObjectKeyFromObject(project))
log.Infow("-> Starting AtlasProject deletion", "spec", project.Spec)

if project.Status.ID == "" {
log.Infof("Project does not exist, nothing to remove")
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit] maybe we could add "does not exist in Atlas"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, better to be concrete 👌

@fabritsius fabritsius merged commit 6089941 into main May 26, 2021
@fabritsius fabritsius deleted the dont-del-missing-projects branch May 26, 2021 15:58
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.

None yet

2 participants