Skip to content

[8.0] Revert connection encryption info public API surface (#5037) - #5090

Merged
saurabh500 merged 1 commit into
release/8.0from
dev/saurabh/revert-pr-5037
Nov 17, 2026
Merged

saurabh500 merged 1 commit into
release/8.0from
dev/saurabh/revert-pr-5037

Conversation

@saurabh500

@saurabh500 saurabh500 commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

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.EncryptionInfo properties 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.

…lic API surface (#5037)"

This reverts commit b99cd83.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 00:44
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Nov 17, 2026
@saurabh500 saurabh500 added this to the 8.0.0 milestone Nov 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 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

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.02%. Comparing base (463a45c) to head (711fb2e).
⚠️ Report is 10 commits behind head on release/8.0.

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     
Flag Coverage Δ
CI-SqlClient ?
sqlclient-pr 70.02% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@saurabh500
saurabh500 merged commit 4fdc669 into release/8.0 Nov 17, 2026
50 of 54 checks passed
@saurabh500
saurabh500 deleted the dev/saurabh/revert-pr-5037 branch November 17, 2026 07:31
@github-project-automation github-project-automation Bot moved this from To triage to Done in SqlClient Board Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants