Repository navigation
[8.0] Revert connection encryption info public API surface (#5037) - #5090
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Missing revert PR details, immutable base/head identifiers, trusted policy references, and reviewer discussion prevented verification of current-head CI and outstanding feedback.
No open issues 🎉
What changed in this PR
Reverts #5037’s connection-encryption diagnostics API from the 8.0 driver, restoring the prior public surface without changing encryption negotiation or Always Encrypted behavior. Removing these APIs intentionally breaks compilation for applications that reference them.
Changes:
- Removes encryption-information types and properties from implementation and reference assemblies.
- Removes associated documentation, tests, and test utilities while restoring the previous exception serialization test.
- Reverses the feature-specific unsupported-platform GenAPI configuration.
Reported validation includes successful builds and XML documentation checks. The two reported routing-test failures also reproduce before the revert.
| File | Description |
|---|---|
src/Microsoft.Data.SqlClient/tests/UnitTests/Utilities/EncryptionInfoTestData.cs |
Deletes encryption snapshot test data and assertions. |
src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlExceptionTests.cs |
Restores the Framework-only serialization test configuration. |
src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlConnectionTests.cs |
Deletes tests for the removed connection property. |
src/Microsoft.Data.SqlClient/tests/UnitTests/Microsoft/Data/SqlClient/SqlConnectionEncryptionInfoTests.cs |
Deletes snapshot and enum contract tests. |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlServerCertificateValidationErrors.cs |
Deletes the certificate-validation errors enum. |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlException.cs |
Removes snapshot storage, property, and cloning support. |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionEncryptionMode.cs |
Deletes the negotiated encryption-mode enum. |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionEncryptionInfo.cs |
Deletes the encryption diagnostic snapshot type. |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs |
Removes EncryptionInfo. |
src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.cs |
Removes matching public API declarations. |
src/Microsoft.Data.SqlClient/notsupported/Microsoft.Data.SqlClient.csproj |
Removes feature-specific GenAPI arguments. |
src/Microsoft.Data.SqlClient/notsupported/GenApiHeader.txt |
Deletes the nullable-annotation generation header. |
src/Microsoft.Data.SqlClient/notsupported/GenApiExcludeAttributes.txt |
Deletes the nullable-metadata exclusion list. |
doc/snippets/Microsoft.Data.SqlClient/SqlServerCertificateValidationErrors.xml |
Deletes validation-error enum documentation. |
doc/snippets/Microsoft.Data.SqlClient/SqlException.xml |
Removes exception EncryptionInfo documentation. |
doc/snippets/Microsoft.Data.SqlClient/SqlConnectionEncryptionMode.xml |
Deletes negotiated encryption-mode documentation. |
doc/snippets/Microsoft.Data.SqlClient/SqlConnectionEncryptionInfo.xml |
Deletes snapshot API documentation. |
doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml |
Removes connection EncryptionInfo documentation. |
doc/design-notes/2353-connection-encryption-info.md |
Deletes the reverted feature’s design note. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/8.0 #5090 +/- ##
===============================================
+ Coverage 68.97% 70.02% +1.04%
===============================================
Files 314 313 -1
Lines 45857 69736 +23879
===============================================
+ Hits 31629 48831 +17202
- Misses 14228 20905 +6677
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:
|
Description
Reverts #5037 by reverting squash commit
b99cd83297792dc2d139a1378f77707d481390d9.This is the exact inverse of the original 19-file change (5 insertions, 1,888 deletions). It removes the connection-encryption information types and
SqlConnection.EncryptionInfo/SqlException.EncryptionInfoproperties from the implementation and reference API, removes their documentation and tests, restores the prior exception serialization test, and reverses the associated unsupported-platform GenAPI changes.