Skip to content

Fix SB assembly version test - #44192

Merged
mthalman merged 1 commit into
dotnet:mainfrom
mthalman:assembly-ver-test
Oct 15, 2024
Merged

mthalman merged 1 commit into
dotnet:mainfrom
mthalman:assembly-ver-test

Conversation

@mthalman

Copy link
Copy Markdown
Member

Follow up to #44156. When running the CompareMsftToSbAssemblyVersions test, the following exception occurs:

System.Collections.Generic.KeyNotFoundException : The given key 'sdk/x.y.z/Containers/tasks/netx.y/Microsoft.Bcl.AsyncInterfaces.dll' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
[at Microsoft.DotNet.SourceBuild.SmokeTests.SdkContentTests.RemoveExcludedAssemblyVersionPaths(Dictionary`2 sbSdkAssemblyVersions, Dictionary`2 msftSdkAssemblyVersions) in /mnt/vss/_work/1/s/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs:line 101](https://dev.azure.com/dnceng/internal/_git/ddda0dd6-918f-48ba-ba8f-730d9d8c9320?path=%2Fmnt%2Fvss%2F_work%2F1%2Fs%2Ftest%2FMicrosoft.DotNet.SourceBuild.SmokeTests%2FSdkContentTests.cs&version=GBmain&_a=contents&line=101&lineEnd=102&lineStartColumn=1&lineEndColumn=1&lineStyle=plain)
[at Microsoft.DotNet.SourceBuild.SmokeTests.SdkContentTests.CompareMsftToSbAssemblyVersions() in /mnt/vss/_work/1/s/test/Microsoft.DotNet.SourceBuild.SmokeTests/SdkContentTests.cs:line 72](https://dev.azure.com/dnceng/internal/_git/ddda0dd6-918f-48ba-ba8f-730d9d8c9320?path=%2Fmnt%2Fvss%2F_work%2F1%2Fs%2Ftest%2FMicrosoft.DotNet.SourceBuild.SmokeTests%2FSdkContentTests.cs&version=GBmain&_a=contents&line=72&lineEnd=73&lineStartColumn=1&lineEndColumn=1&lineStyle=plain)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

This occurs because the logic expects the path to exist in the dictionary for a file that exists in the source build SDK but not the Microsoft SDK. In this case, it should skip over that file.

@mthalman
mthalman requested review from a team as code owners October 15, 2024 13:20
@ghost ghost added Area-Infrastructure untriaged Request triage from a team member labels Oct 15, 2024
@mthalman
mthalman merged commit 6bc02fd into dotnet:main Oct 15, 2024
@mthalman
mthalman deleted the assembly-ver-test branch October 15, 2024 15:42
@mthalman

Copy link
Copy Markdown
Member Author

/backport to release/9.0.1xx

@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Infrastructure untriaged Request triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants