Commit Graph

4244 Commits

Author SHA1 Message Date
Andrew Eisenberg
02f14821c8 Merge pull request #2332 from jrozner/http-database
Allow HTTP connections to fetch database
2023-04-17 17:16:16 -07:00
Andrew Eisenberg
d20600320f Fix invalid variable reference 2023-04-17 15:47:06 -07:00
Andrew Eisenberg
26459ded79 Update changelog 2023-04-17 15:43:07 -07:00
Andrew Eisenberg
8336df9483 Update extensions/ql-vscode/package.json
Fix typo
2023-04-17 15:39:54 -07:00
Joe Rozner
961f71d8a5 Changes requested from PR 2023-04-17 12:40:38 -07:00
Joe Rozner
99eb274029 Allow HTTP connections to fetch database
Introduce a new config option to allow requests over HTTP when fetching
a database from a URL.
2023-04-17 12:40:38 -07:00
Dave Bartolomeo
70b4aacf35 Merge pull request #2306 from github/dbartol/new-test-ui
Use native VS Code test UI on canary
2023-04-17 13:49:35 -04:00
Andrew Eisenberg
cc241d08b7 Merge pull request #2331 from github/aeisenberg/fix-flakes
Fix various test flakiness
2023-04-17 09:01:47 -07:00
Anders Starcke Henriksen
0ee090b6e1 Merge pull request #2335 from github/starcke/rename-sup-modelled
Rename supported to modelled.
2023-04-17 15:39:10 +02:00
Anders Starcke Henriksen
fb4f39dcfb Modelled -> Modeled. 2023-04-17 15:00:41 +02:00
Koen Vlaswinkel
3c0b3e467e Merge pull request #2333 from github/koesie10/data-extension-editor-csharp
Add better support for different languages in data extension editor
2023-04-17 14:55:15 +02:00
Koen Vlaswinkel
97e9129023 Merge pull request #2334 from github/koesie10/data-extension-editor-language-check
Add database language check to data extensions editor
2023-04-17 14:55:02 +02:00
Anders Starcke Henriksen
7ce0e0a75a Rename supported to modelled. 2023-04-17 14:48:04 +02:00
Koen Vlaswinkel
79c39a0826 Add database language check to data extensions editor
This will not allow the user to open the data extensions editor for a
database if it is not one of the supported languages. The supported
languages is a list of `string` rather than a list of `QueryLanguage`
because a database item's language is also a `string`.
2023-04-17 14:38:15 +02:00
Koen Vlaswinkel
923e13fce3 Add better support for different languages in data extension editor
There were still some places where we were hardcoding Java in the data
extension editor. This changes these places to use the database item
language instead.
2023-04-17 14:25:57 +02:00
Anders Starcke Henriksen
1367d386db Merge pull request #2329 from github/starcke/ext-csharp-query
Add support for running C# query.
2023-04-17 10:21:01 +02:00
Anders Starcke Henriksen
1e42c1152f Update query ID. 2023-04-17 10:06:00 +02:00
Anders Starcke Henriksen
a7f87658bb Update extensions/ql-vscode/test/vscode-tests/no-workspace/data-extensions-editor/external-api-usage-query.test.ts
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2023-04-17 09:28:42 +02:00
Dave Bartolomeo
a52391b264 Merge branch 'dbartol/new-test-ui' of https://github.com/github/vscode-codeql into dbartol/new-test-ui 2023-04-14 18:47:44 -04:00
Elena Tanasoiu
9b647ff432 Merge pull request #2310 from github/yer-a-workspace-query
Stop pushing QL pack as top level folder to avoid confusing the user
2023-04-14 21:24:43 +01:00
Dave Bartolomeo
8c2c25e85f Fix PR feedback 2023-04-14 15:24:08 -04:00
Andrew Eisenberg
9a40decc09 Remove timeout in test
A global timeout has already been set.
2023-04-14 11:31:28 -07:00
Andrew Eisenberg
35e8ce1654 Fix various test flakiness
This commit addresses various test flakiness:

1. Bump timeouts for queries tests
2. Add a dispose handler to queryserver-client. This will help us during
   tests because if there is a test that timesout while a query is
   running, the query's progress callback won't be invoked. We will
   still get a timeout error in the first test, but the second test will
   not get a spurious error.
3. Handle a disposed query server in `deregisterDatabase`. This method
   will remove the database from the currently running query server.
   If there is no query server, then there is nothing to remove. So,
   this error is safe to ignore.
4. Explicitly `end()` a connection `ServerProcess`. I'm not 100% sure if
   this is necessary, but it seems like it prevents responses from being
   handled and erroring out.
5. Better handling of ideServer restarts. Previously, if you quickly
   called `CodeQL: Restart Query Server` twice in a row, you would get
   an error from the ideServer restart. Restart fails if the server is
   not already started. So, in this case just call a start.
2023-04-14 10:50:27 -07:00
Elena Tanasoiu
9c79799558 Merge branch 'main' into yer-a-workspace-query 2023-04-14 14:00:28 +01:00
Anders Starcke Henriksen
90936780bd Add support for running C# query. 2023-04-14 14:47:20 +02:00
Koen Vlaswinkel
ffa643c91b Merge pull request #2326 from github/koesie10/raise-cli-integration-timeout
Set default higher timeout on CLI integration tests
2023-04-14 14:38:21 +02:00
Elena Tanasoiu
70d533f073 Make check platform agnostic
The separator character is different on Windows.
2023-04-14 12:31:25 +00:00
Elena Tanasoiu
bfc5f49d44 Check specifically for the starter workspace
We've made an exception to fetch the parent folder when we're
in the vscode-codeql-starter workspace.

