Commit Graph

205 Commits

Author SHA1 Message Date
Udeesha Gautam
616a79c83d GetConnectionString API fix to not change the cache only return the value (#1040)
* Get connection string call was changing the connection info (ref object) received from cache. Changing it to just get and make changes to only the returned string..

* Change to ensure PR validation works
2020-08-09 19:17:16 -07:00
David Shiflet
839acf67cd Convert most tools service tests to nunit (#1037)
* Remove xunit dependency from testdriver

* swap expected/actual as needed

* Convert Test.Common to nunit

* port hosting unit tests to nunit

* port batchparser integration tests to nunit

* port testdriver.tests to nunit

* fix target to copy dependency

* port servicelayer unittests to nunit

* more unit test fixes

* port integration tests to nunit

* fix test method type

* try using latest windows build for PRs

* reduce test memory use
2020-08-05 13:43:14 -04:00
Kim Santiago
788dc31081 Update DacFx deploy and generate script with options (#998)
* update deploy and generate script to accept deployment options

* add tests

* add test with option set to true
2020-07-29 13:43:38 -07:00
Kim Santiago
1a93404e54 Add support for getting DacFx deploy options from a publish profile (#995)
* add support for getting options from a publish profile

* update comments

* set values for default options if they aren't specified in the publish profile

* addressing comments
2020-07-27 17:52:15 -07:00
Udeesha Gautam
3049dacb84 Update DacFx and MDS to same version (#986)
* Updating DacFx and MDS nuget to match versions

* Fixing a test. It's unreleated to change.
2020-06-22 15:16:13 -07: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
Benjin Dubishar
c51a59dadf Adding SqlCmdVars support for DacFx Deploy (#971)
* Adding SqlCmdVars support for DacFx Deploy

* Adding SqlCmdVars support for GenerateDeployScript

* Consolidating test logic
2020-06-10 16:00:59 -07:00
Aleksei Guzev
ca5cbf76e6 Fix TargetName for assessment items (#968) (#969)
* Remove the second appearance of server name in TargetName property
* Replace slash with colon as database name separator in TargetName to avoid ambiguity
Fixes #968
2020-06-08 13:26:25 -07:00
Kim Santiago
836687a41d update schema compare default option (#967) 2020-06-08 11:26:00 -07:00
Charles Gagnon
42e5269359 Fix test notebook name casing (#970) 2020-06-08 10:58:37 -07:00
Udeesha Gautam
9eec757ad1 Updating DacFx nuget to one with SqlTasks (#958)
* Updating DacFx nuget to one with SqlTasks

* Adding common references to build props to avoid multiple places for update
2020-05-08 17:43:04 -07:00
Sakshi Sharma
96df91c8fa Sql Proj Extract from database to Sql files (#949)
* SqlToolsServices changes for  Sql Proj Extract from database to Sql files

* Bumped DacFx version. Addressed comments.
2020-04-27 18:35:19 -07:00
Aleksei Guzev
bcc1f2a486 Add AQL Assessment service (#946)
[SQL Assessment API](https://docs.microsoft.com/en-us/sql/sql-assessment-api/sql-assessment-api-overview) provides a mechanism to evaluate the configuration
of SQL Server for best practices. SQL Assessment API gives a list
of recommended actions to improve SQL Server performance or security.

The SQL Assessment service is used by the expected SQL Assessment
feature of Azure Data Studio. 

SqlAssessmentService forwards JSONRPC calls to SQL Assessment engine
and wraps results as a response.

`assessment/getAssessmentItems` returns a set of checks 
applicable to a given target.

`assessment/invoke` returns a set of recommendations
for improving SQL Server instance or database configurations. 

`assessment/generateScript` returns a T-SQL script for storing
an assessment result set to a SQL data table.
2020-04-24 10:52:55 +03:00
Kim Santiago
bf6c573e7b bump nuget package (#942) 2020-04-07 16:25:57 -07:00
Jeff Trimmer
6920c34570 Always Encrypted Azure Key Vault Support (#934)
Add support for running queries that require a decryption key from Azure Key Vault when using Always Encrypted.
2020-03-19 12:48:05 -07:00
Kim Santiago
70c5e7b7f9 bump dacfx nuget package (#932) 2020-03-04 12:13:15 -08:00
Leila Lali
73fc70fbbc Adding service operations for external languages (#918)
* Added service operations for external languages
2020-02-21 08:52:58 -08:00
Leila Lali
3626d000fd Added service class for machine learning services operations (#906)
* Added service class for server configurations and language extension
2020-01-15 11:21:07 -08:00
Udeesha Gautam
fe17962ac9 SqlCmd Connect/On Error/Include commands support (#898)
* Initial Investigation

* Working code with include, connect, on error and tests

* Adding some loc strings

* Some cleanup and more tests

* Some dummy change to trigger build

* Adding PR comments

* Addressing PR comments
2020-01-10 17:54:39 -08:00
Kim Santiago
675bf5f13c bump dacfx nuget package (#902) 2019-12-17 14:00:35 -08:00
Karl Burtram
427f0c11e8 Bump SMO and SqlClient to pickup Microsoft.Data.SqlClient fixes (#894)
* Revert "Revert to SMO with older SQLClient driver (#889)"

This reverts commit b763abae47.

* Bump SMO and SqlClient
2019-11-22 17:17:21 -08:00
Karl Burtram
b763abae47 Revert to SMO with older SQLClient driver (#889)
* Revert "Update SMO (#875)"

This reverts commit 96593d66e3.

* Revert "Switch Tools Service to new SMO and Microsoft.Data.SqlClient driver (#865)"

This reverts commit 9d140b53f3.

* Bump SMO to 160.1910315.0-preview
2019-11-04 13:00:45 -08:00
Kim Santiago
b9faabb704 Fix schema compare exclude behaviour (#884)
* Send back dependencies causing the exclude to fail instead of blocking the call

* Separate AffectedDependences and BlockingDependencies into separate properties

* add named parameters

* separate out include/exclude success cases for clarity
2019-10-25 18:01:33 -07:00
Kim Santiago
e60fc1a16c Schema compare include/exclude changes (#881)
* send back success of include/exclude request

* update dacfx nuget package and use new api to get affected dependencies of include/exclude request

* addressing comments

* rename test

* Addressing comments
2019-10-24 17:11:30 -07:00
Charles Gagnon
6f17c15d2c Test fixes (#877)
* Test fixes

* Delete unneeded using
2019-10-16 10:43:12 -07:00
Charles Gagnon
de1bab9f1e Fix Intellisense not working for saved files (#867)
* Fix tools service to store the corrected file path

* Use ClientFilePath for key

* Further fixes

* Undo spacing changes

* Fix tests

* Trigger CI rebuild
2019-09-19 11:28:40 -07:00
David Shiflet
9d140b53f3 Switch Tools Service to new SMO and Microsoft.Data.SqlClient driver (#865)
* switch to ambient props and targets files

* build against Microsoft.Data.SqlClient

* build tests

* fix test bug

* temporarily add SMO nuget to the repo

* update to released Microsoft.Data package
2019-09-17 17:51:19 -04:00
Kim Santiago
1d1eb00b3b bump dacfx nuget version so that dw will work (#861) 2019-09-05 16:28:20 -07:00
Kim Santiago
89623c1ae8 bump dacfx nuget package version (#860) 2019-09-03 15:53:12 -07:00
Kim Santiago
361287a81b Add Schema Compare support for AAD (#853)
* pass AzureAcountToken if there is one

* Addressing comments

* formatting

* more formatting and moving getting connectionstring from constructor to CreateSchemaCompareEndpoint()
2019-08-22 14:19:39 -07:00
Aasim Khan
487235b1e9 Added endpoint for fetching all notebook jobs (#834)
* Added endpoint for fetching all notebook jobs

* Refractored NotebookJobInfo to AgentNotebookInfo to make it more consistent with the rest of the codebase

* Added Notebook History endpoint in contracts.

* Added Create, Update, Delete notebook endpoints. Also added separate fetch template, materialized notebook endpoints. This will make the Notebook Request and Notebook History responses lighter.

* AgentNotebookInfo is now derived from AgentJobInfo

* added fetch noteook history endpoint

* Added fetching materialized notebook endpoint

* Added code for cleaning up the directory

* Added create notebook api

* Added Update and delete notebook job

* Fixed notebook history API

* Added last run info to the script and template folder

* Added execute database feature for notebook Jobs

* SQL commands are now using sqlparameters to prevent
any injection attacks

* Changed rundate and runtime to string to preserve
leading zeros

* integration test for agentnotebooks api

* Made some changes mentioned in PR

* Refactored the code, removed enpoint logic from the notebook handler and
wrote test cases

* changes select statements, fixed a bug in the test job cleanup
and fixed other stuff mentioned in the PR.

* added notebook_error column in notebook history select statement

* Added get template notebook endpoint
2019-08-22 12:37:19 -07:00
Udeesha Gautam
68145d5e7c Feature/sqlcmd : Enable running scripts with SQLCMD variables - Part 1 (#839)
* Part1 : Changes to make cmdcmd script to work with parameters in script

* Stop SQL intellisense for SQLCMD

* Adding test for Intellisense handling of SQLCMD page

* Removing unintentional spacing changes caused by formatting

* Updating with smaller CR comments. Will discuss regarding script vs other options in batch info

* Removing unintentional change

* Adding latest PR comments
2019-08-09 14:25:47 -07:00
Udeesha Gautam
4fe02a6885 Update dacfx to latest preview (#845)
* updating dacfx with private nuget for testing

* Updating to real dacfx-preview version

* Removing additional refs added by nuget package manager (these were not there previously)
2019-08-08 20:55:06 -07:00
Shengyu Fu
4f4d94bb88 Merge branch 'shengyu_0804' of https://github.com/shengyfu/sqltoolsservice into shengyfu-pr/842 2019-08-07 11:56:14 -07:00
Shengyu Fu
9bbc7a20c9 Fix tests with the updated the Command class 2019-08-05 16:22:51 -07:00
Charles Gagnon
92bb281cdd Ensure test file is deleted and fix test project path (#843)
* Ensure test file is always deleted

* Fix up project path
2019-08-05 14:05:32 -07:00
Shengyu Fu
e1b9890f5c Adding completion extension loading and execution logic (#833)
* Adding ICompletionExtension interface

* Adding extension loading and execution logic

* Fixing compilation error in VS 2017

* Using MEF for completion extension discovery

* using await on GetCompletionItems

* Adding an integration test for completion extension and update the completion extension interface

* Update the completion extension test

* Fix issues based on review comments

* Remove try/cache based on review comments, fix a integration test.

* More changes based on review comments

* Fixing SendResult logic for completion extension loading

* Only load completion extension from the assembly passed in, add more comments in the test

* Adding right assert messages in the test.

* More fixes based on review comments

* Dropping ICompletionExtensionProvider, load assembly only if it's loaded at the first time or updated since last load.

* Fix based on the latest review comments

* Adding missing TSQL functions in default completion list

* Update jsonrpc documentation for completion/extLoad
2019-07-19 12:04:03 -07:00
Charles Gagnon
c1f2411b02 FIx intellisense cache not refreshing (#831)
* FIx intellisense cache not refreshing

* Remove extra newlines

* Output label to provide more useful information in case of error
2019-06-27 23:50:41 +00:00
Udeesha Gautam
a6450eb180 Bug/schemacompare publish and script tasks to send back results (#830)
* Fix Schema compare Publish and Script generation task to return back error messages correctly.

* Elaborating test a bit more to cover tasks

* Validate one task at a time for better clarity

* send back only errors not whole messages since task view doesnt have a good way (other than hover text) to show long messages

* Fixing the negative test cases
2019-06-27 15:55:26 -07:00
Aditya Bist
fc50913f14 chagned strings to enums and can edit step completion actions (#827) 2019-06-20 00:30:37 -07:00
Udeesha Gautam
347d233e95 Change to pass Schema compare Operation id from ADS (#828)
* Changing that SC Operation id be passed from ADS and some test addition

* Fixing typos
2019-06-19 09:49:50 -07:00
udeeshagautam
3e1f186891 Schema compare cancel operation (#826)
* First cut of schema compare cancel (private nuget)

* Update Dacfx nuget to a published version
2019-06-14 18:19:36 -07:00
udeeshagautam
432e054d55 Feature/schemacompare scmp save (#824)
* First cut of scmp Save related changes and some test refactoring

* Adding Exclude/Include objects in saving

* Add diff entry validation as part of test

* Adding PR comments - major change is change to nameparts in place of name hence preserving any "."/"[" in name and avoiding any string operations

* One more UT scenario addition for create excluded object
2019-06-13 17:28:59 -07:00
Kim Santiago
b451670222 Schema Compare open SCMP file (#825)
* initial open scmp changes

* more open scmp changes and adding tests

* moving some common test code

* simplify endpoint info parsing

* addressing comments and moving more common test code

* addressing comments
2019-06-13 14:24:19 -07:00
Kim Santiago
3566471c6c removing unused request context from dacfx and schema compare tests (#823) 2019-06-10 16:58:31 -07:00
Kim Santiago
f7c86a80ca Open dacfx deploy script instead of saving to file path (#822)
* open dacfx deploy script

* moving test db cleanups into finally blocks
2019-06-10 09:26:42 -07:00
udeeshagautam
b30926b273 Adding some default values to match SSDT and other tools (#818)
* Adding some default values to match DacFx deploy Extension and other tools. This help the default behavior but doesn't fix the issue.

* Fixing a test for default values and adding comment
2019-05-24 10:51:21 -07:00
kisantia
e68b6d62aa Open schema compare generated script (#813) 2019-05-20 14:14:50 -07:00
udeeshagautam
db70f421ae Fix for Full/Log/Differential backup #5370 (#811)
* fixing the order of setting backup properties so that they are correctly propogated to actual action

* Adding a backup type specific test and enabling 'few' old ones which seem to work consistentenly

* Adding finally block, close connection and name change as per PR comments
2019-05-14 17:00:21 -07:00
udeeshagautam
f8cd355e61 Feature/schemacompare Exclude-Include and Options enhancement (#799)
* Initial code for Including/Excluding individual changes (no tests added yet)

* Adding Exclude include tests. Default options call and additional options tests.

* Taking PR comments

* Retry in test for reliability
2019-04-25 22:07:00 -07:00