Skip to content

Nullreferenceexception in az accounts#10292 #10303

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

Conversation

VeryEarly
Copy link
Collaborator

@VeryEarly VeryEarly commented Oct 16, 2019

Description

Fix #10292

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
    • the markdown help files have been regenerated using the commands listed here

@VeryEarly
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@VeryEarly VeryEarly marked this pull request as ready for review October 22, 2019 10:56
@VeryEarly VeryEarly requested a review from wyunchi-ms October 22, 2019 10:57
Copy link
Member

@markcowl markcowl left a comment

Choose a reason for hiding this comment

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

Yabo, this looks great. It would be nice to have some regression protection for this issue - let's discuss what to do about tests

@@ -132,7 +132,7 @@ function Get-ReleaseNotes
$_.FullName -notlike "*Netcore*" -and `
$_.FullName -notlike "*dll-Help.psd1*" -and `
$_.FullName -notlike "*Stack*" } }

Copy link
Member

Choose a reason for hiding this comment

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

Looks like some added whitespace here

@@ -35,9 +37,21 @@ public class GetAzureRMDefaultCommand : AzureRMCmdlet
[Parameter(ParameterSetName = ResourceGroupParameterSet, Mandatory = false, HelpMessage = "Display Default Resource Group", ValueFromPipelineByPropertyName = true)]
public SwitchParameter ResourceGroup { get; set; }

protected override IAzureContext DefaultContext
Copy link
Member

Choose a reason for hiding this comment

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

Is is possible to add tests for these? It would be nice to not regress on these in the future.

@VeryEarly VeryEarly requested a review from isra-fel January 6, 2020 10:23
@VeryEarly
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@isra-fel
Copy link
Member

isra-fel commented Jan 7, 2020

The null-ref issues might be fixed by MSAL code. Will verify that when #9982 is merged

Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

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

LGTM

@isra-fel isra-fel dismissed markcowl’s stale review March 10, 2020 06:21

Discussed with Yabo; it's hard to mock auth-related stuff when testing

@isra-fel isra-fel merged commit 9e40b76 into Azure:master Mar 10, 2020
@dingmeng-xue
Copy link
Member

Fix #10292

dingmeng-xue pushed a commit to dingmeng-xue/azure-powershell that referenced this pull request Mar 29, 2020
…in-AzAccounts#10292

Nullreferenceexception in az accounts#10292
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Az.Accounts cmdlets throw NullReferenceException
6 participants