We'd like to make this more specific so that it doesn't interfere
with other repos.
2023-04-14 11:01:18 +00:00
Koen Vlaswinkel
d4b6259961 Merge pull request #2302 from github/koesie10/kind-dropdown
Change kind input to a dropdown
2023-04-14 12:22:39 +02:00
Elena Tanasoiu
4a8ba1377d Don't offer to create skeleton pack again
When running Create Query in the codespaces-codeql repo, it successfully
creates codeql-custom-queries-xxx as a subfolder of the first workspace
folder, and then adds a database.  After the database gets added, we get
prompted with this message:

```
We've noticed you don't have a CodeQL pack available to analyze this
database. Can we set up a query pack for you?
```

which would try to create another QL pack.

Since we're no longer pushing QL packs as top level folders in the
workspace when we use the new "Create Query" flow, we also need to adapt
the original flow to take into account subfolders.

Just as a reminder, the original flow is:
- Be in the codespace template
- Download a database from GitHub
- The extension will offer to create a QL pack for the database

The new flow:
- Run the "Create Query" command
- Choose a language
- Create a QL pack
- Download a database for it

In the new flow the last step of downloading a database would trigger
the extension to offer to create a QL pack.

Let's fix this by detecting subfolders as well and exiting early.
2023-04-14 09:55:18 +00:00
Koen Vlaswinkel
0ad3ffaba3 Merge pull request #2319 from github/dependabot/npm_and_yarn/extensions/ql-vscode/glob-10.0.0
Bump glob from 9.3.2 to 10.0.0 in /extensions/ql-vscode
2023-04-14 11:51:18 +02:00
Koen Vlaswinkel
02424984bb Merge remote-tracking branch 'origin/main' into koesie10/kind-dropdown 2023-04-14 11:17:59 +02:00
Koen Vlaswinkel
47d7533ad5 Merge pull request #2300 from github/koesie10/create-extension-pack
Add creating extension packs when opening the editor
2023-04-14 11:17:35 +02:00
Koen Vlaswinkel
5a3630a954 Merge pull request #2296 from github/koesie10/create-extension-model-file
Allow creating new model file in existing data extension
2023-04-14 11:09:20 +02:00
Charis Kyriakou
05d68d0bbe Move local query mappers to separate files (#2322) 2023-04-14 09:59:34 +01:00
Koen Vlaswinkel
370874a02f Merge branch 'main' into koesie10/create-extension-model-file 2023-04-14 10:56:27 +02:00
Koen Vlaswinkel
fd98f3400b Add Tuple type 2023-04-14 10:53:38 +02:00
Koen Vlaswinkel
5766db9285 Set default higher timeout on CLI integration tests
This sets a default timeout of 3 minutes on CLI integration tests. This
is because these tests call into the CLI and execute queries, so these
are expected to take a lot longer than the default 5 seconds. This
allows us to remove all the individual `jest.setTimeout` calls with
different values from the test files.
2023-04-14 10:46:33 +02:00
Koen Vlaswinkel
69c66f3b53 Merge pull request #2325 from github/koesie10/raise-queries-timeout
Raise timeout of queries tests
2023-04-14 10:44:52 +02:00
Koen Vlaswinkel
1419ff2a9a Raise timeout of queries tests 2023-04-14 10:28:59 +02:00
Koen Vlaswinkel
e95e4a366f Merge pull request #2314 from github/koesie10/use-query-in-extension
Add external APIs query in extension
2023-04-14 10:27:01 +02:00
Charis Kyriakou
013701d262 Merge pull request #2315 from github/charisk/variant-analysis-store-mappers
Introduce mapping layer for variant analysis history items
2023-04-14 09:26:30 +01:00
Koen Vlaswinkel
9261519636 Merge remote-tracking branch 'origin/main' into koesie10/create-extension-model-file 2023-04-14 09:29:39 +02:00
Koen Vlaswinkel
ff405a66c9 Merge remote-tracking branch 'origin/main' into koesie10/use-query-in-extension 2023-04-14 09:26:30 +02:00
Charis Kyriakou
a15eef823d Update test data to match actual data format 2023-04-14 07:23:04 +00:00
Charis Kyriakou
2a9911dac2 Minor function rename to match convention 2023-04-14 07:22:27 +00:00
Dave Bartolomeo
8f5f43f29c Merge branch 'main' into dbartol/new-test-ui 2023-04-13 18:27:04 -04:00
Dave Bartolomeo
d861772eb1 Merge pull request #2323 from github/dbartol/update-vscode-types
Update `@types/vscode` and fix naming conflicts
2023-04-13 18:25:48 -04:00
Dave Bartolomeo
da3f482a97 Reconsider the fanciness of CodeQL tests 2023-04-13 18:03:07 -04:00
Dave Bartolomeo
c9507dff5f Merge branch 'dbartol/update-vscode-types' into dbartol/new-test-ui 2023-04-13 21:46:53 +00:00