Commit Graph

285 Commits

Author SHA1 Message Date
Kim Santiago
a47276f708 Load settings from local.settings.json for add sql bindings quickpick (#16957)
* load settings from local.settings.json for add sql bindings quickpick

* cleanup

* addressing comments
2021-09-02 17:25:13 -07:00
Charles Gagnon
c8cc6c08e9 Add no-floating-promises rule to sql-database-projects extension (#16943)
* Add no-floating-promises rule to sql-database-projects extension

* fix test
2021-08-31 14:13:52 -07:00
Charles Gagnon
00da5fdcb3 Add icons for some quickpick items (#16939) 2021-08-30 15:32:20 -07:00
Kim Santiago
2c75f199e8 Add sql bindings package reference to project (#16912)
* list packages and add packages working

* cleanup and remove list packages

* cleanup

* change to pull in latest package version
2021-08-27 16:58:54 -07:00
Charles Gagnon
e7a719ceb4 Fix extension linting warnings and enable extension linting in pipelines (#16922)
* Fix extension linting errors

* fix test
2021-08-27 15:13:01 -07:00
Charles Gagnon
a95d90ce5c Have create proj from database show default save location as option (#16909)
* Default create proj location to setting

* update icons

* undo
2021-08-26 18:59:05 -07:00
Charles Gagnon
6a0a185cbd Move create new option for publish to top and filter out system dbs (#16908)
* Move create new option for publish to top

* Move New tag to description

* fix
2021-08-26 15:52:08 -07:00
Kim Santiago
b2be609c36 hook up add sql binding (#16838)
* hookup add sql binding

* fix typo

* addressing comments

* Addressing more comments

* add more comments
2021-08-23 13:49:05 -07:00
Kim Santiago
9e16a30ece bump sql database projects version to 0.13.0 (#16834) 2021-08-20 15:30:10 -07:00
Charles Gagnon
6b1cc85c9a Get tools service install location from extensions (#16796)
* Get STS install location from extensions

* Update error
2021-08-17 13:48:22 -07:00
Charles Gagnon
6b5c909f7f Fix connection prompt for publish database quickpick (#16767) 2021-08-14 11:57:41 -07:00
Leila Lali
32a71a2de6 SQL Database Project - Deploy db to docker (#16406)
Added a new command to deploy the project to docker
2021-08-12 13:24:16 -07:00
Sakshi Sharma
4250556023 Fix incorrect .NET error (#16694)
* Fix .NET Install state for error conditions

* Address comment- remove redundant constructor
2021-08-11 11:29:48 -07:00
Benjin Dubishar
d0bcba4cc0 Corrects workspace project tree refresh behavior for adding new projects to the workspace (#16650)
* bugfix and updates

* PR feedback

* Deferred promise for project disk scan

* fix casing

* fixing race condition on extension activation, test failure
2021-08-11 09:11:00 -07:00
Charles Gagnon
c891584fec Update ADS strings for sql-database-projects (#16683)
* Update ADS strings for sql-database-projects

* fix
2021-08-10 22:21:46 -07:00
Sakshi Sharma
e0143e0752 Update pop-up to be an error message instead of informational message (#16660)
* Update pop-up to be an error message

* Update message text

* Address comment

* Address comment
2021-08-10 15:24:09 -07:00
Charles Gagnon
b2ff8162e6 Add DB Reference quickpick dialog (#16601)
* Add DB Reference quickpick dialog

* pr comments & cleanup
2021-08-09 12:46:53 -07:00
Sakshi Sharma
9ee941eb12 Error out for unsupported dotnet versions for sql db projects (#16428)
* Merge conflict resolution

* Throw error for unsupported versions of Dotnet

* Fix for darwin

* Fix for all platforms

* Address comments

* Fix extensionsGaller.json

* Address comments

* Update default installation path for linux

* Fix test

* Revert default installation location change for Linux

* Address comments

* Removed extra try-catch block
2021-08-06 18:41:34 -07:00
Charles Gagnon
b8da94f9ef Add Create Proj from DB to VS Code context menus (#16584)
* Add Create Proj from DB to VS Code context menus

* Fix error

* add comment

* use constant
2021-08-06 08:59:35 -07:00
Kim Santiago
33baaa475d Insert sql binding into Azure function quick pick (#16553)
* initial quick pick

* move constants

* remove commented code for now

* addressing comments

* update name

* update name in other places

* remove azure functions from name and rename file
2021-08-05 12:11:30 -07:00
Charles Gagnon
2b103a79c3 Add Create Project from Database quickpick (#16572)
* Add Create Project from Database quickpick

* fix test

* pr comments

* Add comment
2021-08-05 10:34:49 -07:00
Alexander Ivanov
b35e78a07f Automatically add intermediate folders for SQL project items. (#16332)
* Automatically add intermediate folders for SQL project items.

While using the SQL database projects through the API, I noticed that project may end up in somewhat inconsistent state, where files will be added to the project, but their parent folders will not. This in turn resulted in failure to remove these folders from project - they will show up in the UI tree, but deleting them will cause an error. In order to align with how Visual Studio manages the projects, this change will ensure that all intermediate folders are present in the project, when new files or folders are added.

While this change improves project "correctness" when accessing it through SQL projects extension APIs, there is still a possibility that someone will open an "incorrect" previously created project. This change does not address it and folder removal may still fail.

* Update the code to never throw on duplicate items when adding files and folders to project.

After a conversation with the sqlproj owners, we agreed that there are no scenarios that would prompt us to throw an error, if duplicate item is being added to the project. Ultimately, the goal of such a request would be to have an item in the project file, which is already present, therefore the call becomes a no-op.

This allowed me to simplify the new code that was ensuring all intermediate folders are present in the project when adding files and folders.
2021-08-03 09:49:11 -07:00
Charles Gagnon
83af84774a Sql Proj VS Code fixes (#16506)
* Sql Proj VS Code fixes

* remove comment
2021-08-01 00:24:28 -07:00
Charles Gagnon
2427cbe3c6 Remove unused commands from vs code sql proj (#16507) 2021-07-30 19:23:40 -07:00
Charles Gagnon
a7c1bcaf93 Fix azdata API check when webpacked (#16505) 2021-07-30 16:06:50 -07:00
Charles Gagnon
1b073c6748 Package VS Code extensions (#16465)
* Package VS Code extensions

* fixes

* Add back in path

* remove extra indents

* Remove extra parens

* try fix
2021-07-29 08:33:46 -07:00
Kim Santiago
f01e9e2fc0 add api to open new project dialog with only one project type with filtered target platforms (#16315) 2021-07-27 10:03:44 -07:00
Charles Gagnon
b2c203eaef Hook up sql proj publish (#16444) 2021-07-27 09:32:42 -07:00
Kim Santiago
ce4fa98691 bump sql database projects version to 0.12.0 (#16401) 2021-07-22 15:53:48 -07:00
Charles Gagnon
0509f8f0c3 Separate connect and listdatabases call for publish (#16391)
* Separate connect and listdatabases call for publish

* add return value
2021-07-22 15:36:16 -07:00
Charles Gagnon
c1f4c50177 Combine project deploy settings into one (#16383) 2021-07-21 16:15:25 -07:00
nasc17
b472539646 Switch withProperties to be withProps (#16380)
* Transition to withProps in arc

* Transition to withProps inputbox

* Transition to withProps in checkbox

* Transition to withProps text

* Transition to withProps in declarative table

* Transition to withProps hyperlink

* Transition to withProps in button

* Transition to withProps radiobutton

* Transition to withProps in input

* Transition to withProps button

* Transition to withProps in text

* Transition to withProps image

* Transition to withProps declare table

* Transition to withProps in table

* Transition to withProps radio button

* Transition to withProps in image

* Transition to withProps radio button

* Transition to withProps in commit

* Transition to withProps div cont

* Transition to withProps in comp

* Transition to withProps radio card

* Transition to withProps in comp icon

* Transition to withProps card

* Transition to withProps list
2021-07-21 11:12:47 -07:00
Charles Gagnon
efa82650f8 List databases for publish quickpick (#16368)
* List databases for publish quickpick

* missed word
2021-07-21 08:36:34 -07:00
Charles Gagnon
a322c5be9d List connections for sql proj publish quickpick (#16233)
* List connections for sql proj publish quickpick

* cleanup
2021-07-20 13:30:32 -07:00
Kim Santiago
5059c94adc Add target platform dropdown to new project dialog (#16091)
* add target platform as an option in create project api

* move constant

* WIP

* show versions in dialog and create project with selected version

* validate version

* add error messages

* add test

* change version to target platform

* cleanup

* more cleanup

* use withProps
2021-07-15 13:43:48 -07:00
Charles Gagnon
d03fbbc066 Read publish profile using DacFX (#16110)
* Read publish profile using DacFX in VS Code

* Fixes

* complete promise on hide

* comment
2021-07-15 08:53:43 -07:00
Kim Santiago
b4ab73a636 bump ADS dependency for sql database projects (#16092) 2021-07-13 11:46:02 -07:00
Kim Santiago
affe3a838b Add target platform as an option in create project api (#16035)
* add target platform as an option in create project api

* add test

* move constant
2021-07-12 15:14:33 -07:00
Kim Santiago
c69c303a2b fix duplicate sqlcmd var header when loading publish profile multiple times (#16007)
* fix duplicate sqlcmd var header when loading publish profile multiple times

* remove variable to keep track of count
2021-07-08 14:37:07 -07:00
Charles Gagnon
922348b846 Add basic structure for publish project quickpick (#16008)
* Add basic structure for publish project quickpick

* fixes

* feedback
2021-07-07 22:00:44 -07:00
Alex Ma
30462dfb25 Webpack Extensions update (#15919)
* test for schemacompare

* added schema compare to package.json

* added arc for translation

* added admin-tool-ext-win

* added agent

* added cms to list of extensions webpacked

* removed dacpac

* added import

* added machine-learning

* removed profiler

* added server-report

* added sql-assessment

* added sql-migration

* added sql-database-projects

* added query-history

* fixed and updated dependencies in extensions for webpacking.

* fixed names of entry

* fixed webpack for machine-learning

* removed dependency external for dacpac

* reduced externals for server-report

* added back import

* removed extension.webpack.config.js

* removed useless handlebars function

* added todo message
2021-07-01 09:56:55 -07:00
Sakshi Sharma
e72ba26411 Bump Sql Db Projects extension version (#15688)
* Bump Sql Db Projects extension

* Bump azdata version for Sql Db projects

* Update package.json

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
2021-06-30 11:03:42 -07:00
Charles Gagnon
7ce791d826 Load all data workspace projects directly from workspace (#15921)
* Load all projects directly from workspace

* fixes

* Remove relativity and fix tests

* fix compile

* PR comments

* remove unused

* distro
2021-06-30 10:58:34 -07:00
Charles Gagnon
3a3d7f5271 withProperties -> withProps (#15876)
* withProperties -> withProps

* Fix errors

* remove ,

* fixes

* Update azdata-test

* Fix dacpac tests

* Add required and remove added layout
2021-06-23 14:26:14 -07:00
Charles Gagnon
4707c1601c Handle no azdata API in sql db proj extension gracefully (#15873)
* Update db proj ext to handle not having azdata API available

* Fixes

* Fix compile
2021-06-22 23:34:01 -07:00
Charles Gagnon
3cb2f552a6 Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 (#15681)
* Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898

* Fixes and cleanup

* Distro

* Fix hygiene yarn

* delete no yarn lock changes file

* Fix hygiene

* Fix layer check

* Fix CI

* Skip lib checks

* Remove tests deleted in vs code

* Fix tests

* Distro

* Fix tests and add removed extension point

* Skip failing notebook tests for now

* Disable broken tests and cleanup build folder

* Update yarn.lock and fix smoke tests

* Bump sqlite

* fix contributed actions and file spacing

* Fix user data path

* Update yarn.locks

Co-authored-by: ADS Merger <karlb@microsoft.com>
2021-06-17 08:17:11 -07:00
Charles Gagnon
c9850fe59f Remove en-us from links (#15722) 2021-06-15 11:51:35 -07:00
Sakshi Sharma
bc766698ee Fix create project from database for contained database (#15618) 2021-06-04 11:21:18 -07:00
Kim Santiago
5e62aea5d5 Filter out system dbs from create project from db dialog (#15610)
* filter out system dbs from create project from db dialog

* use includes instead of find
2021-06-02 17:22:28 -07:00
Alexander Ivanov
c6fec97819 Expose default database collation through 'sql-database-projects' extension API (#15538)
* Expose default database collation through 'sql-database-projects' extension API.

For the purpose of schema conversion we would need to know whether target database is configured as CI or CS. This will be used to produce a warning, if we detect a case-sensitive identifier, but database is configured as CI. In order to support this scenario we need to access `<DefaultCollation/>` property of the project.

This change adds new method to the `ISqlProject` interface that allows to read the value of the project property. There already was similar method for the SQL version/platform (`<DSP/>` property) and while working on the change, I took an opportunity to refactor the way project properties are extracted from the XML. Original code was hardcoded in the `getProjectTargetVersion` and I extracted it into separate `evaluateProjectPropertyValue` helper, that can be used in the future by any getter or access method that is supposed to return a value of the single property. This also allows us to improve the way properties are retrieved from the XML. Today the logic is very rudimentary - we read the first matching XML element with the required name. This is not correct as it does not verify the parent to be `<PropertyGroup/>`, neither it evaluates the `Condition` attributes nor property value itself. I did not invest in this, but added a TODO there explaining that the method may not perform as expected.

After the helper method was added, I updated the existing `getProjectTargetVersion` method to leverage it. The only complication here was the error throwing logic, as it was using custom error message. I preserved that, as there were tests verifying it already. For the new accessor method I did not introduce a special error message and rely on generic one I defined for use within the helper method. Additionally, for the collation we return default value of `SQL_Latin1_General_CP1_CI_AS`, if project does not have the property defined. This is what SSDT for Visual Studio shows in the UI when property is missing and I decided to align with that.

Finally, I added tests for both - original `getProjectTargetVersion` and new collation extraction method to make sure they work as expected. While working on the tests, I've noticed complaints that some rejected promises were not awaited. I added missing `await`s.
2021-05-28 12:42:21 -07:00