Commit Graph

2592 Commits

Author SHA1 Message Date
Koen Vlaswinkel
4eb8c55045 Merge pull request #1748 from github/koesie10/reduce-nesting-remote-query
Reduce nesting in `runRemoteQuery`
2022-11-11 14:46:05 +01:00
Koen Vlaswinkel
09120a2328 Declare type explicitly instead of inferring it 2022-11-11 14:12:55 +01:00
Koen Vlaswinkel
8b360f3004 Merge pull request #1747 from github/koesie10/remove-dry-run-parameter
Remove `dryRun` parameter from `runRemoteQuery`
2022-11-11 11:38:25 +01:00
Koen Vlaswinkel
9894eda60c Merge pull request #1746 from github/koesie10/remote-queries-tests-tar
Change remote queries to test against submitted data
2022-11-11 11:36:06 +01:00
Shati Patel
1241ce985a Fix date format to 'en-US' (#1741) 2022-11-11 10:35:24 +00:00
Koen Vlaswinkel
a4402cb68b Add tar-stream as dev dependency 2022-11-11 11:24:22 +01:00
Koen Vlaswinkel
21eabc2a93 Merge pull request #1745 from github/koesie10/extract-remote-query-preparation
Extract remote query preparation to separate method
2022-11-11 11:23:07 +01:00
Koen Vlaswinkel
c089135626 Change arrow function to exported function 2022-11-11 11:23:03 +01:00
Koen Vlaswinkel
00905a9be3 Add return type to prepareRemoteQueryRun 2022-11-11 11:07:11 +01:00
Charis Kyriakou
93b6abeeb4 Rename iconPath to icon (#1742) 2022-11-11 10:56:31 +01:00
Koen Vlaswinkel
082fea8587 Reduce nesting in runRemoteQuery
Now that we do not have a dry run mode, we can create and clean up the
temporary directory in the same function. This allows us to remove the
complete try..finally block inside `runRemoteQuery` and move it to a
much more local spot.
2022-11-11 10:45:14 +01:00
Koen Vlaswinkel
cca13fde48 Remove dryRun parameter from runRemoteQuery 2022-11-11 10:43:11 +01:00
Koen Vlaswinkel
2dad33f2ba Change remote queries to test against submitted data
The remote queries tests were testing the data on the filesystem, rather
than the data submitted to the server. This required using a `dryRun`
parameter to prevent deleting the temporary directory, while we can
actually just test against the submitted data.

This will create an in-memory filesystem of the submitted query pack by
un-tar-gz'ing the query pack into memory and using that to test the
existence of certain files.
2022-11-11 10:40:04 +01:00
Koen Vlaswinkel
5905cf8811 Extract remote query preparation to separate method
There is some common logic between remote queries and the variant
analysis flows which deals with parsing the query and asking the user
how to run the query. This extracts that part of the logic to a separate
method such that the only logic left in the actual `runRemoteQuery`
method is related to submitting the query.
2022-11-11 10:38:41 +01:00
Koen Vlaswinkel
616a2693ef Merge pull request #1726 from github/koesie10/new-variant-analysis-statuses
Use new variant analysis statuses
2022-11-11 10:25:10 +01:00
Koen Vlaswinkel
a80ace5334 Add alert message for failed Actions workflow
This also changes the failure reason alert component to remove the logs
button since it's not used by any failure reason. Instead, a link is
added into the message for a failed Actions workflow using which the
Actions workflow run may be opened.
2022-11-10 15:07:58 +01:00
Koen Vlaswinkel
b333a16570 Merge remote-tracking branch 'origin/main' into koesie10/new-variant-analysis-statuses 2022-11-10 14:58:37 +01:00
Koen Vlaswinkel
03e48b7ae0 Merge pull request #1728 from github/koesie10/failed-view
Handle failed status in variant analysis view
2022-11-10 11:22:24 +01:00
Charis Kyriakou
71297e360b Remove unused method argument (#1740) 2022-11-10 08:18:04 +00:00
Charis Kyriakou
47af1f8c05 Add some integration tests for the db panel (#1739) 2022-11-09 15:37:47 +00:00
Koen Vlaswinkel
a2398990bc Merge pull request #1729 from github/koesie10/failed-download-view
Handle failed result download in view
2022-11-09 12:43:51 +01:00
Charis Kyriakou
8183c3108c Surface db config errors (#1730) 2022-11-09 11:37:22 +00:00
Koen Vlaswinkel
5390a11dc7 Merge pull request #1738 from github/koesie10/update-mrva-messages
Update messages for variant analysis warnings
2022-11-09 11:54:05 +01:00
Koen Vlaswinkel
bac39630d6 Update messages for variant analysis warnings
This uses the correct title and message for all warnings currently
supported.
2022-11-09 10:16:18 +01:00
Koen Vlaswinkel
c2baa4557f Merge remote-tracking branch 'origin/main' into koesie10/failed-view 2022-11-09 10:05:14 +01:00
Andrew Eisenberg
96d99a71a7 Merge pull request #1737 from github/version/bump-to-v1.7.6
Bump version to v1.7.6
2022-11-08 20:08:54 -08:00
aeisenberg
632a675b13 Bump version to v1.7.6 2022-11-09 02:04:18 +00:00
Andrew Eisenberg
acc37fb4de Merge pull request #1736 from github/v1.7.5
Some checks failed
Release / Release (push) Has been cancelled
Release / Publish to VS Code Marketplace (push) Has been cancelled
Release / Publish to Open VSX Registry (push) Has been cancelled
v1.7.5
v1.7.5
2022-11-08 18:00:33 -08:00
Andrew Eisenberg
05951b6c74 v1.7.5 2022-11-08 17:24:55 -08:00
Andrew Eisenberg
473569df5b Merge pull request #1735 from adityasharad/ast/synthetic-query-pack
Contextual queries: Support running when the library pack is in the package cache
2022-11-08 17:15:52 -08:00
Aditya Sharad
97c985b716 Contextual queries: Record whether a temp lock file was created 2022-11-08 16:37:30 -08:00
Aditya Sharad
84b9d9c994 Contextual queries: Factor common code for resolving and running
Shared by the AST viewer, jump to def, and find references
contextual queries.

This allows contextual queries to have their dependencies
resolved and be run whether the library pack is in the
workspace or in the package cache.
2022-11-08 16:06:27 -08:00
Aditya Sharad
639487be0a AST viewer: Address review comments
Clear the CLI server's pack cache before installing packs,
to avoid race conditions where the new lock file is not
detected during query running.

Adjust some helper methods.
2022-11-08 15:33:04 -08:00
Aditya Sharad
f9a19b6a4a AST viewer: Support running when the library pack is in the package cache
If the library pack containing the AST query does not have
a lock file, it is likely to be in the package cache, not
a checkout of the CodeQL repo.
In this case, use `codeql pack resolve-dependencies`
to create a temporary lock file, and `codeql pack install`
to install the dependencies of this library pack.

This allows the CLI to resolve the library path and
dependencies for the AST query before running it.
2022-11-08 14:16:18 -08:00
Koen Vlaswinkel
ab18a74b73 Update error message for no repos queried 2022-11-08 16:56:37 +01:00
Andrew Eisenberg
ab0e8a0ff2 Merge pull request #1722 from github/aeisenberg/bump-timeouts-in-test 2022-11-08 07:35:43 -08:00
Nora
03f58593ce Merge pull request #1717 from github/norascheuch/add-config-validation
Add config validation
2022-11-08 16:11:15 +01:00
Koen Vlaswinkel
a24e7c6172 Merge pull request #1727 from github/koesie10/canceled-view
Handle canceled status in variant analysis view
2022-11-08 14:10:43 +01:00
Koen Vlaswinkel
bf52c7105d Handle failed result download in view
We were not yet showing any errors when a result download had failed.
This adds a warning icon to any repositories for which the download has
failed and allow expanding the item to show an alert.
2022-11-08 13:40:22 +01:00
Koen Vlaswinkel
8e6cfa8551 Handle failed status in variant analysis view
This will show a message for the failure reason in the variant analysis
view when the variant analysis has failed. There don't seem to be
designs for these alerts, but we will need to do a full design review of
the view at some point anyway, so I don't think the exact text is
important.
2022-11-08 13:22:53 +01:00
Koen Vlaswinkel
d711d80cfb Use new variant analysis statuses
The `status` on the variant analysis has changed to have `succeeded`,
`failed` and `cancelled` instead of `completed`.
2022-11-08 13:13:55 +01:00
Koen Vlaswinkel
e164bbb79e Handle canceled status in variant analysis view
The variant analysis view was missing an alert when the variant
analysis was canceled. This adds it, and also adds a story for checking
what the view of a canceled variant analysis looks like.
2022-11-08 13:11:50 +01:00
Koen Vlaswinkel
bbdad0afc4 Merge pull request #1720 from github/koesie10/stop-query-button
Add cancelling of variant analysis to view
2022-11-08 11:05:48 +01:00
Koen Vlaswinkel
89359e30bf Use ID instead of query name in error message
Co-authored-by: Robert <robertbrignull@github.com>
2022-11-08 10:36:42 +01:00
Koen Vlaswinkel
4c0c93d120 Merge pull request #1721 from github/koesie10/run-all-unit-tests
Run all unit tests on Linux/macOS
2022-11-08 09:53:40 +01:00
Andrew Eisenberg
94b411e3b2 Merge pull request #1724 from github/aeisenberg/fix-actions-warnings
Uses newer actions versions and avoids `set-output`
2022-11-07 20:02:38 -08:00
Andrew Eisenberg
2baf99b38a Merge pull request #1723 from github/dependabot/npm_and_yarn/extensions/ql-vscode/loader-utils-1.4.1
Bump loader-utils from 1.4.0 to 1.4.1 in /extensions/ql-vscode
2022-11-07 19:53:55 -08:00
Andrew Eisenberg
082d4b8c78 Uses newer actions versions and avoids set-output
`set-output` is deprecated:
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2022-11-07 16:20:29 -08:00
dependabot[bot]
66cb7dc92f Bump loader-utils from 1.4.0 to 1.4.1 in /extensions/ql-vscode
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-07 23:29:11 +00:00
Andrew Eisenberg
9519efe525 Merge pull request #1679 from github/version/bump-to-v1.7.5
Bump version to v1.7.5
2022-11-07 15:21:25 -08:00