Commit Graph

26 Commits

Author SHA1 Message Date
Charles Gagnon
684587b8c4 Don't build unused RIDs (#1288)
* print work folder sizes

* fix spacing

* Get all children

* Remove win7-x86, win10-arm & win10-arm64 builds

* add few more

* remove print job
2021-11-08 16:54:50 -08:00
Soheil Alizadeh
887a499d2b Update Infrastructure (#961)
* Update form .NET Core 2.2 to .NET Core 3.1

- Global variable for projects
- Change TFMs from netcoreapp2.2 to netcoreapp3.1
- Update global.json
- Update build.json
- Remove direct framework cake TestCore task
- Update travis dotnet version
- Update azure pipline file
- Update vscode launch.json

* Add Central Package Management

* Fix xUnit Breaking Change for MemberData type

* Fix xUnit breaking change for duplicate test method name

* Fix Rang/Index type conflict with System.Rang/Index

* Update vscode tasks.json

* Change serviceHostExecutable path in ServiceTestDriver.cs

* Downgrade SDK version (https://github.com/appveyor/ci/issues/3440)

- Appveyor hasn't installed latest SDK therefore I downgrade it until they install it.

* Dump Microsoft.SqlServer.DACFx
2020-06-12 11:44:18 -07:00
Karl Burtram
df023da0ba Revert "Rollback SMO to latest 14.0 version (#722)" (#723)
This reverts commit 407e9feb40.
2018-10-30 17:20:25 -07:00
Karl Burtram
407e9feb40 Rollback SMO to latest 14.0 version (#722)
* Rollback SMO to latest 14.0 version

* Add back nunit package reference
2018-10-30 12:13:23 -07:00
Karl Burtram
a241a4510b Bump .Net Core SDK to 2.2.100 Preview (#715)
* Bump .Net Core SDK to 2.2

* Update travis file

* Try to fix broken AppVeyor code coverage
2018-10-22 15:54:17 -07:00
David Shiflet
f99061866c Upgrade SMO to 150 preview (#701)
* Switch to the unified SMO NuGet so all binaries are strong named and signed.

* use one AssemblyLoader instance for all loads

* Revert "use one AssemblyLoader instance for all loads"

This reverts commit 48c59ffd5c57152de281c87acdbcad7ddf7ab760.

* Stop creating multiple AssemblyLoadContext objects during composition, per https://github.com/dotnet/coreclr/issues/19632

* restore high entropyva property

* Improve the comment

* Update SMO to 150 and fix scripting for objects with a single quote in their name.

* restore newtonsoft reference
2018-10-03 18:33:40 -04: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
Leila Lali
0c1648b1c4 fixed couple of issues in the perf tests (#693) 2018-09-18 14:35:47 -07:00
Leila Lali
aa2b30f486 fixed perf tests and added more scenarios (#683)
* fixed perf tests and added more scenarios
2018-08-27 10:57:41 -07:00
Karl Burtram
e73a8ddca6 Update projects for netcoreapp2.1 SDK (#603)
* Update projects for netcoreapp2.1 SDK

* Fix whitespace

* Fix issue in Nuget config file
2018-04-23 17:06:52 -07:00
Leila Lali
3510ad7d5c Fixing the perf tests (#468)
fixed the pref tests
2017-09-27 13:52:50 -07:00
Henry Phan
784f4c5d05 Feature/serialization exe (#442)
* Initial changes to have serialization generate its own .exe

* Removed additional project from sln file

* remove all references to removed temporary project

* Moved shared contracts into own dll and fixed imports. Addressed PR comments

* Undid having a separate contracts project since that'll be a task for later on. Moved dbcellvalue and saveresultsrequest to Hosting, where they will be imported and shared by the service layer and serialization projects

* Switched backslashes in project reference in csproj file to forward slashes for consistency

* Moved necessary contracts back to service layer. Refactored CommandOptions to reduce code duplication. Addressed miscellaneous PR suggestions

* Accidentally left these files out of previous commit

* Initialized loggers for serialization and credentials with the logging directory provided by the cmd line arg, if there is one

* Changed default log directory paths for serialization and credentials. Removed unnecessary cast and added a copyright

* Changed name of generated executable for serialization service

* removed unnecessary object cast

* removing unnecessary imports and addressing other PR comments
2017-09-05 16:21:42 -07:00
Karl Burtram
4e9ff42dfc Update to SMO built with .Net 2.0 RTM SDK (#437)
* Pick up .Net 2 RTM SMO dependencies

* Add missing NUPKG files

* Remove preview framework nuget packages
2017-08-16 16:08:03 -07:00
Karl Burtram
156ea5de7b Remove PackageTargetFallback to fix restore break (#402) 2017-07-10 15:11:16 -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
Brian O'Neill
4aac4a4047 Add scripting API implemented by the SqlScriptPublishModel (#316)
Update the ScriptingService to expose new scripting JSON-RPC APIs that use the SqlScriptPublishModel for script generation.

The SqlScriptPublishModel is the model behind the SSMS scripting wizard. To enable scripting for CLI tools, we've ported SqlScriptPublishModel to .NET Core. The SqlScriptPublishModel wraps the SMO scripting APIs for .sql script generation.

1) Added three new requests to the ScriptingService: ScriptingRequest, ScriptingListObjectsRequest, ScriptingCancelRequest.
2) Generating scripts are long running operations, so the ScriptingRequest and ScriptingListObjectsRequest kick off a long running scripting task and return immediately.
3) Long running scripting task reports progress and completion, and can be cancelled by a ScriptingCancelRequest request.
4) Bumped the SMO nuget package to 140.17049.0. This new version contains a signed SSMS_Rel build of SMO with the SqlScriptPublishModel.
5) For testing, adding the Northwind database schema

TODO (in later pull requests)
1) Integrate the new ScriptingService APIs with the ConnectionService
2) Integrate with the metadata support recently added
2017-04-24 16:10:20 -07:00
Karl Burtram
f00136cffb Fix namespaces for code moved to separate class libraries (#263)
* Create ServiceHost a service-specific class

* Renaming hosting namespace

* Rename credentials namespace

* Fix namespaces
2017-03-02 14:41:06 -08:00
Karl Burtram
0af7bef66d Create MS.SqlTools.Credentials project (#249)
* Initial credential service files

* Clean-up hostloader

* Update build scripts to build credentials archive

* Move hosting files to new assembly

* Add credentials files to MS.SqlTools.Credentials

* Remove duplicate files

* Update namespace in program.cs

* Fix test build breaks

* Update extensions visibility.

* Remove unused resource strings

* Add xproj files to SLN for appveyor builds

* Fix appveyor build break in test project

* Fix extensibility tests

* Fix various typos in latest iteration

* Add settings for Integration build

* Fix codecoverage.bat to use full pdb for new projects

* Fix bug when packing in folder with native images

* Fix typos in xproj

* Reset XLF to fix build.cmd
2017-02-23 16:09:58 -08:00
Benjamin Russell
857b526553 query/executeString (#217)
This is a small API addition that allows us to execute queries directly as strings. This will make it easier to execute queries outside the confines of a workspace like VS Code.

* Refactor execution requests and events are now named less redundantly and moved into a separate namespace for organization. This is the bulk of the changes.
    * QueryExecuteBatchNotification -> ExecuteRequests/BatchEvents
    * QueryExecuteMessageNotification -> ExecuteRequests/MessageEvent
    * QueryExecuteCompleteNotification -> ExecuteRequests/QueryCompleteEvent
    * QueryExecuteResultSetCompleteNotification -> ExecuteRequests/ResultSetEvents
    * QueryExecuteSubsetRequest -> SubsetRequest.cs
* Creating an inheritance pattern where
    * `ExecuteRequestParamsBase` has execution options and ID for a query execute request
    * `ExecuteDocumentSelectionParams` inherits from `ExecuteRequestParamsBase` and provides a document selection
    * `ExecuteStringParams`  inherits from `ExecuteRequestParamsBase` and provides the query text
* Adding a helper method to get SQL text based on request type
* Through the AWESOME POWER OF POLYMORPHISM, we are able to create a request for executing straight SQL basically for free.
* **Breaking change:** query/execute => query/executeDocumentSelection to make it more obvious what is expected.
* Adding unit tests for the code that gets SQL text

* Refactoring of execute contracts into their own namespace

* Refactoring application

* Adding new request for executing queries as strings

* Adding forgotten string request

* Changing the logic for checking the request param types

* Removing redundant declarations
2017-01-30 15:24:12 -08:00
Leila Lali
dcff5dd915 New tool to store SQL connection configs locally (#218)
* added a new tool to store SQL connections locally. Modified the peek definition tests to create test database before running test


* fixed failing test QueryExecutionPlanInvalidParamsTest

* Fixes based on code review comments

* fixed failing test GetSignatureHelpReturnsNotNullIfParseInfoInitialized
2017-01-25 16:19:27 -08:00
Leila Lali
b353b2137e New test common project for database connections using the settings.json (#210)
* moved test driver tests and test common classes to separate projects
2017-01-11 13:47:56 -08:00
Benjamin Russell
e71bcefb28 Feature: Progressive Messages (#208)
This change is a reworking of the way that messages are sent to clients from the service layer. It is also a reworking of the protocol to ensure that all formulations of query send back events to the client in a deterministic ordering. To support the first change:
* Added a new event that will be sent when a message is generated
* Messages now indicate which Batch (if any) generated them
* Messages now indicate if they were error level
* Removed message storage in Batch objects and BatchSummary objects
* Batch objects no longer have error state
2017-01-10 16:42:03 -08:00
Leila Lali
e9398f7182 Sending status change notifications from server (#186)
* Sending status change notifications from server
2016-12-14 13:19:02 -08:00
Leila Lali
68a83814d5 fixed the broken perf test (#180)
* fixed the broken perf test
2016-12-12 16:23:33 -08:00
Leila Lali
453ff9de15 Perf Test fixing bugs and Update command (#155)
* Fixed some bugs caused by rafactoring

* Verifying a test db is created before running the tests
2016-11-30 12:56:48 -08:00
Benjamin Russell
db1e4ae351 Fix Code Coverage (#151)
This is another large code review. I want to make a few more changes, but since these changes will stand on their own, I'll hold back on making this change set any larger than it already is.
Changes in this request:
To address Microsoft/vscode-mssql#326, instead of doing taskkill on the service layer when WaitForExit is executed, we now make an educated guess at which service layer was spawned when the test starts and do a Process.Kill on it when we shut down the test.
All the perf tests have been moved into a new project. This was done to keep them easily separated from code coverage test runs. At the same time the perf tests were separated into separate classes for logical categorization. This process will likely be repeated on the stress tests. The tests can still easily be ran from Visual Studio Test Explorer
To address Microsoft/vscode-mssql#349, a new SelfCleaningFile class was created to allow for easy cleanup of temporary files generated for integration tests via using blocks.
Due to some of the refactoring done while moving the perf tests to a new project, the TestBase class had to be switched to more of a helper class style. As such, all tests that use inherit from TestBase now create a TestBase object on start via a using block. This also simplifies the cleanup at the end of the test.

* Solution for hanging code coverage runs

Code coverage runs would hang in certain scenarios if a test failed before
the service process could be spawned. The taskkill command would fail to
find the service process. The test would then wait for opencover to exit,
but it would not since the service process it had spawned would still be
running, causing the test run to hang indefinitely.

Solution was to capture the service process after it launched and
explicitly kill it when shutting down the test driver.

* Setting the test name in the propery in the class and removign the parameter from each method

* New project for perf tests

* Reworking integration tests to cleanup temp files

* Changes as per @llali review comments

* Adding copyright notices
* Renaming TestBase => TestHelper
* Renaming SelfCleaningFile => SelfCleaningTempFile
* Removing code that sets TestName property

* Fixing compilation error due to removed code
2016-11-18 17:46:56 -08:00