Repository navigation
Expose SqlBatch commands on the command diagnostic payloads - #4577
PetarJerinic wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
@dotnet-policy-service agree |
|
@cheenamalhotra this PR implements the shape in #4545. Could someone run the pipelines? |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
@cheenamalhotra I fixed the subscription leak in BatchDiagnosticsTests.cs that caused some of the existing tests to fail. Can we do a fresh /azp run? |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
@cheenamalhotra The run finished. I went through the failures in PR-SqlClient-Project, PR-SqlClient-Package, and sqlclient-pr. Right now, the PR is in Draft, I haven't moved it to Ready for review yet due to the CI validation. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4577 +/- ##
==========================================
+ Coverage 65.23% 65.91% +0.67%
==========================================
Files 288 286 -2
Lines 44587 68635 +24048
==========================================
+ Hits 29087 45238 +16151
- Misses 15500 23397 +7897
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:
|
|
@mdaigle thanks for running the pipelines! I looked at the failing checks, tests that failed are already existing tests marked as flaky, list I could find:
What are the usual next steps here? To re-run the pipeline or to mark PR as Ready for review? |
Description
SqlClientCommandBefore,SqlClientCommandAfter, andSqlClientCommandErrorare extended to contain BatchCommands. It holds batch commands ofSqlBatch.The shape follows what was specified within #4545.
API Changes are additive, and are present in
src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Diagnostics.csand thedoc/snippets/.../SqlClientDiagnostic.xmlIssues
Fixes #4545
Testing
Three new test files:
SqlClientCommandPayloadTest.cs- 9 cases validating three payload types directlySqlDiagnosticListenerTest.cs- 1 case confirmingWriteCommandAfterpassessqlCommand.BatchCommandsthroughBatchDiagnosticsTests.cs- 9 e2e cases withDiagnosticListenersubscriberNote: WriteCommandAfter on a successful batch was not covered. Simulated TDS server cannot answer an RPC. It could be added to
ManualTests/TracingTests/DiagnosticTestwith[Trait("Category", "flaky")], but left it out to avoid adding coverage that can't gate. Happy to add it if it's preferred as a documentation value.