Commit Graph

4460 Commits

Author SHA1 Message Date
Dave Bartolomeo
aa9ca6e413 Remove unused code 2023-04-14 14:10:56 -04:00
Dave Bartolomeo
ad2c065413 Better error message UI for bad debug configuration 2023-04-14 14:00:46 -04:00
Dave Bartolomeo
55644d5f2a Simplify nested ternaries 2023-04-14 13:51:16 -04: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
Dave Bartolomeo
d1b5ab645c Merge branch 'dbartol/debug-adapter' of https://github.com/github/vscode-codeql into dbartol/debug-adapter 2023-04-14 13:41:19 -04:00
Dave Bartolomeo
ce2fecd506 Don't await showAndLog... 2023-04-14 13:41:03 -04:00
Dave Bartolomeo
03ceb738c0 Update extensions/ql-vscode/src/common/commands.ts
Co-authored-by: Koen Vlaswinkel <koesie10@users.noreply.github.com>
2023-04-14 13:31:26 -04:00
Dave Bartolomeo
6fa775777c Merge branch 'dbartol/debug-adapter' of https://github.com/github/vscode-codeql into dbartol/debug-adapter 2023-04-14 13:29:48 -04:00
Dave Bartolomeo
14a4247ffa Update extensions/ql-vscode/test/vscode-tests/cli-integration/debug-controller.ts
Co-authored-by: Koen Vlaswinkel <koesie10@users.noreply.github.com>
2023-04-14 13:29:23 -04:00
Dave Bartolomeo
95dda2b3dd Update extensions/ql-vscode/src/run-queries-shared.ts
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2023-04-14 12:57:45 -04:00
Dave Bartolomeo
60fd868579 Remove unused code 2023-04-14 12:56:25 -04:00
Dave Bartolomeo
59dcea6fea Add comment about disposal of debug adapter tracker 2023-04-14 12:56:06 -04:00
Dave Bartolomeo
30b9d7eb7f Merge branch 'dbartol/debug-adapter' of https://github.com/github/vscode-codeql into dbartol/debug-adapter 2023-04-14 12:47:39 -04:00
Dave Bartolomeo
d3b118bc5f Update extensions/ql-vscode/src/debugger/debug-configuration.ts
Co-authored-by: Koen Vlaswinkel <koesie10@users.noreply.github.com>
2023-04-14 12:47:11 -04:00
Dave Bartolomeo
6efdd116ee Use preferred cast style 2023-04-14 12:45:51 -04:00
Dave Bartolomeo
22679b8972 Update extensions/ql-vscode/src/local-databases.ts
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
2023-04-14 12:44:26 -04:00
Dave Bartolomeo
2da689598d Rework debug query evaluation code to avoid lots of state-dependent properties 2023-04-14 12:38:49 -04:00
Dave Bartolomeo
a0a3af2759 Remove unused commands 2023-04-14 12:18:12 -04: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
Dave Bartolomeo
3eaa99696a Add iterator function to mock environment variable collection 2023-04-13 17:39:50 -04:00
Dave Bartolomeo
78d3de6c86 Fixup rename in test code 2023-04-13 17:35:10 -04:00
Dave Bartolomeo
8f29e1c812 Add separate command for "Accept Output" on test item context menu 2023-04-13 17:27:23 -04:00
Andrew Eisenberg
3826e35cc5 Merge branch 'main' into aeisenberg/cli-version-telemetry 2023-04-13 14:24:01 -07:00
Dave Bartolomeo
64e867d1c4 Update @types/vscode and fix naming conflicts 2023-04-13 17:09:10 -04:00