Sign the Azure extension assembly and tests#4385
Conversation
Expose Azure internals to the test assembly signed with the test key in Package mode (kept unsigned in Project mode and when signing is disabled), align the signing comment with the assembly-signing terminology, and wire the Azure package CI stage/job and test job for signed internal builds.
There was a problem hiding this comment.
Pull request overview
This PR extends the repo’s assembly-signing workflow to the Microsoft.Data.SqlClient.Extensions.Azure package by ensuring the Azure extension assembly and its test assembly can be signed for internal (ADO.Net) Package-mode CI builds, including the correct InternalsVisibleTo configuration for signed test access.
Changes:
- Added conditional signing to the Azure test project when
TestSigningKeyPathis provided. - Updated Azure extension project
InternalsVisibleToto support signed Package-mode builds (public key specified) while keeping Project-mode behavior intentionally unsigned. - Wired
isInternalBuildthrough the Azure CI stage/job templates and added signing key download + MSBuild properties for internal Package-mode builds.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient.Extensions/Azure/test/Azure.Test.csproj | Conditionally signs the Azure test assembly via TestSigningKeyPath so signed IVT works in internal CI. |
| src/Microsoft.Data.SqlClient.Extensions/Azure/src/Azure.csproj | Updates IVT rules to include a signed test assembly (public key) only for signed + Package mode; aligns signing terminology. |
| eng/pipelines/stages/build-azure-package-ci-stage.yml | Adds isInternalBuild parameter and threads it through all Azure test legs and the pack job. |
| eng/pipelines/jobs/test-azure-package-ci-job.yml | Adds isInternalBuild, downloads signing keys for internal Package-mode builds, and passes signing properties to dotnet build. |
| eng/pipelines/jobs/pack-azure-package-ci-job.yml | Adds isInternalBuild and conditionally signs the Azure package in internal Package-mode builds (incl. key download + SigningKeyPath). |
| eng/pipelines/dotnet-sqlclient-ci-core.yml | Threads isInternalBuild into the Azure package stage invocation. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev/paul/assembly-signing-rename #4385 +/- ##
===================================================================
Coverage ? 63.51%
===================================================================
Files ? 280
Lines ? 66257
Branches ? 0
===================================================================
Hits ? 42086
Misses ? 24171
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… bridge Relocates the authentication provider registry into the shared Abstractions assembly and removes the Abstractions->core reflection bridge. A lazy, core-side AuthenticationBootstrapper performs config-driven and Azure extension provider discovery, seeding the Abstractions registry on first federated authentication. - Add internal AuthenticationProviderRegistry + resource infra (AbstractionsStrings) to Abstractions; wire SqlAuthenticationProvider Get/SetProvider to it directly. - Delete SqlAuthenticationProvider.Internal reflection bridge. - Replace public SqlAuthenticationProviderManager with internal AuthenticationBootstrapper in core; remove it from the public ref surface and notsupported stubs. - Trigger bootstrap from SqlConnectionInternal.GetFedAuthToken. - Redistribute manager tests into Abstractions.Test (registry) and UnitTests (bootstrapper); Azure DefaultAuthProviderTests triggers bootstrap via reflection (TODO: switch to IVT once PR #4385 signs Azure.Test). - Update AotCompatibility tool/docs and doc-comment references.
Summary
Signs the
Microsoft.Data.SqlClient.Extensions.Azureassembly and its test assembly, and wires the Azure package CI stage/job for signed internal builds.What's included
InternalsVisibleTofor the Azure test assembly in Package mode (kept unsigned in Project mode and when signing is disabled).🔗 PR Stack
Part of a 5-PR stack — current PR marked 👉. Indentation shows the branch base.
mainSTRONG_NAME_SIGNING→ASSEMBLY_SIGNINGMicrosoft.SqlServer.Serverassembly & CIflowchart TD main([main]) PR1["🏗️ #4382<br/>signing-core"] PR2["🏷️ #4383<br/>rename"] PR3["🪵 #4384<br/>logging-tests"] PR4["☁️ #4385<br/>azure-signing"] PR5["🧩 #4386<br/>sqlserver.server"] main --> PR1 --> PR2 PR2 --> PR3 PR2 --> PR4 PR2 --> PR5 click PR1 "https://github.com/dotnet/SqlClient/pull/4382" _blank click PR2 "https://github.com/dotnet/SqlClient/pull/4383" _blank click PR3 "https://github.com/dotnet/SqlClient/pull/4384" _blank click PR4 "https://github.com/dotnet/SqlClient/pull/4385" _blank click PR5 "https://github.com/dotnet/SqlClient/pull/4386" _blank classDef current fill:#1f6feb,stroke:#1f6feb,color:#fff; class PR4 current;Checklist