-
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] Remove duplicated code copied from Azure.Identity #25733
Conversation
|
Type | Module | ResourceType | SubResourceType | Command | Description |
---|---|---|---|---|---|
Az.Accounts | Microsoft.Subscription | subscriptions | Get-AzSubscription | The path /subscriptions/{subscriptionId} doesn't contains the right resource tpye: Microsoft.Subscription |
⚠️ Windows PowerShell - Windows
Type | Module | ResourceType | SubResourceType | Command | Description |
---|---|---|---|---|---|
Az.Accounts | Microsoft.Subscription | subscriptions | Get-AzSubscription | The path /subscriptions/{subscriptionId} doesn't contains the right resource tpye: Microsoft.Subscription |
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Aks
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.ApplicationInsights
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Compute
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Functions
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️ Az.KeyVault
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️ Test
⚠️ - Linux
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 22.09 % Test coverage for the module cannot be lower than 50%.
⚠️ - MacOS
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 22.09% Test coverage for the module cannot be lower than 50%.
⚠️ PowerShell Core - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 22.09% Test coverage for the module cannot be lower than 50%.
⚠️ Windows PowerShell - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 22.09% Test coverage for the module cannot be lower than 50%.
️✔️Az.KubernetesConfiguration
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.ManagedServiceIdentity
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Monitor
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Network
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.OperationalInsights
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.PostgreSql
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.PrivateDns
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️ Az.Purview
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️ Test
⚠️ - Linux
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 8.70 % Test coverage for the module cannot be lower than 50%.
⚠️ - MacOS
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 8.70% Test coverage for the module cannot be lower than 50%.
⚠️ PowerShell Core - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 8.70% Test coverage for the module cannot be lower than 50%.
⚠️ Windows PowerShell - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 8.70% Test coverage for the module cannot be lower than 50%.
️✔️Az.Resources
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Sql
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️ Az.Storage
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️ Test
⚠️ - Linux
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 41.76 % Test coverage for the module cannot be lower than 50%.
⚠️ - MacOS
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 41.76% Test coverage for the module cannot be lower than 50%.
⚠️ PowerShell Core - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 41.76% Test coverage for the module cannot be lower than 50%.
⚠️ Windows PowerShell - Windows
Type Title Current Coverage Description ⚠️ Test Coverage Less Than 50% 41.76% Test coverage for the module cannot be lower than 50%.
️✔️Az.Websites
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️ - Linux
️✔️ - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
@YanaXu could you check if src/Accounts/Authentication/Identity/Core/TaskExtensions.cs is only used by src/Accounts/Authentication/KeyStore/AsyncLockWithValue.cs? |
LGTM |
Yes. |
Please move TaskExtensions to src\Accounts\Authentication\KeyStore to make it clear. Thanks |
Reproduce the issue #22628. PS /> Install-Module -Name Az.Accounts -Repository PSGallery -Force
PS /> Import-Module Az.Accounts
PS /> Disable-AzContextAutosave -Scope Process
Mode : Process
ContextDirectory : None
ContextFile : None
CacheDirectory : None
CacheFile : None
KeyStoreFile : None
Settings : {[InstallationId, ********-****-****-****-************]}
PS /> Connect-AzAccount -ServicePrincipal -ApplicationId "********-****-****-****-************" -Tenant "********-****-****-****-************" -SubscriptionId "********-****-****-****-************" -FederatedToken $idToken
Connect-AzAccount: ClientAssertionCredential authentication failed: Persistence check failed. Inspect inner exception for details
Could not find tenant id for provided tenant domain '********-****-****-****-************'. Test with this PR fix. PS /> Import-Module /test/Az.Accounts/Az.Accounts.psd1
PS /> Disable-AzContextAutosave -Scope Process
Mode : Process
ContextDirectory : None
ContextFile : None
CacheDirectory : None
CacheFile : None
KeyStoreFile : None
Settings : {[InstallationId, ********-****-****-****-************]}
PS /> Connect-AzAccount -ServicePrincipal -ApplicationId "********-****-****-****-************" -Tenant "********-****-****-****-************" -SubscriptionId "********-****-****-****-************" -FederatedToken $idToken
Subscription name Tenant
----------------- ------
******* ********-****-****-****-************ |
Polish change log
* use Azure.Identity * update README.md * update ChangeLog.md * move TaskExtensions.cs to src/Accounts/Authentication/KeyStore * Update ChangeLog.md Polish change log --------- Co-authored-by: Jin Lei <[email protected]>
…) (#25764) * use Azure.Identity * update README.md * update ChangeLog.md * move TaskExtensions.cs to src/Accounts/Authentication/KeyStore * Update ChangeLog.md Polish change log --------- Co-authored-by: Yan Xu <[email protected]> Co-authored-by: Jin Lei <[email protected]>
This PR is going to remove duplicated code copied from Azure.Identity.
Generally, the folder
src/Accounts/Authentication/Identity
will removed. The files are copied from Azure.Identity and Azure.Core.One file
src/Accounts/Authentication/Identity/Core/TaskExtensions.cs
is not removed but moved to foldersrc\Accounts\Authentication\KeyStore
because it's internal and only used bysrc\Accounts\Authentication\KeyStore\AsyncLockWithValue.cs
.The test result of this PR shows, after Connect-AzAccount with SP+OIDC, the instance of AzureSession has no updates.
And this PR will fix #22628.
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.