Skip to content

Need to check for null when creating Tags. #3162

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

Merged
merged 3 commits into from
Nov 7, 2016

Conversation

athipp
Copy link
Contributor

@athipp athipp commented Nov 1, 2016

If a server comesback with null for the Tags object. then the Get comand will fail creating a dictionary object with a null reference.

Fix is to check for null and use a different constructor instead.

Same for sku

@azurecla
Copy link

azurecla commented Nov 1, 2016

Hi @athipp, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!


It looks like you're working at Microsoft (athipp). If you're full-time, we DON'T require a contribution license agreement.



If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@cormacpayne
Copy link
Member

@athipp please re-target this PR to the dev branch

@markcowl markcowl changed the base branch from release-3.1.0 to release-3.2.0 November 3, 2016 19:56
@@ -52,16 +52,16 @@ internal static AzureAnalysisServicesServer FromAnalysisServicesServer(AnalysisS

Copy link
Member

Choose a reason for hiding this comment

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

@athipp please add test coverage, as we discussed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@markcowl This was a bug in the New-AzureRMAnalyis... API. The existing tests were actually sufficient to catch the scenario except that the New- API was never creating the server with null 'Tag'..so the Get- api in the test always got an empty dictionary. For servers created via Ibiza outside of powershell the Get api would return 'null' tag exposing the bug...the Fix was in Create- Update codepath.

- Added ServerFullName property to powershell  type.
- Modified tests to validate.
@shahabhijeet shahabhijeet merged commit c9bea12 into Azure:release-3.2.0 Nov 7, 2016
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.

5 participants