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

Fix: sqlserver name validation error handling #315

Merged
merged 2 commits into from
Oct 9, 2019
Merged

Fix: sqlserver name validation error handling #315

merged 2 commits into from
Oct 9, 2019

Conversation

melonrush13
Copy link
Contributor

@melonrush13 melonrush13 commented Oct 9, 2019

Closes issue #277

What this PR does / why we need it:
Checks for invalid server name, and handles error.

  • Adds Invalid Server Name to list of errors
  • When Invalid Server Name (ex: sqlserver1.2) is submitted: reconcile loop is set to false && recorder message provided

Special notes for your reviewer:
Create an invalid server name (Ex: sqlserver1.2) and run
k create -f config/samples/azure_v1_sqlserver.yaml

In a separate terminal, run make run

Should see the following output based on your server name:
2019-10-09T11:56:25.647-0600 DEBUG controller-runtime.manager.events Warning {"object": {"kind":"SqlServer","namespace":"default","name":"sqlserver-sample-testerooni1.1","uid":"1bb940fb-eabe-11e9-b1dc-5a2bc381628e","apiVersion":"azure.microsoft.com/v1","resourceVersion":"1480525"}, "reason": "Failed", "message": "Unable to provision or update instance"} 2019-10-09T11:56:25.647-0600 DEBUG controller-runtime.manager.events Warning {"object": {"kind":"SqlServer","namespace":"default","name":"sqlserver-sample-testerooni1.1","uid":"1bb940fb-eabe-11e9-b1dc-5a2bc381628e","apiVersion":"azure.microsoft.com/v1","resourceVersion":"1480525"}, "reason": "Failed", "message": "Invalid Server Name"}

If applicable:

  • this PR contains documentation
  • this PR contains tests

Copy link
Contributor

@jananivMS jananivMS left a comment

Choose a reason for hiding this comment

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

Looks good to me

@melonrush13 melonrush13 merged commit ca0c83f into Azure:azure-sql Oct 9, 2019
Porges pushed a commit that referenced this pull request May 11, 2021
* Improve logging during file export
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