* Add container scripts for VSO builds
* Remove relative path from kubectl.exe
* Use a variable and iex for kubectl path
* Use envvar for working dir path
* Try agent directory
* Update kubeconfig path
* Write connection settings json in build script
* Output logging
* remove _work prefix
* End end point instead of service name
* Disable failing tests
* Change service name prefix so it's different than SSMS containers
* Fix a few issues with profiler method handlers
* Filter out profiler polling events
* Add a unit test for profiler events
* Add method comment headers
* Moving logic for adding default values to new rows
* Fixing implementation of script generation to handle default values all around
* Unit tests!
* WIP
* Reworking row create script/command generation to work more cleanly and work on triggered tables
* Addressing some bugs with the create row implementation
* Implementing the trigger table fix for row updates
Some small improvements to the create/update tests.
* Refactoring sql script formatting helpers into To and From helpers
* Updates to make error messages for formatting errors more useful
* Fixing dumb breaks in unit tests
* Addressing comments from PR
* Updates to the SR files...
* WIP
* All the new RowCreate tests are working
* Fixing a couple bugs with the row delete and row update tests
* Regenerating localization files
* Fixing multiple iteration in tests
* Support `GO N` syntax to execute multiple times
- Plumbed through the batch execution count from the parser and used in the batch execution code path
- Functionality matches SSMS:
- Outputs loop start/end messages that match SSMS if you're doing multi-batch execution
- Outputs an "ignoring failure" error if an error happens during a batch
- Added tests for this
- Manually verified end to end also
* Fixing test error
- Fixes https://github.com/Microsoft/sqlopsstudio/issues/97.
- This should fix the bulk of the issues reported by users since it's the 1st use of this connection in the query code path.
- Implemented the fix in the connection service. This will always open a connection when calling `GetOrOpenConnection`. I cannot see a reason why the connection returned from this should ever be closed.
- resolve issues in both this code path and the edit data code path since both use this method.
* Moving logic for adding default values to new rows
* Fixing implementation of script generation to handle default values all around
* Unit tests!
* Addressing PR comments
* add logic to close connections if changing fails
* added logic to close connections and reopen that fail to change (azure)
* expose connection map in connection info, change while to foreach
* removed unneeded code
* reworked logic to not depend on thrown errors
* added tests
* Fix to make sql exceptions surface properly to user (with important notes!)
* Adding support for detecting column size issues when updating a cell
* Adding unit tests for the exception on read scenario
* Avoid crashing if azure edition is System.
* Add new Azure-specific options to the prototype and return through the service calls
* Send azure properties over database info request
* IsCloud should include Azure SQL DW
- Fixed references to this feature flag
- Updated edition handling to include ManagedInstance and removed AzureV1 check since it's never used and it's been retired.
* Replacing Dictionary with ConcurrentDictionary since values are accessed in async contexts
* Adding new method to allow async tasks to be executed in the exception continuation
* Adding unit tests for the aforementioned
* Adding exception handling to async tasks in file browser service
* Updating query execution async handling to use the async version
* Removing unnecesary send result from continuewithonfaulted
* Fix https://github.com/Microsoft/vscode-mssql/issues/986 and add better server edition naming
- Fixed a number of issues related to the binding queue, specifically the fact that it didn't capture exceptions that occurred on the binding thread. This caused the thread to crash the service.
- The root cause of the error was when you get a connection error during init of the SmoMetadataProvider which threw an exception. Because of this no Binder was created, and the code would null ref later during processing
- Added logic to handle null ref issue and other related code
- Added a unit test for the new error handling path, and supported still returning some value in this case
- Separately, have a fix for an issue where the edition is shown as "SQL Azure" for all Azure connections. Fixing to be "Azure SQL DB" for this case and handle when the database reports as DW or Stretch instead. This maps better to users concept of what the edition should be and avoids returning what is an outdated term.
* Messed up the test - fixing this by returning the expected return object
* WIP
* This code makes it work!
* Adding similar exception hanling behavior to saving result sets
* Adding unit tests for new extension methods
Auto-cleanup of proj file whitespace
* Implementing changes as per code review comments
- Add special handling for token expired errors so they send with a clear flag that'll allow clients to take action on this case
- Send error message instead of callstack for all messages, and ensure all resource manager paths send back inner exceptions so users can understand the true root cause.
* Test firewall rule handling is able to process through the service layer
* Additional tests for authentication and the resource wrapper code
* Positive test case for CreateFirewallRule
* Fixed copyright and usings
Implementation of the resource provider APIs in order to support Create Firewall Rule. Provides definition for a ResourceProvider and Authentication service. The ResourceProvider supports firewall rules for now, and since authentication is routed through that method it will call into the auth service to set up the current account to be used.
Additional notes:
- Fixed deserialization by adding an Accept header. This shouldn't be necessary, but for some reason the firewall rule defaults to XML without this
- Use generic server list and parse the ID to get the resource group, avoiding a large number of extra calls for each RG
- Errors now include error message from the API
* scripting working with race conditions
* new service works with no race conditions
* use new scripting service and commented out tests
* refactored peek definition to use mssql-scripter
* fixed peek definition tests
* removed auto gen comment
* fixed peek definition highlighting bug
* made scripting async and fixed event handlers
* fixed tests (without cancel and plan notifs)
* removed dead code
* added nuget package
* CR comments + select script service implementation
* minor fixes and added test
* CR comments and script select
* added unit tests
* code review comments and cleanup
* fixed failing scripting tests
* fixed failing scripting tests
* fixed select script test
* code review comments
Porting of the vast majority of Azure-related code from SSDT. This is very large, so I want to put this out as one large "lift and shift" PR before I do the tools-service specific JSON-RPC service handlers, connect a new account handler (as the code to get necessary info from accounts and subscriptions isn't fully complete) and add tests over these
**What's in this PR**:
- Created 3 new projects:
- Microsoft.SqlTools.ResourceProvider will host the executable that accepts requests for Azure-related actions over the JSON-RPC protocol. This must be separate from other DLLs since a direct dependency on the Azure SDK DLLs fails (they're NetStandard 1.4 and you can't reference them if you have RuntimeIdentifiers in your .csproj file)
- Microsoft.SqlTools.ResourceProvider.Core is where all the main business logic is, including definitions and logic on how to navigate over resources and create firewall rules, etc.
- Microsoft.SqlTools.ResourceProvider.DefaultImpl is the actual Azure implementation of the resource provider APIs. The reason for separating this is to support eventual integration back into other tools (since their Azure and Identity services will be different).
- Implemented the AzureResourceManager that connects to Azure via ARM APIs and handles creating firewall rule and querying databases. The dependent DLLs have had major breaking changes, so will need additional verification to ensure this works as expected
- Ported the unit tests for all code that was not a viewmodel. Viewmodel test code will be ported in a future update as we plumb through a service-equivalent to these. Also, the DependencyManager code which has overlap with our service provider code is commented out. Will work to uncomment in a future update as it has value to test some scenarios
**What's not in this PR**:
- Identity Services. We currently just have a stub for the interface, and even that will likely change a little
- anything JSON-RPC or registered service related. These will be adapted from the viewmodels and added in a separate PR
* scripting working with race conditions
* new service works with no race conditions
* use new scripting service and commented out tests
* refactored peek definition to use mssql-scripter
* fixed peek definition tests
* removed auto gen comment
* fixed peek definition highlighting bug
* made scripting async and fixed event handlers
* fixed tests (without cancel and plan notifs)
* removed dead code
* added nuget package
* CR comments + select script service implementation
* minor fixes and added test
* CR comments and script select
* added unit tests
* code review comments and cleanup
* fixed failing scripting tests