Commit Graph

1245 Commits

Author SHA1 Message Date
Alex Ma
431e4cfbf1 Add changeConnectionUri action for query (#1227)
* added wip rename query

* added first rename test

* added missing query handling and two new tests

* removed ServiceDispose

* added change to owneruri.

* made fields private, used accessor methods

* added readonly flag back

* added didSave to sqltools.servicelayer

* fix for docsavecallbacks

* removed tryremove

* test disconnect in queryExecutionService

* removed debug message working query.

* added comment to handlerenamerequest

* added uri replacement function

* removed duplicate removemap function

* added minor fixes

* changed connectionOwnerUri to getter setter

* removed handledidsave and added setters

* removed additional save parts

* fixed space issues

* more fixes for spaces

* restored spaces

* fixed workspaceservice

* Update TextDocument.cs

* changed renameRequest into notification WIP

* restored textdocument

* restored textdocument.cs

* added rightwards arrow

* renamed rename to ChangeConnectionUri

* added more renames

* rename changeconnectionuri to changeuri

* renamed file names

* Revert "renamed file names"

This reverts commit 55228e65025b5179b15ae9a0adc095d95538723d.

* Revert "rename changeconnectionuri to changeuri"

This reverts commit 23f3813f609e3947f103e057f7c0919184075bdc.

* removed logging message and other small changes

* renamed class and method
2021-08-30 11:06:07 -07:00
Karl Burtram
5d5debbad6 Enable scripting for subobjects such as triggers (#1237)
* WIP 1

* Cleanups

* Change how schema is appended in to urn

* Add comment and fix incorrect condition

* Add parent type name to support Views, etc.
2021-08-26 13:06:15 -07:00
Justin M
0421d3ae7c Added check if metadata is empty to throw error exception. (#1236)
* Added check if metadata is empty to throw error exception.

* Changed error message.

* Changed error message to be displayed when invalid Workspace ID is provided for AzureMonitorLogs.
2021-08-25 11:38:35 -07:00
Kim Santiago
c20af4f777 Get Azure functions operation (#1228)
* add GetAzureFunctions

* add tests

* cleanup

* check for quotes

* address other comments

* add logging and let error result get sent

* rename file
2021-08-18 17:05:27 -07:00
dependabot[bot]
ccd2ec446d Bump path-parse from 1.0.6 to 1.0.7 in /test/CodeCoverage (#1235)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-12 09:11:08 -07:00
Justin M
822213a655 AzureMonitor Fix Dashboard Tables (#1232)
* Changed results for AzureMonitor GetChildObjects for Dashboard

* Changed MonitorDataSource to use SortedDictionary instead of List when storing nodes.
2021-08-10 11:00:45 -07:00
Aasim Khan
f8664641cf Fixing GetServerSystemInfo for Azure DBs (#1231)
* Not throwing errors when we try to fetch SQL server properties like server count and physical mem.

* Fixed comment

* Renaming get server cpu count

* Adding more detailed comment over here

* Making properties cpu count and physical memory to nullable<int> so they are defaulted to null.

* Fixing rest of the properties to nullable.
2021-08-09 17:24:04 -07:00
csigs
71b87055f1 LEGO: check in for main to temporary branch. (#1230) 2021-08-09 11:17:12 -07:00
Aasim Khan
c5cbcf02a2 Removing unused code (#1229)
and adding a null check
2021-08-06 20:11:58 -07:00
Justin M
609194d66f Added filter logic to exclude comments in MonitorClient. Added error handling in KustoClient to handle ErrorResponseExceptions. (#1226) 2021-08-05 09:06:21 -07:00
Justin M
d666ed536e Changed logic around loading tables in MonitorDataSource. Added DisplayName to TableGroupsModel (#1225) 2021-08-05 09:05:58 -07:00
Kim Santiago
b1653b25e4 Insert sql bindings into Azure Functions (#1224)
* getting table name from a script

* add InsertSqlInputBindingOperation

* cleanup

* move azure functions stuff out of dacfx service

* cleanup

* add tests

* add another test

* cleanup

* add comments and connection string setting

* addressing comments

* change name to use add instead of insert
2021-08-04 13:02:52 -07:00
Aasim Khan
a7703e63a4 Fixing the logic to retireve rule metadata in sql assessments (#1223) 2021-07-21 17:40:04 -07:00
Christopher Suh
d0f9af0a3e Enable Multiple Assessments (#1219)
* wip

* wip

* modified assessments to handle multiple DBs

* pr comment change

* cleanup

* cleanup

* cleanup
2021-07-21 11:20:16 -07:00
Aasim Khan
f25dd5d2a4 Adding server metadata to SQL Migration Assessment API (#1222)
* WIP

* Adding server metdata to assessment call

* Fixed spacing

* Sorted imports
Added copyright header
Changes some class names
Fixed description

* Fixed assessment result and removing unused imports

* Adding assessment result
2021-07-19 12:38:10 -07:00
Alex Ma
c731744298 Fix for deleting text columns (#928)
* Added handling for deleting problematic rows

* minor formatting changes

* Null checks and executereader implemented

* minor formatting

* Fix for column deletion for text

* minor space format

* more format changes

* Removal of top 200 and change of text comparison

* space fix

* minor commit

* Added new tests for single clause

* simplified regex

* spacing fix

* some polish for RowEditBaseTests

* space fix

* loc update (#914)

* loc update

* loc updates

* Warning for multiple delete (#931)

* Fix for multiple delete bug

* minor space removal

* removed catch error in RowDelete

* small optimizations

* space adding

* WIP on creating test

* Some cleanup

* removed spaces

* Fix for verifytext

* Added check for command format correctness.

* tidying up

* added working test for command exception

* simplification of TestDbDataReader getint

* Corrections made

* spacing and naming issues

* minor space

* one more space issue

* Revert "Support ActiveDirectoryPassword authentication (#899)" (#915)

This reverts commit b786a14c03.

* revert changes to connectionService

* fix for asserts

* fix clauses

Co-authored-by: khoiph1 <khoiph@microsoft.com>
Co-authored-by: Amir Omidi <amir@aaomidi.com>
2021-07-16 14:11:32 -07:00
Christopher Suh
0032cc684b Update Assessment Nuget Package (#1221)
* update nuget package

* point to new assessment nuget version

* cleanup
2021-07-15 15:28:34 -07:00
dependabot[bot]
19d20a238b Bump hosted-git-info from 2.7.1 to 2.8.9 in /test/CodeCoverage (#1210)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.7.1 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.7.1...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-14 08:43:41 -07:00
Aasim Khan
539e47b40f Adding cpu count and ram size to server info (#1220)
* adding network file validator contract

* Adding additional properties to serverInfo

* Renaming to serversysinfo

* fixing var name

* Changed to smo to get the properties

* Fixing casting error

* renaming to sysinfo

* Removing unused sql scripts

* Throwing an error and renaming classes

* Changing Physicalmemory prop name from kb to mb

* pushing prop name change

* fixing comment
2021-07-13 12:57:53 -07:00
Justin M
1f7da97e6c Added AzureMonitor to Microsoft.Kusto.ServiceLayer (#1208)
* Added AzureMonitor to Microsoft.Kusto.ServiceLayer.

* Added Intellisense for AzureMonitor. Moved Intellisense logic from KustoIntellisenseClient to IntellisenseClientBase.

* Added ServiceName as a command parameter for starting Kusto.

* Added check to return null if connectionInfo is not in the connectionService.

* Added support for Dashboard in MetadataService and AdminService.

* Removed workspace id from databaseName for Monitor. Added logic for MetadataService and AdminService to return different information for AzureMonitor.

* Moved providerName and providerDescription to DataSourceFactory.

* Changed DatabaseName to include Name and Id. Changed ProviderName to LOGANALYTICS in DataSourceFactory

* Fixed unit tests

* Changed logic to use ServiceName instead of server to determine DataSourceType

* Code review feedback and reverted changes to ObjectExplorerService.

* Removed unused reference from HostLoader

* Changed Parallel.Invoke to await Task.Run

* Moved Kusto datasource and supporting classes to separate directory.

* Removed unused datasourceFactory from ConnectionService. Added GetDatabases and GetDatabaseInfo to IDataSource and child classes

* Renamed Instance variables in ObjectExplorerService. Removed unused attribute on TSqlFormatterService. Removed invalid comment in ConnectionService.

* Fixed warnings in build.

* Moved SizeInMB to DatabaseMetadata. Refactored ConvertToDatabaseInfo

* Fixed unit test
2021-06-25 21:40:45 -07:00
Aasim Khan
9877af54b9 Updating to dotnet 5.0 (#1218)
* adding network file validator contract

* updating to dotnet 5

* reverting change in pipeline

* updating target framework to 5.0

* updating srgen and using target framework var

* reverting srgen back to 3.1

* Adding dotnet 3.1 to build

* Fixing task def

* removing global json

* updating other 3.1 refs to 5.0

* removing netcore folder from build.cake

* Moving and renaming dotnet 3.1 task
2021-06-25 13:53:01 -07:00
Christopher Suh
ae9ec03018 Update Assessment Nuget to Enable Logging (#1215)
* wip

* updated nuget package

* removed unused nuget

* updated assessment nuget to add logging

* added logs filepath'

* updated assessment nuget

* updated nuget
2021-06-15 10:49:20 -07:00
Alex Ma
993b094db9 Localization added to sqlservicetools (#1216)
* added other languages to ServiceLayer

* fixed travis and appveyor yaml, added other languages for localization

* added spanish and german strings to credentialslocalization, also WIP for coreservices test

* added WIP localization test for CoreServices

* Removed unit test for coreservices, need to work on those later.

* restored travis and appveyor

* added kusto string resource localization test

* added localization test and locale change for SqlToolsCredentials

* added locale command options to ResourceProvider

* revert resourceprovider test

* Localized SqlTools.Credentials

* added hosting localization

* replaced new with translation to be consistent with main service layer

* reverted external changes as it is unnecessary

* Translated ManagedBatchParser

* test culture value

* test culture change

* temporarily comment out service layer command options

* returned sr.cs

* temporarily remove bad tests

* restored tests and allowed for SR culture to change for dependencies (for future testing)

* localization for resourceprovider components added.

* Set LocaleSetter to public and also removed InternalsVisible for Kusto, Credentials and ResourceProvider

* removed unnecessary changes

* Removed CredentialsCommandOptions

* renamed pt-BR to pt-br

* Rename sr.pt-BR.xlf.template to sr.pt-br.xlf.template

* Rename src/Microsoft.SqlTools.ServiceLayer/Localization/LCL/pt-BR/sr.resx.lcl to src/Microsoft.SqlTools.ServiceLayer/Localization/LCL/pt-br/sr.resx.lcl

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.resx to sr.pt-br.resx

* Rename sr.pt-BR.resx to sr.pt-br.resx

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.resx to sr.pt-br.resx

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.resx to sr.pt-br.resx

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.resx to sr.pt-br.resx

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.resx to sr.pt-br.resx

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.resx to sr.pt-br.resx

* restored newlines

* Update sr.pt-br.xlf.template

Removed newline

* removed newline

* fixing newlines for consistency

* removed unnecessary newline
2021-06-10 15:50:53 -07:00
Alan Ren
54fe38ef95 use specific version of ubuntu image (#1214)
use specific version so that our dependency is fixed.
2021-06-02 05:22:42 -07:00
Alan Ren
af01ddf58c update release vm image (#1213) 2021-05-28 13:41:04 -07:00
Sai Avishkar Sreerama
37b2b26edf Filtering Schema Compare error from warnings (#1212)
* Filtering Schema Compare error from warnings

* SchemaCompare added comparison result error message validations to existing tests

* Extra semi-colon noticed and removed from the code

* Added new test case to validate warning message exclusions from SC result

* SC test asserions comment added

* Edge case scenario fixed and tests are 100% passed
2021-05-21 11:25:25 +05:30
Charles Gagnon
64a6b6a85c Fix intellisense parsing for Azure and MI connections (#1211)
* Fix intellisense parsing for Azure connections

* formatting

* Refactor to use compat level

* update logic

* Update log message

* spelling
2021-05-13 14:39:19 -07:00
Sai Avishkar Sreerama
6785940f1d SchemaCompare Unknown errors display fix with DacFx errors (#1188)
* SchemaCompare Unknown errors display fix with DacFx errors
2021-05-14 00:08:04 +05:30
Christopher Suh
21527637dc Update Assessment nuget (#1209)
* wip

* updated nuget package

* removed unused nuget
2021-05-11 15:26:13 -07:00
Alan Ren
27cb8f2f08 use new thread to handle requests (#1207) 2021-05-06 17:20:56 -07:00
Kim Santiago
97d7fd1169 update DacFx version (#1205) 2021-05-05 15:39:39 -07:00
Karl Burtram
63aa6758e8 Fix OE with dbpool connection (#1197)
* Fix OE with dbpool connection

* Remove extra whitespace

* Remove hard-coded number
2021-05-05 14:24:45 -07:00
Kim Santiago
e123c24210 fix failing schema compare options tests" (#1204) 2021-05-05 13:31:45 -07:00
Aasim Khan
add0724c21 Adding network share validation in sql migration. (#1203)
* adding network file validator contract

* Adding UNC path validation

* Using helper methods for sanity checks

* Fixed the validation variable type

* Fixing if condition
2021-05-04 15:16:31 -07:00
Aasim Khan
3ad2b2312a Adding windows account validation api for sql migration extensions. (#1202)
* Adding validate file share api

* Making message endpoint camel case

* Adding validation for windows username
2021-05-03 23:51:45 -07:00
Justin M
7fc07d08c0 Kusto Special Character Database Fix (#1201)
* Removed Parallel.Invoke from KustoIntellisenseClient.cs > LoadSchema. Added EscapeName from databaseName to LoadSchema and GetTableInfos

* Reverted change to Parallel.Invoke in LoadSchema
2021-04-30 17:33:08 -07:00
Aasim Khan
10c24aaeb3 Fixing a notebook history bug in SQL Agent (#1199)
* Added a leading 0 to notebook history runtimes

* Fixing comment

* Fix for getting run date and time for notebook jobs in a proper format - Try2

* Reverting back to previous query
2021-04-28 16:52:24 -07:00
Karl Burtram
6a45865f3a Bump SMO and SqlClient driver (#1196) 2021-04-27 13:19:21 -07:00
Justin M
875d60b418 Moved ParseDatabaseName to KustoQueryUtils and called it from KustoDataSource. (#1195) 2021-04-26 16:53:29 -07:00
bugaosuni59
7a76399e9d update the JSON-RPC API document: (#1194)
1.add some connection and query API
	2.add some use case for some useful API

Co-authored-by: Xianlong Wang <t-xiawang@microsoft.com>
2021-04-22 09:15:50 -07:00
Karl Burtram
ccf95aed77 Move unused forked code to external directory (#1192)
* Move unused forked code to external directory

* Fix SLN build errors

* Add back resource provider core since it's referenced by main resource provider project

* Update PackageProjects step of pipeline
2021-04-16 15:33:35 -07:00
Charles Gagnon
dc6555a823 Escape file URIs (#1189)
* Escape file URIs

* Fix test

* Add tests
2021-04-16 15:33:11 -07:00
Karl Burtram
6fe715d2d8 Do not update the DB name when connecting to DB pool (#1186)
* Do not update the DB name when connecting to DB pool

* Fix typo in the connection service
2021-04-15 14:48:02 -07:00
Christopher Suh
6bafed10eb added rule id (#1190) 2021-04-15 12:02:32 -07:00
Justin M
516553f72a Default Kusto database name (#1187)
* Added check to set the databaseName to the first database on the cluster when no database is provided

* Changed kusto query for loading databases to follow best practices

* Fixed failing unit test

* Optimized query for getting first database
2021-04-13 00:00:56 -07:00
dependabot[bot]
62e896c94c Bump yargs-parser from 5.0.0 to 5.0.1 in /test/CodeCoverage (#1185)
Bumps [yargs-parser](https://github.com/yargs/yargs-parser) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/yargs/yargs-parser/releases)
- [Changelog](https://github.com/yargs/yargs-parser/blob/v5.0.1/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs-parser/compare/v5.0.0...v5.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 14:20:51 -07:00
dependabot[bot]
775275340e Bump y18n from 3.2.1 to 3.2.2 in /test/CodeCoverage (#1184)
Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-31 14:13:46 -07:00
Justin M
c483cea88c Renamed RefreshAzureToken to RefreshAuthToken. Changed provider value to authenticationType. (#1183) 2021-03-29 15:08:09 -07:00
Christopher Suh
2badd8e728 Fix Sql Auth for Migration Assessments (#1182)
* pass connection string to dma engine

* cleanup

* remove optional parameter

* modified query
2021-03-26 15:59:07 -07:00
Aasim Khan
5a8cfab8fa Sending assessment errors to ads (#1180) 2021-03-22 09:14:02 -07:00