* InsightsGenerator project template files * Add insights projects to SLN * Setting up siggen class (#1003) * Setting up siggen class * fixed the learn method * Refactoring code Fixed compile errors * renamed results to result * Basic transformation logic (#1004) * Fix a couple bugs and add a simple test (#1007) * Fix a couple bugs and add a simple test * More tests and bug fix * Nara/workflow (#1006) * added a queue processor * ordered using statements * Armemon/analytics (#1008) * Basic transformation logic * changed some structure of siggen * added sum and average method, as well as select rows by input name * add insights to results * min, max added Co-authored-by: Karl Burtram <karlb@microsoft.com> Co-authored-by: Aasim Khan <aasimkhan30@gmail.com> Co-authored-by: Arslan Memon <armemon@microsoft.com> * Added rules engine base implementation (#1005) * Added rules engine base implementation * update comments * addressing comments * adding template text to columnheaders object * adding template text to columnheaders object * fixing columnheaders class * Added test * Added Template Parser unit test in Test project * Deleted unnecessary files and reverted the files that were modified by mistake Co-authored-by: Jinjing Arima <jiarima@microsoft.com> * Insights generator message handler placeholder (#1013) * Aasim/insights/insight methods (#1014) * Basic transformation logic * changed some structure of siggen * Added top and bottom insight functions * Added top, bottom insights Added tests for top, bottom insights * Armemon/insights2 (#1011) * max and min insightsperslice, and tests * got rid of unneccesssary function * get indexes Co-authored-by: Arslan Memon <armemon@microsoft.com> * Armemon/insights2 (#1012) * max and min insightsperslice, and tests * got rid of unneccesssary function * get indexes * learn for stringinputtyype * add learn implentation Co-authored-by: Arslan Memon <armemon@microsoft.com> * Added Tests Removed duplicate methods Co-authored-by: Karl Burtram <karlb@microsoft.com> Co-authored-by: arslan9955 <53170027+arslan9955@users.noreply.github.com> Co-authored-by: Arslan Memon <armemon@microsoft.com> * Armemon/insights2 (#1016) * Basic transformation logic * changed some structure of siggen * Added top and bottom insight functions * Added top, bottom insights Added tests for top, bottom insights * max and min insightsperslice, and tests * got rid of unneccesssary function * get indexes * learn for stringinputtyype * add learn implentation * add unique inputs * fix merge error * add to result Co-authored-by: Karl Burtram <karlb@microsoft.com> Co-authored-by: Aasim Khan <aasimkhan30@gmail.com> Co-authored-by: Arslan Memon <armemon@microsoft.com> * Added all the templates (#1015) * Added all the templates Added a method to find matched template * Added a function to replace # and ## values in a template * Added ReplaceHashesInTemplate call * Added comments * Updated the template txt * Updated GetTopHeadersWithHash function to add #toplist * Updated the logic per offline discussion with Hermineh * Update request handler contract to take array (#1020) * added rulesengine findmatchingtemplate (#1019) * Add support for getting DacFx deploy options from a publish profile (#995) * add support for getting options from a publish profile * update comments * set values for default options if they aren't specified in the publish profile * addressing comments * Updating to latest DacFx for a bug fix (#1010) * added rulesengine findmatchingtemplate * Update DacFx deploy and generate script with options (#998) * update deploy and generate script to accept deployment options * add tests * add test with option set to true * merge * merge * incorporated FindMatchedTemplate Co-authored-by: Kim Santiago <31145923+kisantia@users.noreply.github.com> Co-authored-by: Udeesha Gautam <46980425+udeeshagautam@users.noreply.github.com> * -Added logic for Insights Generator Service Handler (#1017) * -Added logic for Insights Generator Service Handler * Fixed some logic * Adding workflow test * Update transform and add tests (#1024) * Jiarima/fix rules engine logic (#1021) * Added all the templates Added a method to find matched template * Added a function to replace # and ## values in a template * Added ReplaceHashesInTemplate call * Added comments * Updated the template txt * Updated GetTopHeadersWithHash function to add #toplist * Updated the logic per offline discussion with Hermineh * Update with the fixes * Updated template and foreach conditions * Added distinct * Updated tests according to the logic change (#1026) * Nara/remove queing (#1023) * loc update (#914) * loc update * loc updates * Add support for getting DacFx deploy options from a publish profile (#995) * add support for getting options from a publish profile * update comments * set values for default options if they aren't specified in the publish profile * addressing comments * Updating to latest DacFx for a bug fix (#1010) * Update DacFx deploy and generate script with options (#998) * update deploy and generate script to accept deployment options * add tests * add test with option set to true * intermediate check in for merge, transformed not working * intermediate check in for merge, transformed not working * added test case * merged Co-authored-by: khoiph1 <khoiph@microsoft.com> Co-authored-by: Kim Santiago <31145923+kisantia@users.noreply.github.com> Co-authored-by: Udeesha Gautam <46980425+udeeshagautam@users.noreply.github.com> * Output data types from transform (#1029) * Fix bug process input_g (#1030) * Fixed the insight generator service (#1028) * Jiarima/added more testings (#1031) * Added another test Updated ReplaceHashesInTemplate function to return string instead of Template * Added third test * Merged * Reverted the workflow file to match with the one in hack/insights * Bugs fixes to hook insights up to ADS (#1033) * Bug fixes for hack insights (#1032) * Fixed the minColumn index bug in Data Transformation Fixed the template matching logic. * Adding changes from PR * Try to fix Workflow tests * Readd workflow tests * Fix template load location Co-authored-by: Aasim Khan <aasimkhan30@gmail.com> Co-authored-by: Nara <NaraVen@users.noreply.github.com> Co-authored-by: arslan9955 <53170027+arslan9955@users.noreply.github.com> Co-authored-by: Arslan Memon <armemon@microsoft.com> Co-authored-by: gadudhbh <68879970+gadudhbh@users.noreply.github.com> Co-authored-by: Jinjing Arima <jiarima@microsoft.com> Co-authored-by: jiarima <68882862+jiarima@users.noreply.github.com> Co-authored-by: Kim Santiago <31145923+kisantia@users.noreply.github.com> Co-authored-by: Udeesha Gautam <46980425+udeeshagautam@users.noreply.github.com> Co-authored-by: khoiph1 <khoiph@microsoft.com>
Microsoft SQL Tools Service
The SQL Tools Service is an application that provides core functionality for various SQL Server tools. These features include the following:
- Connection management
- Language Service support using VS Code protocol
- Query execution and resultset management
SQL Tools Service API Documentation
Please see the SQL Tools Service API documentation at https://microsoft.github.io/sqltoolssdk/.
Setup, Building and Testing the codebase
Please see the SQL Tools Service wiki documentation at https://github.com/Microsoft/sqltoolsservice/wiki
Contribution Guidelines
We welcome many kinds of community contributions to this project! Whether it's a feature implementation, bug fix, or a good idea, please create an issue so that we can discuss it. It is not necessary to create an issue before sending a pull request but it may speed up the process if we can discuss your idea before you start implementing it.
Because this project exposes a couple different public APIs, we must be very mindful of any potential breaking changes. Some contributions may not be accepted if they risk introducing breaking changes or if they don't match the goals of the project. The core maintainer team has the right of final approval over any contribution to this project. However, we are very happy to hear community feedback on any decision so that we can ensure we are solving the right problems in the right way.
Ways to Contribute
- File a bug or feature request as an issue
- Comment on existing issues to give your feedback on how they should be fixed/implemented
- Contribute a bug fix or feature implementation by submitting a pull request
- Contribute more unit tests for feature areas that lack good coverage
- Review the pull requests that others submit to ensure they follow [established guidelines] (#pull-request-guidelines)
Code Contribution Guidelines
Here's a high level list of guidelines to follow to ensure your code contribution is accepted:
- Follow established guidelines for coding style and design
- Follow established guidelines for commit hygiene
- Write unit tests to validate new features and bug fixes
- Ensure that the 'Release' build and unit tests pass locally
- Ensure that the AppVeyor build passes for your change
- Respond to all review feedback and final commit cleanup
Practice Good Commit Hygiene
First of all, make sure you are practicing good commit hygiene so that your commits provide a good history of the changes you are making. To be more specific:
-
Write good commit messages
Commit messages should be clearly written so that a person can look at the commit log and understand how and why a given change was made. Here is a great model commit message taken from a blog post by Tim Pope:
Capitalized, short (50 chars or less) summary More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together. Write your commit message in the imperative: "Fix bug" and not "Fixed bug" or "Fixes bug." This convention matches up with commit messages generated by commands like git merge and git revert. Further paragraphs come after blank lines. - Bullet points are okay, too - Typically a hyphen or asterisk is used for the bullet, followed by a single space, with blank lines in between, but conventions vary here - Use a hanging indentA change that fixes a known bug with an issue filed should use the proper syntax so that the issue is automatically closed once your change is merged. Here's an example of what such a commit message should look like:
Fix #3: Catch NullReferenceException from DoThing This change adds a try/catch block to catch a NullReferenceException that gets thrown by DoThing [...] -
Squash your commits
If you are introducing a new feature but have implemented it over multiple commits, please squash those commits into a single commit that contains all the changes in one place. This especially applies to any "oops" commits where a file is forgotten or a typo is being fixed. Following this approach makes it a lot easier to pull those changes to other branches or roll back the change if necessary.
-
Keep individual commits for larger changes
You can certainly maintain individual commits for different phases of a big change. For example, if you want to reorganize some files before adding new functionality, have your first commit contain all of the file move changes and then the following commit can have all of the feature additions. We highly recommend this approach so that larger commits don't turn into a jumbled mess.
Add Unit Tests for New Code
If you're adding a new feature to the project, please make sure to include adequate xUnit tests with your change. In this project, we have chosen write out unit tests in a way that uses the actual PowerShell environment rather than extensive interface mocking. This allows us to be sure that our features will work in practice.
We do both component-level and scenario-level testing depending on what code is being tested. We don't expect contributors to test every possible edge case. Testing mainline scenarios and the most common failure scenarios is often good enough.
We are very happy to accept unit test contributions for any feature areas that are more error-prone than others. Also, if you find that a feature fails for you in a specific case, please feel free to file an issue that includes a unit test which reproduces the problem. This will allow us to quickly implement a fix that resolves the problem.
Build 'Release' Before Submitting
Before you send out your pull request, make sure that you have run a Release configuration build of the project and that all new and existing tests are passing. The Release configuration build ensures that all public API interfaces have been documented correctly otherwise it throws an error. We have turned on this check so that our project will always have good generated documentation.
Follow the Pull Request Process
-
Create a new branch from which to submit your Pull Request
Commits directly to
mainare not allowed - instead you will create a new branch and then submit a PR to merge changes from that branch intomain.See About branches for more information about branching and how to create a new branch.
-
Create your pull request
Use the typical process to send a pull request from your fork of the project. In your pull request message, please give a high-level summary of the changes that you have made so that reviewers understand the intent of the changes. You should receive initial comments within a day or two, but please feel free to ping if things are taking longer than expected.
-
The build and unit tests must run green
Run all unit tests and code coverage tests to ensure all tests are passing and code coverage numbers and not negatively impacted by your change.
-
Respond to code review feedback
If the reviewers ask you to make changes, make them as a new commit to your branch and push them so that they are made available for a final review pass. Do not rebase the fixes just yet so that the commit hash changes don't upset GitHub's pull request UI.
-
If necessary, do a final rebase
Once your final changes have been accepted, we may ask you to do a final rebase to have your commits so that they follow our commit guidelines. If specific guidance is given, please follow it when rebasing your commits. Once you do your final push we will merge your changes!