Commit Graph

51 Commits

Author SHA1 Message Date
Karl Burtram
f288bee294 Make nullable warnings a per file opt-in (#1842)
* Make nullable warnings a per file opt-in

* Remove unneeded compiler directives

* Remove compiler directive for User Data
2023-02-03 18:10:07 -08:00
Charles Gagnon
ccaf5c4594 Fix null ref when expanding nodes from other providers (#1816)
* Fix null ref when expanding nodes from other providers

(cherry picked from commit 572a7b37b2a3651db5a101a8780c874c51b55b96)

* cleanup
2023-01-19 16:14:17 -08:00
Hai Cao
f86ebae9b8 Re-enable parallel message processing (#1741)
* add flag to handler

* cleanup

* concurrency control

* add flag for handler setters

* update service flags

* fix event handlers

* more handlers

* make sure behavior is unchanged if flag is off

* cleanup

* add test case for parallel processing

* comments

* stop dispatcher in test

* add log for request lifespan

* cleanup and add comments

* correctly release semaphore

* remove deleted file from merge

* use await for semaphore release

* move handler invocation to await and adjust test

* cleanup exception handling and wrapper

* space

* loose assertion condition to make test stable
2022-12-11 00:05:33 -08:00
Cheena Malhotra
5cc3e6f657 Support updating access token when found expired for OE (#1772) 2022-11-28 17:42:05 -08:00
Cheena Malhotra
4866515bde Send Error Code with session failed notification (#1773) 2022-11-28 17:35:26 -08:00
Karl Burtram
3a5935df99 Revert "Update to latest .Net SDK 7.0 (#1760)" (#1763)
This reverts commit 71cda5bbdc.
2022-11-15 11:29:41 -08:00
Karl Burtram
71cda5bbdc Update to latest .Net SDK 7.0 (#1760)
* Bump to SDK 7.0 and related updates

* More net 7 updates

* Install SDK 2.0 for ESRP

* Fix typo

* Address comment and update integration test script

* Disable new warnings from SDK update
2022-11-14 20:24:25 -08:00
Cheena Malhotra
006ac60923 Upgrade solution to .NET 6.0.9 (Build with .NET SDK v6.0.401) (#1692) 2022-09-16 11:27:52 -07:00
Alan Ren
6e007e6e68 preload database when database node is expanded (#1690) 2022-09-15 09:56:23 -07:00
Charles Gagnon
fd00114a0e Catch Request/Event handler errors at dispatcher level (#1610)
* Catch Request/Event handler errors at dispatcher level

* Fix tests

* Use Exception overload of SendError

* Fix tests
2022-07-29 17:31:36 -07:00
Benjamin Russell
97a106c575 Removing a lot of redundant async/await wrappers (#1486)
* Removing a lot of redundant async/await wrappers

* Removing kusto changes
2022-06-05 08:26:21 -07:00
Charles Gagnon
048988e5d3 Add OE verbose logging (#1484)
* Add OE verbose logging

* verbose
2022-05-06 22:47:42 -07:00
Charles Gagnon
40c5d48c5e Fail build on unneeded usings (#1417) 2022-03-04 16:38:01 -08:00
Justin M
14f5a3e0f1 3278 Kusto Unit Test Refactor (#1053)
* 3278 Moved functions related to Metadata from DataSourceFactory to MetadataFactory.cs

* 3278 Refactored DataSourceFactory to not be static. Added IDataSourceFactory interface.

* 3278 Refactored IKustoIntellisenseHelper.cs to not be static. Added IKustoIntellisenseHelper.cs interface.

* 3278 Removed unused functions from Scripter and deleted ScripterCore.cs because it was unused. Refactored Scripter.cs methods to not be static and created IScripter.cs

* 3278 Refactored datsasourceConnectionFactory in ConnectionService to use MEF through the InitializeService function

* 3278 Refactored IAutoCompleteHelper to not be static and added IAutoCompleteHelper interface.

* 3278 Removed unused classes DatabaseFullAccessException and FeatureWithFullDbAccess. Refactored ObjectExplorerService to use ImportingConstructor attribute. Removed commented out in KustoResultsReader. Removed unused functions from DatabaseLocksManager. Removed unused IDataSourceConnectionFactory from ConnectionService

* 3278 Moved SqlConnectionOpener class to new file. Added new interfaces IConnectedBindingQueue.cs and ISqlConnectionOpener.cs Added sqlConnectionOpener to dependency in ConnectedBindingQueue.

* 3278 Removed needsMetadata param from ConnectedBindingQueue. Added param to AddConnectionContext where it's used

* 3278 Refactored ConnectedBindingQueue to use MEF. Refactored usages to run against interface.

* 3278 Corrected ServiceHost namespace. Removed unused dependency to sqlToolsContext in LanguageService. Updated dependency in MetadataService and LanguageService to IProtocolEndpoint instead of ServiceHost

* 3278 Added back NextResult function and summary to KustoResultsReader. Renamed instance to _instance in ConnectionService and DatabaseLocksManager to stay consistent. Changed OpenDataSourceConnection to private in ConnectionService

* 3278 Converted helper methods back to static and removed backing interfaces

* 3278 Reverted AdminService > InitializeService to use ServiceHost as param
2020-08-24 13:18:00 -07:00
Soheil Alizadeh
31659e1126 Prevent ArgumentNullException in refresh request (#963) 2020-06-14 23:24:31 -07:00
Charles Gagnon
ec09ad21d2 Revert "Default to Server level context for all OE nodes (#829)" (#838)
This reverts commit a4b6c300ac.

(cherry picked from commit 7512a2bbe3154e4dd4b63927fcba52db78424994)
2019-07-29 16:55:37 -07:00
Charles Gagnon
a4b6c300ac Default to Server level context for all OE nodes (#829) 2019-06-27 17:50:35 +00:00
Yurong He
adc13cff82 Unified connection support (#765)
* Added the query to get big data cluster endpoints
Added bigDataClusterEndpoints to ObjectExplorerSession
Added bigDataClusterEndpoints to ServerInfo
Fixes some tests.

* Removed bigDataClusterEndpoints from session

* Since server property to get IsBigDataCluster is not implemented yet, use query of sys.asseblies instead to unblock us. Need to use server property when it is available
Add options to ServerInfo, so no need to change the contract in the further when adding new properties. Will move the existing properties to option later

* Undo changes not needed

* Resolved PR comments.

* Fixed node is null exception when can't find NodePath.

* Added comments

* Removed not used using

* Catch sqlException for the reader of BDC endpoints and set empty list to the option.

* Added comments for returning empty nodes.
2019-01-24 20:06:35 -08:00
Karl Burtram
3c915a92f6 Send a Object Explorer session disconnect message on socket exceptions (#739)
* WIP

* WIP 2

* Send disconnect message o binding exception

* Add a try catch around the binding queue error handler
2018-11-16 12:07:05 -08:00
Matt Irvine
f45155aa4a Fix OE and Binding Queue reliability bugs (#702) 2018-10-05 14:14:36 -07:00
ranasaria
09652cccd1 Enhanced Logging for sqltoolsservice (#695)
This change modifies the logging framework within sqltoolservice.
Moves away from custom Logger object to start using .Net tracing framework. It supports for the static Trace and TraceSource way of logging. For all new code it is recommend that we log the log messages using the existing static Logger class, while the code changes will continue to route the older Trace.Write* calls from the process to same log listeners (and thus the log targets) as used by the Logger class. Thus tracing in SMO code that uses Trace.Write* methods gets routed to the same file as the messages from rest of SQLTools Service code.
Make changes to start using .Net Frameworks codebase for all logging to unify our logging story.
Allows parameter to set tracingLevel filters that controls what kinds of message make it to the log file.
Allows a parameter to set a specific log file name so if these gets set by external code (the UI code using the tools service for example) then the external code is aware of the current log file in use.
Adding unittests to test out the existing and improved logging capabilities.


Sequences of checkins in development branch:
* Saving v1 of logging to prepare for code review. Minor cleanup and some end to end testing still remains
* Removing local launchSettings.json files
* added support for lazy listener to sqltoolsloglistener and removed incorrect changes to comments across files in previous checkin
* Converting time to local time when writing entries to the log
* move the hosting.v2 to new .net based logging code
* removing *.dgml files and addding them to .gitignore
* fixing typo of defaultTraceSource
* Addressing pull request feedback
* Adding a test to verify logging from SMO codebase
* propogating changes to v1 sqltools.hosting commandoptions.cs to the v2 version
* Fixing comments on start and stop callstack methods and whitespaces
* Commenting a test that got uncommented by mistake
* addding .gitattributes file as .sql file was observed to be misconstrued as a binary file
2018-09-24 23:55:59 -07:00
Matt Irvine
365fe2282e Support Object Explorer FindNodes request (#589) 2018-03-15 10:47:52 -07:00
Matt Irvine
0eaf60c93a Detect system connection for OE if database display name is blank (#583) 2018-02-12 11:13:03 -08:00
Matt Irvine
efd38be0be Use requested database when determining if a connection is a system db connection (#580) 2018-02-06 15:19:18 -08:00
Leila Lali
0ccc01eda9 fixed a bug with OE connection changed the db name and blocked restore (#570) 2018-01-02 10:57:37 -08:00
Karl Burtram
7ccf78aec1 Add group id and db display name to OE connection queue key (#531) 2017-10-26 10:56:22 -07:00
Leila Lali
76e26268ec removing th oe binding context on closing session (#529) 2017-10-26 10:54:34 -07:00
Benjamin Russell
605f5e9f7b Adding more continuewithonfaulted handlers (#507) 2017-10-20 11:31:31 -07:00
Karl Burtram
14e3b3a3f6 Increase OE timeout to 60 seconds (#492) 2017-10-12 16:56:20 -07:00
Leila Lali
fecf56bce2 closing the default connections that are opned just for validating the connections. Added the feature to application name in the connection (#483) 2017-10-09 10:49:12 -07:00
Leila Lali
f09b9f4c30 Fixing the bug with connections on database make restore fail (#473)
* closing the connections that don't need to be open and keeping track of the connections that should stay open
2017-10-05 20:06:31 -07:00
Karl Burtram
9091df8f62 Fix some issues with Script As Select (#474) 2017-10-03 14:39:29 -07:00
Leila Lali
eb61423f89 added a binding queue for oe to force one operation on a node at a time (#441)
* added a binding queue for oe to force one operation on a node at a time

* setting node subtype to temporal for temporal tables

* disposing oe service on shutdown
2017-08-22 15:15:01 -07:00
Leila Lali
4b97aa8c43 fixed the issues with restore options (#431)
* fixed the issues with restore options connecting to server without db name
2017-08-14 13:29:40 -07:00
Karl Burtram
005fc9e4df Add try/catch blocks for request handlers (#408)
* Add try/catch for request handlers

* Fix test break
2017-07-13 07:18:34 -07:00
Karl Burtram
5dcc82c3d6 Upgrade to net core 2.0 (#356)
* Initial .net core 2.0 conversion

* Convert a few more projects to .net core 2.0

* Convert a few more projects to .net core 2.0

* Fix build.cmd errors

* Add mising nuget package

* Remove dead code

* Add checked in references to workaround nuget package issues

* Update SLN file to refer to correct csproj files

* Rename applications to workaround .net core tooling bug

* Update nuget package with SQL Parser changes

* Add PreserveCompliationContext to avoid MEF bug

* Update smo version to pickup .net core 2 changes

* Pickup latest SMO changes to fix merge break

* Actually pickup correct SMO binaries

* Add support for SLES 12.2

* Fix break running archiving on Linux

* Revert "Add support for SLES 12.2"

This reverts commit 95cdb6d0e35a425be5c0081345d214079cbdc3db.

* Update to latest SMO build

* Install .Net Core 2 during install phase

* Move .Net Core install

* Try to reference dotnet.exe directly

* Fix code coverage script for CSPROJ instead of project.json

* Turn off test that is unreliable in AppVeyor builds.

* Fix appveyor.yml line feed.

* Turn off another flaky test failing in AppVeyor
2017-07-05 16:18:14 -07:00
Leila Lali
276f70ab3b modified the default value for OE session (#394) 2017-06-23 15:37:04 -07:00
Leila Lali
b0263f8867 Added task service (#374)
* Added task service
2017-06-12 11:02:57 -07:00
Leila Lali
b60a865706 handling offline and inassisable db in oe (#369)
* handling offline and inassisable db in oe
2017-06-07 12:21:24 -07:00
Karl Burtram
5f4ab5eba8 Fix nullref in object timeout 2017-05-29 00:00:32 -07:00
Leila Lali
0d00534f6a setting timeout for oe tasks (#363) 2017-05-26 21:54:45 -07:00
Leila Lali
63372d327e Object explorer notifications (#354)
* changing oe protocols to send notifications
2017-05-23 09:30:11 -07:00
Leila Lali
6920e6bfd3 OE system folders and removing some nodes (#353)
* OE system objects for system database
2017-05-19 12:02:34 -07:00
Leila Lali
39f5279631 added sub types for parameters (#340) 2017-05-10 09:39:49 -07:00
Leila Lali
137335ffd5 fixed the oe integration test failing in appveyor (#339)
* fixed the oe integration test failing in appveyor
2017-05-09 13:06:12 -07:00
Leila Lali
0b39408eae added handler for oe refresh and close session requests (#332)
* added handler for oe refresh and close session requests
2017-05-01 15:20:02 -07:00
Leila Lali
c46032c71f fixed db trigger, system types and oe tests (#331)
* fixed db trigger, system types and oe tests
2017-04-28 09:44:45 -07:00
Abbie Petchtes
809254d2e2 Fix the OE service where returns database as the root node for database connection (#322)
* Fix the OE service where retuns database as the root node if the connection contains database name

* Fix OE tests

* addressed the comments

* addresses comment

* fix OE test and add more tests

* fix VerifyAdventureWorksDatabaseObjects test
2017-04-20 12:33:49 -07:00
Raymond Martin
84ec20d2ae Fix for srGen designer issues (#321)
* removing designer files

* adding designer files to gitignore

* updating refs and tests
2017-04-19 11:08:45 -07:00
Leila Lali
a1bc1bc344 fixed the issue with loading dlls for service provider (#312)
* fixed the issue with loading dlls for service provider
2017-04-13 15:57:56 -07:00