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

Conversation

babbageclunk
Copy link
Member

These could be setup issues like the AAD admin not being set on the server - giving up on the first try means the only way to get the user created successfully is to edit the resource to remove the finalizer, delete it, then re-add. The Ensure for non AAD users doesn't use this pattern of returning true, nil when it can't reach the server.

If applicable:

  • this PR contains documentation
  • this PR contains tests

These could be setup issues like the AAD admin not being set on the
server - giving up immediately means the only way to get the user
created successfully is to edit the resource to remove the finalizer,
delete it, then re-add. The reconcile loop for regular users doesn't
use this pattern of returning true, nil when it can't reach the server.
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.

@babbageclunk babbageclunk merged commit b311032 into Azure:master Jan 7, 2021
@babbageclunk babbageclunk deleted the asqlmu-error-provisioning branch January 7, 2021 20:37
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