Sitelet https://github.com/dotnet/dotnet/pull/7754
Skip to content

Update Source-Build SDK Diff Tests Baselines and Exclusions - #7754

Merged
nagilson merged 5 commits into
release/10.0.4xxfrom
pr-baseline-sdk-release-10-0-4xx-c083b29e
Jul 31, 2026
Merged

nagilson merged 5 commits into
release/10.0.4xxfrom
pr-baseline-sdk-release-10-0-4xx-c083b29e

Conversation

@dotnet-sb-bot

@dotnet-sb-bot dotnet-sb-bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

This PR was created by the CreateBaselineUpdatePR tool for build 3024958.

The updated test results can be found at https://dev.azure.com/dnceng/internal/_build/results?buildId=3024958 (internal Microsoft link)

@dotnet-sb-bot
dotnet-sb-bot requested review from a team as code owners July 15, 2026 12:13
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@ellahathaway ellahathaway left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The diff exists because the Microsoft-built SDK's dotnet-user-jwts now ships a newer Microsoft.IdentityModel.Tokens and a new Microsoft.Bcl.Cryptography.dll dependency, which the source-built SDK doesn't yet have.

I think this will get fixed by a backflow of #7736 to SBA release/10.0, which will then forward flow to VMR's release/10.0.4xx branch. @mthalman - does the flow logic sound right?

@mthalman

Copy link
Copy Markdown
Member

I think this will get fixed by a backflow of #7736 to SBA release/10.0, which will then forward flow to VMR's release/10.0.4xx branch. @mthalman - does the flow logic sound right?

Yep, agreed.

@ellahathaway

Copy link
Copy Markdown
Member

I think this will get fixed by a backflow of #7736 to SBA release/10.0, which will then forward flow to VMR's release/10.0.4xx branch. @mthalman - does the flow logic sound right?

Yep, agreed.

@mthalman - looks like this flow never happened?? See https://github.com/dotnet/source-build-assets/tree/release/10.0/src

@mthalman

Copy link
Copy Markdown
Member

I think this will get fixed by a backflow of #7736 to SBA release/10.0, which will then forward flow to VMR's release/10.0.4xx branch. @mthalman - does the flow logic sound right?

Yep, agreed.

@mthalman - looks like this flow never happened?? See https://github.com/dotnet/source-build-assets/tree/release/10.0/src

There hasn't been a passing 10.0 build until this morning. I triggered the subscription flow and PR is ready: dotnet/source-build-assets#1751

@nagilson

Copy link
Copy Markdown
Member

Is the correct thing to do here to rerun - done at https://dev.azure.com/dnceng/internal/_build/results?buildId=3033550&view=results - the pipeline for baseline diff tests and close this PR?

Is it ok to merge the 10.0.3xx version? #7905 (I approved it before I saw this conversation.) I think that one might not get updates but 10.0.3xx is dead in the water post August so maybe it's not a big deal.

@nagilson

Copy link
Copy Markdown
Member

Is the correct thing to do here to rerun - done at https://dev.azure.com/dnceng/internal/_build/results?buildId=3033550&view=results - the pipeline for baseline diff tests and close this PR?

Is it ok to merge the 10.0.3xx version? #7905 (I approved it before I saw this conversation.) I think that one might not get updates but 10.0.3xx is dead in the water post August so maybe it's not a big deal.

That pipeline failed for the same reason as this one, so I think I need to re build the unified build, which I did here: https://dev.azure.com/dnceng/internal/_build/results?buildId=3033574

I think the next step is to rerun the other pipeline https://dev.azure.com/dnceng/internal/_build/results?buildId=3033550&view=results. Does that sound right @ellahathaway?

@ellahathaway

Copy link
Copy Markdown
Member

