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

IdentityModel assemblies have incorrect assembly version #3565

Closed
mthalman opened this issue Jul 24, 2023 · 5 comments · Fixed by dotnet/source-build-externals#179
Closed
Assignees
Labels
area-product-experience Improvements in the end-user's product experience

Comments

@mthalman
Copy link
Member

When comparing assembly versions between the Microsoft SDK and the source-built SDK, the following diff showed up:

-sdk/x.y.z/DotnetTools/dotnet-user-jwts/x.y.z/tools/netx.y/any/Microsoft.IdentityModel.Abstractions.dll - 6.21.0
-sdk/x.y.z/DotnetTools/dotnet-user-jwts/x.y.z/tools/netx.y/any/Microsoft.IdentityModel.JsonWebTokens.dll - 6.21.0
-sdk/x.y.z/DotnetTools/dotnet-user-jwts/x.y.z/tools/netx.y/any/Microsoft.IdentityModel.Logging.dll - 6.21.0
-sdk/x.y.z/DotnetTools/dotnet-user-jwts/x.y.z/tools/netx.y/any/Microsoft.IdentityModel.Tokens.dll - 6.21.0
-sdk/x.y.z/DotnetTools/dotnet-user-jwts/x.y.z/tools/netx.y/any/System.IdentityModel.Tokens.Jwt.dll - 6.21.0
+sdk/x.y.z/DotnetTools/dotnet-user-jwts/x.y.z/tools/netx.y/any/Microsoft.IdentityModel.Abstractions.dll - 0.0.1
+sdk/x.y.z/DotnetTools/dotnet-user-jwts/x.y.z/tools/netx.y/any/Microsoft.IdentityModel.JsonWebTokens.dll - 0.0.1
+sdk/x.y.z/DotnetTools/dotnet-user-jwts/x.y.z/tools/netx.y/any/Microsoft.IdentityModel.Logging.dll - 0.0.1
+sdk/x.y.z/DotnetTools/dotnet-user-jwts/x.y.z/tools/netx.y/any/Microsoft.IdentityModel.Tokens.dll - 0.0.1
+sdk/x.y.z/DotnetTools/dotnet-user-jwts/x.y.z/tools/netx.y/any/System.IdentityModel.Tokens.Jwt.dll - 0.0.1

These assemblies are produced from source-build-externals. The package version is being set correctly. However, the source of the external repo is configured in such a way to default the assembly version to 0.0.1 and it must be explicitly overriden. The repo does contain a script to overwrite this file which makes use of the settings in a config file that contains the correct version. So it should just be a matter of customizing the source-build-externals build to invoke this script. This script is also called by the repo's own release pipeline.

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@mthalman mthalman changed the title Identity Model assemblies have incorrect assembly version IdentityModel assemblies have incorrect assembly version Jul 24, 2023
@MichaelSimons MichaelSimons moved this from Backlog to In Progress in .NET Source Build Jul 27, 2023
@MichaelSimons MichaelSimons added area-product-experience Improvements in the end-user's product experience and removed untriaged labels Jul 27, 2023
@MichaelSimons MichaelSimons moved this from In Progress to 8.0 RC1 in .NET Source Build Jul 27, 2023
@mthalman
Copy link
Member Author

So it should just be a matter of customizing the source-build-externals build to invoke this script.

Except it's not that simple. This script is authored in PowerShell. We can't be making use of non-source-built tools like this as part of the built logic. So really the only option is to reimplement the PowerShell script in Bash.

The other issue is that the script's logic uses git to get the current commit SHA to inject into the AssemblyInformationVersion attribute. That's not going to work in non-repo environments where the source has simply been extracted from a tarball.

@MichaelSimons
Copy link
Member

@mthalman - should this issue remain open until the version test baseline has been updated to reflect the fix that went into IdentityModel is picked up?

@MichaelSimons MichaelSimons reopened this Aug 8, 2023
@mthalman
Copy link
Member Author

mthalman commented Aug 8, 2023

Sure, that's fine

@MichaelSimons MichaelSimons moved this from Done to In Progress in .NET Source Build Aug 8, 2023
@mthalman
Copy link
Member Author

Builds are all passing now and assembly version comparisons are all good.

@github-project-automation github-project-automation bot moved this from In Progress to Done in .NET Source Build Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-product-experience Improvements in the end-user's product experience
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants