Skip to content
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

Update Azure.Identity and Azure.Core #18083

Merged
merged 1 commit into from
May 11, 2022
Merged

Update Azure.Identity and Azure.Core #18083

merged 1 commit into from
May 11, 2022

Conversation

dingmeng-xue
Copy link
Member

@dingmeng-xue dingmeng-xue commented May 9, 2022

Description

Upgrade Azure.Identity to 1.6.0 and Azure.Core to 1.24.0

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)
      • {Please put the link here}
    • the markdown help files have been regenerated using the commands listed here

Copy link
Member

@blueww blueww left a comment

Choose a reason for hiding this comment

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

The following cmdlet will fail in Powershell 7.2.2 with this PR:
New-AzStorageTable -Name newtable -Context $ctx

It looks "Azure.Data.Tables 12.2.0" can't be load with this PR.

The error is:

Message        : Method not found: 'Void Azure.Data.Tables.TableServiceClient..ctor(System.Uri,
                 Azure.Core.TokenCredential, Azure.Data.Tables.TableClientOptions)'.
TargetSite     : Void .ctor(Microsoft.WindowsAzure.Commands.Storage.AzureStorageContext)
Data           : {}
InnerException :
HelpLink       :
Source         : Microsoft.Azure.PowerShell.Cmdlets.Storage
HResult        : -2146233069
StackTrace     :    at Microsoft.WindowsAzure.Commands.Storage.Model.Contract.StorageTableManagement..ctor(AzureStor
                 ageContext context)
                    at Microsoft.WindowsAzure.Commands.Storage.Table.StorageCloudTableCmdletBase.CreateChannel() in
                 D:\code\PSH_Dev\src\Storage\Storage\Table\StorageCloudTableCmdletBase.cs:line 55
                    at Microsoft.WindowsAzure.Commands.Storage.Common.StorageCloudCmdletBase`1.InitChannelCurrentSub
                 scription(Boolean force) in
                 D:\code\PSH_Dev\src\Storage\Storage\Common\StorageCloudCmdletBase.cs:line 340
                    at Microsoft.WindowsAzure.Commands.Storage.Common.StorageCloudCmdletBase`1.InitChannelCurrentSub
                 scription() in D:\code\PSH_Dev\src\Storage\Storage\Common\StorageCloudCmdletBase.cs:line 101
                    at Microsoft.WindowsAzure.Commands.Storage.Common.StorageCloudCmdletBase`1.ProcessRecord() in
                 D:\code\PSH_Dev\src\Storage\Storage\Common\StorageCloudCmdletBase.cs:line 125
                    at System.Management.Automation.CommandProcessor.ProcessRecord()

Besides that, on PSH 7.2.2, it looks 2 version of Azure.core will be loaded, not sure if related. (Azure.Data.Tables 12.2.0 just depends on >= Azure.Core 1.19.0) :

PS C:\temp> [appdomain]::currentdomain.getassemblies() | Where-Object {$_.location -like "*Azure.core*"} | ft location,fullname

Location                                                                                           FullName
--------                                                                                           --------
D:\code\PSH_Dev\artifacts\Debug\Az.Accounts\NetCoreAssemblies\Azure.Core.dll                       Azure.Core, Version=1.19.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
D:\code\PSH_Dev\artifacts\Debug\Az.Accounts\StartupScripts\..\AzSharedAlcAssemblies\Azure.Core.dll Azure.Core, Version=1.24.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8

@dingmeng-xue
Copy link
Member Author

The following cmdlet will fail in Powershell 7.2.2 with this PR: New-AzStorageTable -Name newtable -Context $ctx

It looks "Azure.Data.Tables 12.2.0" can't be load with this PR.

The error is:

Message        : Method not found: 'Void Azure.Data.Tables.TableServiceClient..ctor(System.Uri,
                 Azure.Core.TokenCredential, Azure.Data.Tables.TableClientOptions)'.
TargetSite     : Void .ctor(Microsoft.WindowsAzure.Commands.Storage.AzureStorageContext)
Data           : {}
InnerException :
HelpLink       :
Source         : Microsoft.Azure.PowerShell.Cmdlets.Storage
HResult        : -2146233069
StackTrace     :    at Microsoft.WindowsAzure.Commands.Storage.Model.Contract.StorageTableManagement..ctor(AzureStor
                 ageContext context)
                    at Microsoft.WindowsAzure.Commands.Storage.Table.StorageCloudTableCmdletBase.CreateChannel() in
                 D:\code\PSH_Dev\src\Storage\Storage\Table\StorageCloudTableCmdletBase.cs:line 55
                    at Microsoft.WindowsAzure.Commands.Storage.Common.StorageCloudCmdletBase`1.InitChannelCurrentSub
                 scription(Boolean force) in
                 D:\code\PSH_Dev\src\Storage\Storage\Common\StorageCloudCmdletBase.cs:line 340
                    at Microsoft.WindowsAzure.Commands.Storage.Common.StorageCloudCmdletBase`1.InitChannelCurrentSub
                 scription() in D:\code\PSH_Dev\src\Storage\Storage\Common\StorageCloudCmdletBase.cs:line 101
                    at Microsoft.WindowsAzure.Commands.Storage.Common.StorageCloudCmdletBase`1.ProcessRecord() in
                 D:\code\PSH_Dev\src\Storage\Storage\Common\StorageCloudCmdletBase.cs:line 125
                    at System.Management.Automation.CommandProcessor.ProcessRecord()

Besides that, on PSH 7.2.2, it looks 2 version of Azure.core will be loaded, not sure if related. (Azure.Data.Tables 12.2.0 just depends on >= Azure.Core 1.19.0) :

PS C:\temp> [appdomain]::currentdomain.getassemblies() | Where-Object {$_.location -like "*Azure.core*"} | ft location,fullname

Location                                                                                           FullName
--------                                                                                           --------
D:\code\PSH_Dev\artifacts\Debug\Az.Accounts\NetCoreAssemblies\Azure.Core.dll                       Azure.Core, Version=1.19.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
D:\code\PSH_Dev\artifacts\Debug\Az.Accounts\StartupScripts\..\AzSharedAlcAssemblies\Azure.Core.dll Azure.Core, Version=1.24.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8

PS 7.2.2 and 7.2.3 both work well. I believe it is related to your environment (may be due to unclean development environment)

You can try below engineering build.

Install-Module Az.Tools.Installer -repository psgallery
Install-AzModule -Path https://azposhpreview.blob.core.windows.net/public/Az.Accounts.2.7.6.nupkg -Force

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

Copy link
Member

@blueww blueww left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Upgrade MSAL library (Microsoft.Identity.Client) to v4.38.0
4 participants