Is the correct thing to do here to rerun - done at https://dev.azure.com/dnceng/internal/_build/results?buildId=3033550&view=results - the pipeline for baseline diff tests and close this PR?
Is it ok to merge the 10.0.3xx version? #7905 (I approved it before I saw this conversation.) I think that one might not get updates but 10.0.3xx is dead in the water post August so maybe it's not a big deal.

That pipeline failed for the same reason as this one, so I think I need to re build the unified build, which I did here: https://dev.azure.com/dnceng/internal/_build/results?buildId=3033574

I think the next step is to rerun the other pipeline https://dev.azure.com/dnceng/internal/_build/results?buildId=3033550&view=results. Does that sound right @ellahathaway?

Since UB builds are large, we usually just wait until they get queued on their own.

@nagilson

Copy link
Copy Markdown
Member

https://dev.azure.com/dnceng/internal/_build/results?buildId=3033700&view=results if this succeeds, I think we can then close this PR

@nagilson nagilson left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

baseline changes should flow in via codeflow so this would create more work to merge then remove

@nagilson

Copy link
Copy Markdown
Member

dotnet-user-jwts is still causing a baseline change on the new build - investigating

@nagilson

Copy link
Copy Markdown
Member

I see that #7989 merged at 9 am so I think the next step is to update and rerun?

@nagilson

Copy link
Copy Markdown
Member

Actually I think this PR should be closed now and then I should run CreateBaselineUpdatePR again to confirm the baseline diff no longer is needed, is this correct @ellahathaway ?

@nagilson

Copy link
Copy Markdown
Member

I instead trigerred a new run of source-build-sdk-diff-test https://dev.azure.com/dnceng/internal/_build/results?buildId=3034632&view=results which should hopefully update this PR and then the changes will be gone.

@nagilson

Copy link
Copy Markdown
Member

It looks like the baseline diff still shows the source-built dotnet-user-jwts  IdentityModel lags the ML‑DSA enabled build. I believe the run had the necessary changes since it was pinned off 9cfaa55c. @ellahathaway Should we keep these baseline diff updates or am I missing something and they aren't needed still?

@mthalman

Copy link
Copy Markdown
Member

The Microsoft-built SDK and source-built SDK intentionally build different variants of the IdentityModel package used by dotnet-user-jwts.

The Microsoft-built SDK uses IdentityModel 8.19.2 with its ML-DSA implementation enabled. This introduces:

  • A dependency on Microsoft.Bcl.Cryptography
  • Microsoft.Bcl.Cryptography.dll in the dotnet-user-jwts directory
  • New ML-DSA APIs in Microsoft.IdentityModel.Tokens.dll

Source-build also starts from IdentityModel 8.19.2, but applies the Revert 10.0 BCL.Crypto update patch. That patch removes the Microsoft.Bcl.Cryptography dependency and the corresponding ML-DSA APIs. Therefore, the source-built dotnet-user-jwts does not contain Microsoft.Bcl.Cryptography.dll.

So the diff is expected. I've logged dotnet/source-build#5626 to resolve this diff and remove the patch. In the meantime, an exclusion should be added for the Microsoft.Bcl.Cryptography path instead of including it in the baseline. That way we can include a comment that references dotnet/source-build#5626.

mthalman added 2 commits July 31, 2026 08:09
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3b28f72c-3298-4006-af40-023262c1cace
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3b28f72c-3298-4006-af40-023262c1cace
@nagilson

Copy link
Copy Markdown
Member

The Microsoft-built SDK and source-built SDK intentionally build different variants of the IdentityModel package used by dotnet-user-jwts.

The Microsoft-built SDK uses IdentityModel 8.19.2 with its ML-DSA implementation enabled. This introduces:

  • A dependency on Microsoft.Bcl.Cryptography
  • Microsoft.Bcl.Cryptography.dll in the dotnet-user-jwts directory
  • New ML-DSA APIs in Microsoft.IdentityModel.Tokens.dll

