Query Profiler - Fix on Launching from a standard on prem - with default DB#21610
Conversation
…n the connection profile
There was a problem hiding this comment.
Pull request overview
Fixes Query Profiler launch for on-prem connections that have a default (user) database set in the connection profile, which previously caused the profiler UI to not reflect the created session’s state/events.
Changes:
- Clear
connectionProfile.databasefor on-prem profiler launches (while preserving it as an initial UI database filter when applicable). - Add unit tests validating the on-prem behavior for user vs system databases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| extensions/mssql/src/profiler/profilerController.ts | Clears database on on-prem launches to ensure server-scoped XEvent session discovery works correctly. |
| extensions/mssql/test/unit/profiler/profilerController.test.ts | Adds regression tests confirming database clearing behavior for on-prem profiles with default DBs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
PR Changes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21610 +/- ##
=======================================
Coverage 72.73% 72.73%
=======================================
Files 331 331
Lines 98598 98613 +15
Branches 5481 5483 +2
=======================================
+ Hits 71715 71730 +15
Misses 26883 26883
🚀 New features to boost your workflow:
|
| if (!databaseScopeFilter) { | ||
| databaseScopeFilter = profileToUse.database; | ||
| } | ||
| profileToUse = { ...profileToUse, database: "" }; |
There was a problem hiding this comment.
When database is "", it sets the profile to use the default DB?
|
Create an issue to track this, if you're going to port. |
…n the connection profile (#21610) Co-authored-by: Allan Cascante <acascante@microsoft.com>
Description
When launching a query profiler from a standard on prem db having a default database in the connection profile the query profiler fails to update the ui with the state and events for the profiler session created in the back end.
Code Changes Checklist
npm run test)Reviewers: Please read our reviewer guidelines