-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Nullreferenceexception in az accounts#10292 #10303
Conversation
… change is for Get-AzTenant
… to avoid NullReferenceException
…protential null reference
…to nullreferenceexception-in-AzAccounts#10292
…to nullreferenceexception-in-AzAccounts#10292
…to nullreferenceexception-in-AzAccounts#10292
…xcept ListTenants
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this 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
tools/RunVersionController.ps1
Outdated
@@ -132,7 +132,7 @@ function Get-ReleaseNotes | |||
$_.FullName -notlike "*Netcore*" -and ` | |||
$_.FullName -notlike "*dll-Help.psd1*" -and ` | |||
$_.FullName -notlike "*Stack*" } } | |||
|
|||
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
The null-ref issues might be fixed by MSAL code. Will verify that when #9982 is merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Discussed with Yabo; it's hard to mock auth-related stuff when testing
Fix #10292 |
…in-AzAccounts#10292 Nullreferenceexception in az accounts#10292
Description
Fix #10292
Checklist
CONTRIBUTING.md
ChangeLog.md
file(s) has been updated:ChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header -- no new version header should be added