Source-build also starts from IdentityModel 8.19.2, but applies the Revert 10.0 BCL.Crypto update patch. That patch removes the Microsoft.Bcl.Cryptography dependency and the corresponding ML-DSA APIs. Therefore, the source-built dotnet-user-jwts does not contain Microsoft.Bcl.Cryptography.dll.

So the diff is expected. I've logged dotnet/source-build#5626 to resolve this diff and remove the patch. In the meantime, an exclusion should be added for the Microsoft.Bcl.Cryptography path instead of including it in the baseline. That way we can include a comment that references dotnet/source-build#5626.

Thanks @mthalman for helping, I'm happy to approve this to move forward but I don't really understand source build enough to understand whether this is the right change or not.

Broad Questions:
For example, how does the source built SDK work at all if we don't have Microsoft.Bcl.Cryptography.dll - is the library pulled in or replaced by dotnet-user-jwts? Is dotnet-user-jwts simply including a source code copy of the BCL library that can be built using arcade / the dotnet build system (or some generic build system for distro partners)? Another question I have is that Microsoft.Bcl.Cryptography seems to be open source, so I don't see why we would need to do that, because it seems like building that source could be done without that, but maybe their code is hard to build or has a different build system so to unify the build system we pull it in here?

Specific Questions:
Earlier in the thread we agreed that there was a new dependency, Microsoft.Bcl.Cryptography.dll - was the expectation here that this would flow in and be part of source build? I thought the patch or other changes to the exclusions would happen automatically when the code flowed in and the baseline test change would nullify automatically? I don't understand why we need this patch on top of the exclusion chnage here: https://github.com/dotnet/source-build-assets/blob/07e5dbddc0154145ed167c08fdedcc64e0e5613b/src/externalPackages/patches/azure-activedirectory-identitymodel-extensions-for-dotnet/0001-Revert-10.0-BCL.Crypto-update.patch

@mthalman

Copy link
Copy Markdown
Member

For example, how does the source built SDK work at all if we don't have Microsoft.Bcl.Cryptography.dll - is the library pulled in or replaced by dotnet-user-jwts? Is dotnet-user-jwts simply including a source code copy of the BCL library that can be built using arcade / the dotnet build system (or some generic build system for distro partners)?

The patch removes the reference and source dependencies that the code had on Microsoft.Bcl.Cryptography.

Another question I have is that Microsoft.Bcl.Cryptography seems to be open source, so I don't see why we would need to do that, because it seems like building that source could be done without that, but maybe their code is hard to build or has a different build system so to unify the build system we pull it in here?

It is built from source. But as IdentityModel repo was defined when updating our submodule, it was causing prebuilts to occur by having a dependency on a version of Microsoft.Bcl.Cryptography that hadn't been built yet (source-build-assets repo is built before runtime repo, where Microsoft.Bcl.Cryptography is defined).

Specific Questions: Earlier in the thread we agreed that there was a new dependency, Microsoft.Bcl.Cryptography.dll - was the expectation here that this would flow in and be part of source build?

The understanding of things earlier in the thread was incorrect. We had though the updates from SBA would fix things but they actually don't because the patch removes the dependency on Crypto.

I thought the patch or other changes to the exclusions would happen automatically when the code flowed in and the baseline test change would nullify automatically?

The patch is only being applied to source-build, not the Microsoft build. So the version of the IdentityModel package that the Microsoft build uses has the dependency while source-build does not.

I don't understand why we need this patch on top of the exclusion chnage here: https://github.com/dotnet/source-build-assets/blob/07e5dbddc0154145ed167c08fdedcc64e0e5613b/src/externalPackages/patches/azure-activedirectory-identitymodel-extensions-for-dotnet/0001-Revert-10.0-BCL.Crypto-update.patch

See my explanation above.

@nagilson

Copy link
Copy Markdown
Member

Thank you for that explanation and for taking the time to answer my questions. I have new broader questions about source-build, but I think I understand what is happening now with these changes and why we want them.

This was referenced Oct 2, 2026
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.

4 participants