Commit Graph

235 Commits

Author SHA1 Message Date
Kim Santiago
faaf667439 Add DW master.dacpac (#15559)
* add DW master.dacpac

* add missing awaits in tests

* use ternary

* only show master in system db dropdown for dw
2021-05-27 10:03:33 -07:00
Kim Santiago
25352fa39c Fixing a couple database reference dialog bugs (#15523)
* fixing a couple database reference dialog bugs

* update comment
2021-05-25 11:37:13 -07:00
Kim Santiago
6b189be781 update comments and name for clarity (#15504) 2021-05-19 11:03:53 -07:00
Kim Santiago
e0d8b67fe4 bump schema compare and sql db proj versions (#15496) 2021-05-17 13:25:47 -07:00
Benjin Dubishar
7e8dccec82 Add setting to hide netcore installation prompt (#15470)
* Add setting to hide netcore installation prompt

* Shortened strings to fit toast

* Updating data workspace string for consistency
2021-05-17 09:59:08 -07:00
Kim Santiago
99fd1fbb5e fix typo in .net core message (#15410) 2021-05-11 13:27:19 -07:00
Alexander Ivanov
676296fbbb Allow to ignore duplicate entires when adding files to SQL project. (#15332)
This change introduces new boolean flag for `addToProject`, `addScriptItem` and `addFolderItem` APIs that allows to skip files/folders if they are already included in the project file. Original behavior was to throw an error if duplicate entry is encountered, so I kept that as a default (new flag is not set).

I started by fixing the original behavior, as it was not always working as expected. In our extension that relies on `addToProject` API we've hit an issue where duplicate items were added and no errors were thrown. There was a test for this scenario, but unfortunately the test had few bugs in it as well, so I addressed that first. First issue with the test code was missing `await` on the `testUtils.shouldThrowSpecificError` calls, so test was not actually testing anything. After adding missing keywords, I hit an issue where exception was not thrown, but this turned out to be different issue, compared to what we were hitting. In the test code, it was using the very first folder from the generate list of test entires. This folder wass actually the root of the project (where sqlproj file is located), and `addToProject` API had a special case to ignore the root. This means neither first call nor second call was actually adding anything to the project and no errors were produced. I fixed this problem by using next available folder in the generated files list.

After addressing the test code I could not reproduce the issue that we were seeing with duplicate entires being added, everything was working as expected and errors were thrown. I started adding more tests that better resemble our production scenario - add files in subfolders, add files to existing project, rather than a new one. Finally I was able to reproduce the problem in tests when adding a file in a subfolder to an existing project. After investigation this turned out to be an issue with mismatch in how `relativePath` is maintained within the `FileProjectEntry`. When loading an existing project, `relativePath` is populated based on the value of the `Include` attribute of the `Build` item. This attribute is normalized to Windows-style path, using `\`, so for nested file you will have `folder\file.sql`. When adding new item to the project, one could pass either Windows or Unix-style path (`folder/file.sql`), so the path comparison between loaded Windows-style path and newly added Unix-style path was failing, resulting in them being treated as different items. In fact, `addToProject` API that we were using was relying on `Uri` helpers to extract relative path, thus the path was forced to be Unix-style and path was never the same as the loaded one. After this discovery I added a dedicated test to validate the round-trip of the `relativePath` for serialized and desirialized project file.

In order to address this problem, I updated the factory method `createFileProjectEntry` to always run `utils.convertSlashesForSqlProj` on the relative path to ensure we have Windows-style path stored in there. I also optimized the helper code slightly to not do split/join, if there are no split points in the input string, which should eliminate unnecessary array instantiation. It is worth mentioning that I had to normalize the input relative paths in the `addScriptItem` and `addFolderItem` APIs, because there is no guarantee that they will be Windows-style when we try to compare them to `relativePath` of the existing project items.

Finally I was able to add a simply flag and update the condition to return existing record, if duplicates were allowed. I also updated typings file for the extension and added tests to cover this scenario.
2021-05-10 13:59:24 -07:00
Sakshi Sharma
3b3df2c3fc Fixes for sql db projects dashboard (#15100)
* Fix ID assignment for sql db projects dashboard

* Update with new fixes

* Fix tests

* Fix test
2021-05-05 19:00:22 -07:00
Sakshi Sharma
8c08c79d67 Remove horizontal scrollbar (#15338) 2021-05-05 17:13:40 -07:00
Kim Santiago
e2537922b0 bump sql database projects version to 0.9.1 (#15314) 2021-05-03 16:22:11 -07:00
Kim Santiago
020bc738cc fix DW project build (#15287) 2021-04-29 14:48:01 -07:00
Kim Santiago
cbe128dd6c bump version for schema compare and sql database projects (#15285) 2021-04-29 11:32:13 -07:00
Kim Santiago
da37cf6ec6 Expose sql project apis (#15239)
* make project variables private and add getters

* expose project in sqlproj.d.ts

* add more comments

* change to ISqlProject
2021-04-27 17:35:27 -07:00
Karl Burtram
867a963882 Merge from vscode bead496a613e475819f89f08e9e882b841bc1fe8 (#14883)
* Merge from vscode bead496a613e475819f89f08e9e882b841bc1fe8

* Bump distro

* Upgrade GCC to 4.9 due to yarn install errors

* Update build image

* Fix bootstrap base url

* Bump distro

* Fix build errors

* Update source map file

* Disable checkbox for blocking migration issues (#15131)

* disable checkbox for blocking issues

* wip

* disable checkbox fixes

* fix strings

* Remove duplicate tsec command

* Default to off for tab color if settings not present

* re-skip failing tests

* Fix mocha error

* Bump sqlite version & fix notebooks search view

* Turn off esbuild warnings

* Update esbuild log level

* Fix overflowactionbar tests

* Fix ts-ignore in dropdown tests

* cleanup/fixes

* Fix hygiene

* Bundle in entire zone.js module

* Remove extra constructor param

* bump distro for web compile break

* bump distro for web compile break v2

* Undo log level change

* New distro

* Fix integration test scripts

* remove the "no yarn.lock changes" workflow

* fix scripts v2

* Update unit test scripts

* Ensure ads-kerberos2 updates in .vscodeignore

* Try fix unit tests

* Upload crash reports

* remove nogpu

* always upload crashes

* Use bash script

* Consolidate data/ext dir names

* Create in tmp directory

Co-authored-by: chlafreniere <hichise@gmail.com>
Co-authored-by: Christopher Suh <chsuh@microsoft.com>
Co-authored-by: chgagnon <chgagnon@microsoft.com>
2021-04-27 14:01:59 -07:00
Kim Santiago
b7ea1c1bf3 Don't allow duplicate file/folder entries to be added to sql projects (#15104)
* don't allow adding the same file or folder to the sqlproj if it has already been added

* add a couple more checks in test

* toLowerCase when comparing
2021-04-13 16:08:43 -07:00
Sakshi Sharma
c58b7d35d7 Fix deploy data to be presented on dashboard (#15073)
* Fix deploy data to be presented on dashboard

* Bump sql-db-project extensions version

* Address comment
2021-04-09 12:22:31 -07:00
Udeesha Gautam
c20e620c34 Fix for Bug #15020 dashboard update with multiproject (#15029)
* Fix to enable two projects showing only their data even if opening together

* Fixing a typo

* Taking in PR comments
2021-04-07 16:44:25 -07:00
Sakshi Sharma
addef2d584 Add message when no history exists on projects dashboard (#15002)
* Add message when no history exists on projects dashboard

* Bump version for sql db projects

* Update text, add refresh button

* Remove commented code
2021-04-07 00:42:11 -07:00
Sakshi Sharma
30a2b76faf Add background image to sql db projects dashboard (#14942)
* Add background image to sql db projects dashboard

* Removed gradient color

* Added bottom border for header

* Fixed border color
2021-04-01 17:24:16 -07:00
Sakshi Sharma
b774f09b6c Sql DB project dashboard (#14899)
* First set of changes for workspace dashboard implementing the toolbar

* Workspace dashboard container implementation (#14813)

* First set of changes for workspace dashboard implementing the toolbar (#14160)

* First set of changes for workspace dashboard implementing the toolbar

* Addressed comments

* Addressed one remaining comment

* Removed an extra comma in interfaces file

* Addressed comments

* Addressed comments

* Refactored a bit of code

* Remove unnecessary await

* Addressed comments

* First set of changes for workspace dashboard container

* Update targetPlatform icon+add Time column to deploy table

* Addressed comments

* Removed redundant class definition

* Addressed comments

* Addressed comments

* Change enum to union type in dataworkspace typings

* Fix tests

* Addressed comments
2021-03-30 17:37:53 -07:00
Kim Santiago
f4e1f85e0f Add dacpac references to sqlproj with relative path (#14877)
* relative paths written to sqlproj, but can't delete yet

* only keep track of relative path

* remove leading slash

* add test

* use path.relative

* Add error message if dacpac reference is located on a different drive
2021-03-30 17:06:04 -07:00
Sakshi Sharma
bdbe4fb6de Fix telemetry for Sql db projects (#14896) 2021-03-29 12:20:56 -07:00
Kim Santiago
d658af153d fix publish profile with connection string ending in semicolon not loading (#14797) 2021-03-19 13:17:51 -07:00
Kim Santiago
adc0f3e96d fix build errors in projectController.test.ts (#14798) 2021-03-18 18:31:53 -07:00
Kim Santiago
8068de5938 fix project tree tests failing on windows (#14759)
* fix project tree tests failing on windows

* add back test

* Addressing comments

* change to doc comment

* remove unnecessary change

* undo other change
2021-03-18 17:14:00 -07:00
Zi Chen
03d2ac7206 Recursively delete folders in database projects (#14740)
* Recursively rmdir

* Remove comment

* Add test

* Add test assertions

* Comment

* Recursively rmdir

* Revert "Comment"

This reverts commit 287e7f824adfb2fcedb18ee222b34b8c6a5305b5.

* Re-commit Simplify Test
2021-03-18 09:20:41 -07:00
Kim Santiago
f4d305ec16 vBump dacpac and sql database projects (#14768) 2021-03-17 11:14:48 -07:00
Kim Santiago
a4fae7c1d8 fix database name edit box not announcing required (#14753) 2021-03-16 16:04:56 -07:00
Drew Skwiers-Koballa
9beb7804e6 sqlproj - keep new object input box open when user navigates UI 2021-03-15 13:00:01 -07:00
Charles Gagnon
4e1c7decde Add mocha dependencies (#14562) 2021-03-04 16:30:39 -08:00
Charles Gagnon
9c886dd80a Remove unneeded validation error messages (#14531) 2021-03-04 09:50:57 -08:00
Kim Santiago
42fba14d88 Fix how data workspace handles untitled workspaces (#14505)
* add more workspace apis

* update dialog and check workspace scheme

* cleanup

* add comment

* update create project from db dialog

* cleanup

* update names

* add test
2021-03-03 15:31:21 -08:00
Kim Santiago
cea55560e8 fix a couple things in create project from db dialog (#14511) 2021-03-03 10:33:52 -08:00
Kim Santiago
4053666bef bump sql database projects version and dependency (#14442) 2021-02-25 13:33:26 -08:00
Kim Santiago
c05cece683 Expose adding files and folders in sql database projects (#14391)
* expose addToProject in dataworkspace.d.ts

* remove changes in data workspace extension

* add sqldbproj.d.ts

* change list to be Uris instead of strings

* don't add files/folders if any don't exist

* fix test on windows
2021-02-23 18:15:38 -08:00
Kim Santiago
551eb76a42 filter data-workspace projects by ext (#14354)
* add filtering by project extension

* Fix tests

* addressing comments

* convert to lowercase
2021-02-22 13:21:25 -08:00
Kim Santiago
9087a9fbb1 Show git status in projects tree (#14182)
* show git status in project tree

* fix for windows

* fix tests
2021-02-22 11:33:42 -08:00
Kim Santiago
272c20bb38 bump versions for data developer extensions (#14327) 2021-02-17 15:38:06 -08:00
Kim Santiago
5e168b0960 fix system db references going away when project target platform is changed (#14255)
* fix system db references going away when target platform is changed

* bump version
2021-02-11 14:00:07 -08:00
Karl Burtram
ce612a3d96 Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79 (#14050)
* Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79

* Fix breaks

* Extension management fixes

* Fix breaks in windows bundling

* Fix/skip failing tests

* Update distro

* Add clear to nuget.config

* Add hygiene task

* Bump distro

* Fix hygiene issue

* Add build to hygiene exclusion

* Update distro

* Update hygiene

* Hygiene exclusions

* Update tsconfig

* Bump distro for server breaks

* Update build config

* Update darwin path

* Add done calls to notebook tests

* Skip failing tests

* Disable smoke tests
2021-02-09 16:15:05 -08:00
Charles Gagnon
6f192f9af5 Fix ModelView addItem/withItem ordering (#14205) 2021-02-09 08:37:30 -08:00
Charles Gagnon
ac5ff2ec7f Remove error message properties from events (#14175) 2021-02-05 12:28:07 -08:00
Charles Gagnon
c027ce4f00 Update ads-extensions-telemetry package (#14162) 2021-02-04 14:57:54 -08:00
Kim Santiago
bcc73dfbcf fix intermittent sql project test failure (#14148) 2021-02-03 13:26:06 -08:00
Kim Santiago
41915bda8d update db dropdown in create project from database dialog to not be editable (#14142) 2021-02-02 17:31:09 -08:00
Benjin Dubishar
1c0259f4c5 Telemetry points for SQL Database Projects extension (#14088)
* Added publish and schema compare telemetry
* Adding telemetry points for add/exclude/delete
* telemetry for validation
* Adding telemetry from project roundtrip updates, editing sqlproj, and db refs
* Changed method for obtaining extension ID during registration
* Fixing test failures, updating ads telemetry package dependency
* replacing action strings with enums
* change database project string actions to enums
* Changed action name to better match dialog
* PR feedback
2021-01-31 16:38:48 -08:00
Charles Gagnon
72b8d96dbc Bump ads-extension-telemetry (#14115)
* Bump ads-extension-telemetry

* Fix import
2021-01-29 14:11:44 -08:00
Kim Santiago
f9ea6430ee fix projects view title commands (#14086) 2021-01-28 10:15:02 -08:00
Charles Gagnon
82b363fe90 Update ads-extension-telemetry package to official Microsoft org version (#14032)
* Update ads-extension-telemetry package to official Microsoft org version

* Update names
2021-01-22 16:40:59 -08:00
Benjin Dubishar
c903cd87bf Telemetry for Data Workspaces extension (#13846)
* Add CodeQL Analysis workflow (#10195)

* Add CodeQL Analysis workflow

* Fix path

* test commit pls ignore

* telemetry points

* yarn lock changes

* making test xplat friendly

* PR feedback

* Adding additional telemetry points

Co-authored-by: Justin Hutchings <jhutchings1@users.noreply.github.com>
2021-01-22 14:18:43 -08:00