-
Notifications
You must be signed in to change notification settings - Fork 352
[SqlClient] Remove non-functional netfx properties #3079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SqlClient] Remove non-functional netfx properties #3079
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes non-functional public API properties from SqlClient instrumentation on .NET Framework to improve API clarity and consistency.
- Remove
Enrich
,Filter
, andRecordException
properties that were non-functional on .NET Framework - Add conditional compilation directives to restrict these properties to .NET targets only
- Update test files to conditionally use the removed properties
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
SqlClientTraceInstrumentationOptions.cs | Wrap non-functional properties with #if !NETFRAMEWORK directives |
SqlClientDiagnosticListener.cs | Add conditional compilation for filter, enrich, and exception recording logic |
Test files | Update tests to conditionally use removed properties based on target framework |
PublicAPI files | Remove properties from general API surface and add framework-specific API files |
CHANGELOG.md | Document breaking changes for removed properties |
Common.prod.props | Add support for framework-specific public API files |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3079 +/- ##
==========================================
+ Coverage 69.90% 69.99% +0.09%
==========================================
Files 439 429 -10
Lines 16889 16805 -84
==========================================
- Hits 11806 11763 -43
+ Misses 5083 5042 -41
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
@@ -0,0 +1,39 @@ | |||
<?xml version="1.0" encoding="utf-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rajkumar-rangaraj, @alanwest, what is your opinion here?
Can we ignore this? .NET Standard target has broader API than .NET Framework.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with removing it. @alanwest Your thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unclear on what's being proposed. Are you asking whether we should remove Filter, Enrich, RecordException from the netstandard build as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only from .net framework, but it leads to warnings muted in this file.
Methods removed int his PR are noop in .net fx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is only needed until the next version ships to NuGet, then it can be deleted as the baseline in NuGet.org will match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Methods removed int his PR are noop in .net fx
Then yes it sounds like it's safe to keep the APIs in the netstandard build.
I don't understand why the linter is complaining about the compatibility suppressions file, but also that file is auto-generated. |
Known issue, you can modify it manually and make the linter happy. It should not be overwritten. |
I still don't understand exactly what it's complaining about though. It seems to be complaining there's some sort of non-ASCII space, but if I replace the spaces on the given line numbers by just pressing the spacebar then Git shows no changes. |
4 spaces needed instead of 2? |
Oh, it wasn't clear to me from the workflow/job/step name that formatting other than EOL and non-ASCII was in scope. |
Make TFM-specific public API baselines not use the specific TFM version. See open-telemetry#3079 (comment).
6cb9772
to
723bfa2
Compare
7526d20
to
d762140
Compare
d762140
to
8b7e4ae
Compare
Discussion solved: #3079 (comment) |
Changes
Remove members from the public API for SqlClient that do nothing on .NET Framework.
Copied and amended from #3072.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial changes