-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Az.Accounts] Fixed returning duplicate subscription ids. #19447
Conversation
…onListByName issue.
Fix returning duplicate subscription ids.
var tenants = new List<string> { DefaultTenant.ToString() }; | ||
var firstList = new List<string> { subId1 }; | ||
var secondList = new List<string> { subId2 }; | ||
var thirdList = firstList; | ||
var fourthList = firstList; |
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.
I think it will be better if use more meaningful variable name here.
## Version 2.10.1 | ||
* Fixed returning duplicate Ids for one subscription while using `Get-AzSubscription` with parameter `SubscriptionName`. [#19427] |
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.
We don't need to update the version manually. Just add changelog content under Upcoming Release
section is fine.
@@ -3,7 +3,7 @@ | |||
# | |||
# Generated by: Microsoft Corporation | |||
# | |||
# Generated on: 2022/9/2 | |||
# Generated on: 9/9/2022 |
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.
Don't need to update this file manually.
@@ -43,8 +43,8 @@ | |||
// You can specify all the values or you can default the Build and Revision Numbers | |||
// by using the '*' as shown below: | |||
|
|||
[assembly: AssemblyVersion("2.10.0")] | |||
[assembly: AssemblyFileVersion("2.10.0")] |
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.
Don't need to update this file manually.
"Get-AzSentinelDataConnector": {}, | ||
"New-AzSentinelDataConnector": {}, | ||
"Remove-AzSentinelDataConnector": {}, |
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.
Don't need to update this file manually.
[assembly: AssemblyVersion("2.10.0")] | ||
[assembly: AssemblyFileVersion("2.10.0")] | ||
[assembly: AssemblyVersion("2.10.1")] | ||
[assembly: AssemblyFileVersion("2.10.1")] |
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.
Don't need to update this file manually.
@@ -48,5 +48,5 @@ | |||
// You can specify all the values or you can default the Build and Revision Numbers | |||
// by using the '*' as shown below: | |||
// [assembly: AssemblyVersion("1.0.*")] | |||
[assembly: AssemblyVersion("2.10.0")] | |||
[assembly: AssemblyFileVersion("2.10.0")] | |||
[assembly: AssemblyVersion("2.10.1")] |
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.
Don't need to update this file manually.
@@ -52,7 +52,7 @@ DotNetFrameworkVersion = '4.7.2' | |||
# ProcessorArchitecture = '' | |||
|
|||
# Modules that must be imported into the global environment prior to importing this module | |||
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.10.0'; }, | |||
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.10.1'; }, |
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.
Don't need to update this file manually.
@@ -52,7 +52,7 @@ DotNetFrameworkVersion = '4.7.2' | |||
# ProcessorArchitecture = '' | |||
|
|||
# Modules that must be imported into the global environment prior to importing this module | |||
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.10.0'; }, | |||
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.10.1'; }, | |||
@{ModuleName = 'Az.ADDomainServices'; RequiredVersion = '0.2.0'; }, | |||
@{ModuleName = 'Az.Advisor'; RequiredVersion = '1.1.2'; }, |
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.
Don't need to update this file manually.
@@ -118,7 +118,7 @@ pac116,[ps=true;customSource=https://www.powershellgallery.com/api/v2/]Az.Resour | |||
pac117,[ps=true;customSource=https://www.powershellgallery.com/api/v2/]Az.Resources,6.2.0 | |||
pac118,[ps=true;customSource=https://www.powershellgallery.com/api/v2/]Az.Search,0.8.0 | |||
pac119,[ps=true;customSource=https://www.powershellgallery.com/api/v2/]Az.Security,1.3.0 |
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.
Don't need to update this file manually.
} | ||
foreach (IAzureSubscription subscription in subscriptions) | ||
{ | ||
if (subscriptionIds.Add(subscription.GetId())) |
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.
Do you mean Contains
here?
{ | ||
|
||
if(subscription is PSAzureSubscription && subscription.GetTenant() != null | ||
&& subscription.GetHomeTenant().Equals(subscription.GetTenant()) && subscriptionIds.Add(subscription.GetId())) |
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.
Do you mean !subscriptionIds.Contains(subscription.GetId())
here?
Description
Fix returning duplicate subscription ids while using Get-AzSubscription by SubscriptionName. #19427.
Checklist
CONTRIBUTING.md
and reviewed the following information:generation
branch.ChangeLog.md
file(s) appropriatelyChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header in the past tense. Add changelog in description section if PR goes intogeneration
branch.ChangeLog.md
if no new release is required, such as fixing test case only.