Commit Graph

245 Commits

Author SHA1 Message Date
Benjin Dubishar
edc2c5e200 Surfacing better error messages about SQLCMD var names (#22509)
* Surfacing better error messages about SQLCMD var names

* correcting docstring

* adding space to join char
2023-03-29 14:23:03 -07:00
Benjin Dubishar
15c0c68e44 SQL Database Projects backend swap to DacFx/Tools Service (#22451)
* Move call to STS move api into project.ts (#22071)

* move call to STS move api into project.ts

* remove undefined

* Remove convert to sdk style code (#22081)

* remove convert to sdk style code

* remove from package.json

* Merging latest from main (#22097)

* [SQL-Migration] Login migrations telemetry (#22038)

This PR enhances telemetry for login migrations (and in the following ways:

Add details for starting migration (number of logins migrating, type of logins)
Log Migration result (number of errors per step, duration of each step, type of logins, if system error occurred)
Add sql-migration extension to our telemetry
Adds details when trying to connect to target
Tracks clicking "done" from the wizard
Fixes bucketizing for navigating telemetry in the login migration wizard
Sample usage of kusto query for new telemetry:
RawEventsADS
| where EventName contains 'sql-migration'
| extend view = tostring(Properties['view'])
| extend action = tostring(Properties['action'])
| extend buttonPressed = tostring(Properties['buttonpressed'])
| extend pageTitle = tostring(Properties['pagetitle'])
| extend adsVersion = tostring(Properties['common.adsversion'])
| extend targetType = tostring(Properties['targettype'])
| extend tenantId = tostring(Properties['tenantid'])
| extend subscriptionId = tostring(Properties['subscriptionid'])
| where view contains "login"
//| where adsVersion contains "1.42.0-insider"
| where ClientTimestamp >= ago(18h)
| project EventName, ClientTimestamp, SessionId, view, pageTitle, action, buttonPressed, targetType
, tenantId, subscriptionId
, adsVersion, OSVersion, Properties

* Add Secure Enclaves dropdown with customizable Advanced options (#22019)

* Update extension READMEs (#22079)

* Fix query-history README images (#22084)

* [Loc] update to mssql and sql-migration xlf files (#22087)

* [Loc] small fix to Portuguese lcl file (#22088)

* [Loc] small fix to Portuguese lcl file

* remove newline

* Adding None bindings to the sqlProjects service (#22085)

* Adding None bindings

* updating names of None bindings

---------

Co-authored-by: AkshayMata <akam520@gmail.com>
Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com>
Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
Co-authored-by: Alex Ma <alma1@microsoft.com>

* Swap add and update sqlcmd variables in sql projects to use STS apis (#22086)

* delete sqlcmd variable working

* undo add

* remove variable from add and update sqlcmd variable apis

* hookup add and edit sqlcmd variable

* update vscode-mssql.d.ts

* move add and edit to project.ts

* update STS and tests

* move delete sqlcmd variable to project.ts (#22104)

* add test for add and edit sqlcmd variable (#22107)

* Swapping property access to STS (#22115)

* checkpoint

* Adding sqlproj property bindings

* Swapping out property loading and setting

* consolidating to this.sqlProjService

* Update dacpac reference to use STS api (#22116)

* Update add dacpac reference to use STS api

* remove changes for project ref

* validate unset settings from add database reference dialog

* update one more place getting sqlprojservice

* addressing comments

* fix path for dacpac reference (#22143)

* Swap add project reference to call STS (#22148)

* initial changes for swapping add project reference

* fix include path

* move common logic to helper function

* read sqlcmd variables from STS (#22147)

* Swapping .sqlproj- and crossplat compatibility-related functions to use STS (#22146)

* Supporting roundtrip

* Updating sqlproj style checks and cross-platform compatibility to use STS

* removing unnecessary awaits

* Fixing assertions

* Adding roundtrip update confirmations

* test cleanup

* cleaning up comment; localizing error

* Swap add system db reference (#22171)

* swap adding system database references

* fix tests

* remove only in test

* Read database references from STS (#22179)

* Read database references from STS

* fix system dacpac names

* fix project reference name

* Swap changeTargetPlatform to call STS (#22172)

* swap changeTargetPlatform to call STS

* Address comments

* De-duplicating enum for SystemDatabase (#22196)

* Deudping SystemDatabase enum

* simplifying enum refs

* Removing the now-unused imports code from SqlProjects (#22199)

* Removing unused importTargets entries

* whitespace; also to retrigger github checks on correct branch

* Hooking in Move() for Nones and PublishProfiles (#22200)

* Swap delete database reference to call STS (#22215)

* initial changes

* update contracts

* remove unnecessary info from SystemDatabaseReferenceProjectEntry

* uppercase master and msdb

* cleanup

* update test

* update comment

* undo change in projectController.ts

* remove unused system dacpac helper functions (#22204)

* more cleanup of project.ts (#22242)

* fix a couple database reference tests (#22248)

* Organizing sqlcmd variable and db reference code (#22284)

* organize database references and sqlcmd variable functions

* separate database reference tests

* Script and folder get + add support (#22166)

* Initial sqlobjectscripts

* adding mock filter

* test fixing

* another test passing

* swapping pre/post/none checkpoint

* awaiters

* convert addExistingItem

* swapping folders

* removing print

* stripping out project folder and file readers

* adding some regions

* Updating sqlproj style checks and cross-platform compatibility to use STS

* Updating sqlproj style checks and cross-platform compatibility to use STS

* added type property to tree items

* projectController swapovers

* removing imported targets

* Deleting the last of the TS XML parsing!

* Removing old functions

* renamed readNoneScripts to readNoneItems

* fixing path passed to STS calls

* remove system dacpac tests that were moved to DacFx (#22299)

* fix error when opening file after adding a file to sql project (#22309)

* fix error when opening file after adding a file to sql project

* remove unused import

* fix exclude for table and externalStreamingJob (#22310)

* add reload project (#22313)

* set DSP from STS (#22320)

* fix adding post-deployment script and existing item (#22317)

* Test cleanup for .sqlproj content operations (#22330)

* Fixing up tests

* sqlproj content operations tests

* remove only

* Cleanup

* Correcting collation

* cleanup constants.ts (#22336)

* fix folders not showing in project tree (#22319)

* Fix project controller tests (#22327)

* fixing ProjectController tests after swap

* remove only from database reference tests

* change system dbs back to lowercase in sql projects (#22353)

* Bump tools service

* Updated yarn.lock file

* pass SystemDacpacsLocation when building legacy style sql projects (#22329)

* Benjin/fix types (#22365)

* Updated yarn.lock file

* Fixing types

* fix projectController tests (#22375)

* Fixing the deletion flow for files and folders (#22366)

* checkpoint

* PR feedback

* Fixing up SDK-style operations project test group (#22377)

* Fixing up SDK-style project test group

* Removing .only

* Fixing up database reference tests (#22380)

* Fixing DB reference test group

* Extra cleanup

* removing only

* Consolidating None and PublishProfile; lighting up test (#22382)

* Lighting up project property tests (#22395)

* Checkpoint

* Lighting up project property tests

* removing timeout

* Fixing buildHelper test (#22400)

* Unskipping up roundtrip test (#22397)

* Refactoring database references to split literalVariable from databaseName (#22412)

* refactoring database references to split databaseVariableLiteralValue out from databaseName

* renaming more properties

* Removing branch in entry population

* removing only

* Fixing baselines for delete test

* PR feedback

* Fixing up ProjectTree tests (#22419)

* Fixing up projectTree tests

* remove only

* Updating projectController exclude test (#22413)

* Updating test

* moving filtering for external folders to readFolders() method

* Removing EntryType import

* fix ups (#22435)

* adding extra info for test failure

* hide exclude folder from context menu until it's supported (#22454)

* Adding current test name to generated folder to avoid conflicts (#22478)

* Adding current test name to generated folder to avoid conflicts

* passing correct test parameter in

* Adding trimming and entropy

* Deleting unused baselines (#22497)

* Replacing addToProject() with addSqlObjectScripts() (#22489)

* checkpoint

* Fixing test

* Updating file scraper function to filter only to .sql files (no folders, no txt)

* changing var names to reflect that the lists only contain .sql scripts

---------

Co-authored-by: Kim Santiago <31145923+kisantia@users.noreply.github.com>
Co-authored-by: AkshayMata <akam520@gmail.com>
Co-authored-by: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com>
Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
Co-authored-by: Alex Ma <alma1@microsoft.com>
2023-03-28 13:39:57 -07:00
Kim Santiago
2be49a9911 switch exclude object types table to use declarative table component (#22390)
* switch exclude options to use declarative table component

* add to disposableListeners
2023-03-21 14:09:31 -07:00
Kim Santiago
5fef212ea3 add vscode mssql handling for getSqlProjectsService() (#22121)
* add vscode mssql handling for getSqlProjectsService()

* try to fix error because of projectStyle enum
2023-03-03 16:52:05 -08:00
Kim Santiago
d6358b3e29 Add telemetry events for rename and move in sql project (#22068)
* add telemetry events for rename and move in sql project

* remove check

* update telemetry events
2023-03-01 10:25:09 -08:00
Kim Santiago
bc85f52dd4 Update sql project file move to use DacFx api (#22064)
* update move to use STS api

* swap rename to use move function

* add try catch

* remove debug statement

* get original path from node
2023-02-28 14:31:49 -08:00
Kim Santiago
0413b95343 Swap rename to use DacFx move api (#22051)
* swap rename to use DacFx project apis

* add support for rename pre/post deploy scripts and add tests

* update the enum names too

* check instanceof instead of getting and iterating through all the collections
2023-02-28 11:59:09 -08:00
Kim Santiago
8550faaa73 Have different node types for the different item types in sql project tree (#22053)
* Have different node types for the different item types in sql project tree

* address comments
2023-02-28 10:31:46 -08:00
Kim Santiago
e675fc14f0 Revert 'Add profile section in Publish project UI (#21906)' (#22047)
This reverts commit cb58286247.
2023-02-27 15:09:50 -08:00
Sakshi Sharma
41e2767880 Add publish profile to sql proj and tree (#22008)
* Read publish profiles stored in sqlproj file and present it in the projects tree

* Save publish profile and add it to sqlproj file, and present it in the tree

* Fix context menu operations

* Add tests

* Address comments
2023-02-23 22:32:12 -08:00
Kim Santiago
a7f68ebd33 Drag and drop support for sql projects tree (#21956)
* Drag and drop working

* update comment

* move to projectController

* remove registerTreeDataProvider

* add tests

* fix dragging to project root

* cleanup

* addressing comments
2023-02-21 15:45:25 -08:00
Kim Santiago
c5fc37c373 Initial changes for adding SqlProjectsService (#21967)
* Add SqlProjectsService

* cleanup

* reorder imports

* undo changes in project.ts for now to fix tests
2023-02-16 17:15:24 -08:00
Sakshi Sharma
7c6ae87fc8 Read server options from publish profile (#21960)
* Read encrypt and trust server certificate

* Set hostname in certificate setting

* Address comment- open connection dialog if the connection string in publish profile doesn't load a connection, instead of throwing an error.
2023-02-16 16:12:43 -08:00
Sakshi Sharma
cb58286247 Add profile section in Publish project UI (#21906)
* Add profile section in Publish project UI

* Move publish profile row below Publish Target

* Add contract for savePublishProfie and SaveProfileAs button functionality

* Make the DacFx contract functional

* Send values from UI to DacFx service call

* Fix build error

* Address comment, remove print statements

* Address comments

* Set correct connection string
2023-02-13 14:06:42 -08:00
Kim Santiago
af8316291e Rename file support in sql projects (#21858)
* add quickpick for rename file/folder in sql project

* add comment

* make rename file actually do something

* add validation
2023-02-07 16:27:44 -08:00
Kim Santiago
7efe4f9ce9 Remove data sources tree item from sql projects (#21842)
* remove data sources tree item from sql projects

* remove data sources node name
2023-02-06 14:48:26 -08:00
Sakshi Sharma
972312b3f5 Add validation for new file names for sql projects (#21601)
* Add validation for new file names for sql projects

* Addres comments and add validation for new project dialog

* Address comments

* Address comments on test

* Fix tests

* Remove extra error messages and rename file

* Address comments

* Fix tests

* Add test file back
2023-02-02 07:25:26 -08:00
Kim Santiago
cce794dd14 UI changes for add/edit/delete SQLCMD variables in sql projects (#21799)
* add edit command

* add and delete

* cleanup

* more cleanup
2023-02-01 15:06:07 -08:00
Kim Santiago
17949b9d03 Initial support for SQLCMD variables in sql project tree (#21574)
* initial changes

* sqlcmd node showing in tree

* Add edit sqlcmdvar command

* remove commands on sqlcmd vars  for now

* cleanup

* fix tests

* add icons

* remove TestProject

* add checks for undefined

* add variable
2023-01-25 10:19:39 -08:00
Kim Santiago
754d70d654 Add validation for checking for dacpac being on the same drive (#21434)
* add extra validation for add dacpac reference quickpick

* Add placeholder with message
2022-12-16 14:18:26 -08:00
Kim Santiago
3932332694 update sql projects strings to install .net 6 SDK instead of .net core 3.1 (#21235)
* update sql projects strings to install .net 6 SDK instead of .net core 3.1

* update to us aka.ms link
2022-11-21 11:53:12 -08:00
Kim Santiago
ac494955ac Hide publish sql project to new azure server behind preview setting (#21248)
* hide publish to new Azure server under preview setting

* try adding additional properties instead of replacing everything in configuration

* cleanup and change to adding configuration properties instead of replacing the whole thing

* add more info in comment

* remove extra line
2022-11-17 16:05:46 -08:00
Kim Santiago
17d3489778 Update Microsoft.Build.Sql version to 0.1.7-preview (#21242)
* update the default Microsoft.Build.Sql version used by sql projects

* update Microsoft.Build.Sql SDK version

* update baselines and template to also use 0.1.7-preview
2022-11-17 14:09:03 -08:00
Kim Santiago
2a933d43c4 add preview for publish to Azure development container (#21199) 2022-11-10 13:25:54 -08:00
Kim Santiago
bd7d44ad31 Add image tag dropdown for publish to docker in ADS (#21029)
* add image tag dropdown to publish dialog

* cleanup

* add filtering and move default tag to the first in the dropdown

* fix test
2022-10-31 18:02:03 -07:00
Kim Santiago
15b7c814f6 Remove preview from 2022 in sql projects (#20940)
* remove preview from 2022 in sql projects

* update new project baselines

* update system dacpac tests

* fix other 150 system dacpac test checks
2022-10-26 09:11:28 -07:00
Kim Santiago
5106a08ea3 Add include permissions option for create project from db in vscode (#20845)
* add quickpick for include permissions option

* update vscode-mssql.d.ts

* add const

* undo whitespace change
2022-10-17 11:18:42 -07:00
Kim Santiago
00800db506 Add include permissions option to create project from db dialog (#20823)
* add import permissions option to create project from db dialog

* change 'import' to 'include'

* update azdata dependency version

* update STS to 4.3.0.37

* fix test
2022-10-13 11:01:37 -07:00
Charles Gagnon
60c1c8a89f Update ads-extension-telemetry to 1.3.1 (#20724)
* Update ads-extension-telemetry to 1.3.0

* fix
2022-10-04 23:06:53 -07:00
Charles Gagnon
85dc506a3c Add AuthenticationType enum to typings (#20699)
* Add AuthenticationType enum to typings

* fix

* const

* Add comments

* fix comment

* remove unused
2022-09-30 16:49:36 -07:00
Sakshi Sharma
c6f3996ec7 Set target platform for db projects from server metadata: mssql vscode extension (#20607)
* Set target platform for mssql vscode extension- create project from db feature

* Addressed comments

* Address comment to add EngineEdition information in vscode-mssql.d.ts
2022-09-19 10:50:55 -07:00
Sakshi Sharma
a6920ca601 Set target platform for database project from the server metadata (#20558)
* Set target platform for database project from the server metadata

* Addressed comments
2022-09-09 09:12:12 -07:00
Kim Santiago
7c34c4bdc0 add config option for Microsoft.Build.Sql version used to build legacy sql projects (#20532)
* add config option for Microsoft.Build.Sql version used to build legacy sql projects

* addressing comments
2022-09-01 17:05:26 -07:00
Kim Santiago
8926c4f605 Remove sql project build dependency on STS (#20447)
* download Microsoft.Build.Sql sdk and extract

* cleanup extracted folder and nuget

* add constants

* cleanup

* remove package-lock.json

* making outputChannel required and some cleanup

* only download if the files aren't already there

* Add todo

* add try catches

* addressing comments
2022-08-31 14:04:06 -07:00
Kim Santiago
83043dadcc move checking if a file contains a create table statement to utils (#20512) 2022-08-31 10:21:30 -07:00
Kim Santiago
06a3bf6718 Handle output path and configuration in .sqlproj (#20426)
* Revert "Revert "Fix sql projects not using OutputPath in sqlproj for publishing (#19987)" (#20127)"

This reverts commit dc7522c661.

* read configuration from sqlproj

* Add more tests

* use last OutputPath in sqlproj
2022-08-25 10:25:12 -07:00
Kim Santiago
f6d2af58af Add image tag matching target platform for publish to docker (#20296)
* add the image tag for the sql server version

* add preview text and test

* cleanup
2022-08-11 14:58:09 -07:00
Kim Santiago
c27c5334ba update container eula link (#20279) 2022-08-10 11:59:42 -07:00
Sai Avishkar Sreerama
2b5d2f0a0b Exclude Object Types Coming from DacFx and tests all working as expected (#20015)
* Include Objects Coming from DacFx and tests all working as expected

* Exclude Object types functionality is working as expected and Unit tests

* more refactor updates

* Updated comments and prop name

* Addressing the coments and code updates accordingly

* Updating according to the comments

* STS vbump

* These changes should be deleted with SC changes, not here

* format fixed
2022-08-08 12:04:24 -05:00
Kim Santiago
dc7522c661 Revert "Fix sql projects not using OutputPath in sqlproj for publishing (#19987)" (#20127)
This reverts commit 70f0e7264b.
2022-07-21 08:11:23 -07:00
Kim Santiago
d418d7c01b Add collapse project tree setting (#20064)
* Add sql projects setting to start with all project trees collapsed

* cleanup

* update string

* update string again
2022-07-18 17:04:39 -07:00
Kim Santiago
70f0e7264b Fix sql projects not using OutputPath in sqlproj for publishing (#19987)
* fix sql projects not using output path in sqlproj for publish

* add tests

* Addressing comments
2022-07-13 16:58:37 -07:00
Kim Santiago
5d30c5eb88 Add SQL Server 2022 as a target platform option for sql projects (#19990)
* add 160 option for sql db projects

* add comment
2022-07-11 15:25:18 -07:00
Sai Avishkar Sreerama
985f9b03c5 OptionsDialog and buttons CSS styling updates (#19792)
* OptionsDialog and buttons CSS styling updates

* final css changes for sql db options tab

* modified options button into itmes list

* updated tab name

* Added removed line git blame
2022-07-08 09:50:00 -05:00
Sai Avishkar Sreerama
89816c9ff3 OptionsMapTable logic to replace the deployment hardcoded values final (#19789)
* OptionsMapTable logic to replace the deployment hardcoded values final

* Test modifiaction

* OptionsMApTable updates with STS and review commetns

* comments added and option string moved to constants file

* Reverting the options button css related change and will put in other PR

* converted optionsMapTable to custom type and references.

* Options prop changes and model updates

* Reset btn event method name fixed

* removed local booleanOptionDict var and using the existing one

* updated code with removed local vars

* Update to booleanOptionsDictionary name

* merged two variable to one

* Refactoring code and updating variables

* separated lookup and data array and refactor

* missing visibility

* reset logic revised and no other edgecases found

* variable names updated to meaningful

* vbump here to test the checks, sending new vbump PR separately
2022-07-08 09:40:06 -05:00
Sai Avishkar Sreerama
84a15ea91d STS version bump (#19953)
* STS version bump

* fix for vbump check pass
2022-07-08 09:19:59 -05:00
Charles Gagnon
5b95a47ca6 Add launchPublishToDockerContainerQuickpick to extension API (#19834)
* Initial

* remove namespace

* minor fixes
2022-06-27 15:29:43 -07:00
Kim Santiago
ec57115383 Add telemetry for what users have in publish profile (#19805)
* add telemetry for what users have in publish profile

* simplify check

* add falsy checks
2022-06-23 13:43:08 -07:00
Kim Santiago
a3cad2378c Add telemetry for schema compare and sql database projects options dialogs (#19799)
* add more telemetry for schema compare and sql projects options dialogs

* cleanup

* change to sendActionEvent
2022-06-22 13:31:28 -07:00
Kim Santiago
0aadd317fa Fix data workspace vscode telemetry (#19768)
* fix data workspace vscode extension telemetry extension name

* remove unused fullName
2022-06-20 14:11:15 -07:00