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

Continue reconciling Azure SQL managed users for unknown errors #1336

Merged
merged 3 commits into from
Jan 7, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ func (s *AzureSqlManagedUserManager) Ensure(ctx context.Context, obj runtime.Obj
return false, nil
}

// Other failures are terminal
instance.Status.SetFailedProvisioning(instance.Status.Message)
return true, nil
return false, nil
Copy link
Member

Choose a reason for hiding this comment

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

Ergh. I dislike returning boolean values unless they have really simple meanings - better to define an enumeration and be declarative. Something for later, perhaps.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed! Especially here for Ensure and for Delete - the meaning of these booleans are pretty unclear, you basically need to read the AsyncReconciler code to see how they're used. I'm going to make an issue to clean them up - but obviously it's spread across all of the manager types unfortunately.

}

userExists, err := s.UserExists(ctx, db, requestedUsername)
Expand Down