Граф коммитов

1317 Коммитов

Автор SHA1 Сообщение Дата
shati-patel 3337117970 Use more accurate primer icon 2022-02-22 12:04:21 +00:00
Charis Kyriakou 9b61ff5714
Use Primer octicons where possible (#1156) 2022-02-21 11:28:13 +00:00
Andrew Eisenberg eec72e0cbd
Merge pull request #1142 from github/aeisenberg/remote-queries-history
Store remote query artifacts in global storage
2022-02-17 12:35:09 -08:00
Andrew Eisenberg 7a1acce133
Merge pull request #1150 from github/aeisenberg/clear-cache
Fix race condition where packs with no name errored during remote query
2022-02-17 10:04:53 -08:00
Andrew Eisenberg 84b4bfe663
Merge pull request #1149 from github/aeisenberg/avoid-redownload
Avoid re-downloading analyses
2022-02-17 08:14:58 -08:00
Andrew Eisenberg 9df1f91318 Fix race condition where packs with no name errored during remote query
Uses the internal `clear-cache` CLI server command.
2022-02-16 12:46:38 -08:00
Andrew Eisenberg 85e3869607 Avoid re-downloading analyses
Avoids re-downloading analyses when downloading all analyses.
2022-02-16 12:01:21 -08:00
Andrew Eisenberg 5bb2a763e3 Avoid artifactStorageDir and use queryId to build storage paths
This is still an intermediate step as we start to bring in more
abstractions. I plan to implement a storage handler that will
keep track of all the different bits for a remote query.
2022-02-16 11:46:10 -08:00
Andrew Eisenberg 2110709d72
Merge pull request #1140 from github/aeisenberg/contextual-storage
Store query results for contextual queries elsewhere
2022-02-16 08:11:49 -08:00
shati-patel 493033edc0 Remove unused code about validating DB uploads 2022-02-16 14:25:43 +00:00
Andrew Eisenberg bf8e77b9b9 Ensure proper paths are used for retrieving artifacts
This change builds on the previous change to ensure that sarif results
can be displayed properly. Here is what it does:

- Move prepareDownloadDirectory to the RemoteQueryManager
- Store the queryResult to disk
- Use the `artifactStorageDir` as the location where artifacts are kept
- Add `artifactStorageDir` to DownloadLink
- Ensure the webview passes around the right links.
2022-02-15 20:24:17 -08:00
Andrew Eisenberg c7e5581027 Store query results for contextual queries elsewhere
We want them to be deleted when the application exits. We don't want
them to be stored with user queries.
2022-02-15 13:18:45 -08:00
Andrew Eisenberg 39f9c082b9 Store remote query artifacts in global storage
This moves all artifacts downloaded for a remote query into the global
storage directory. Each remote query gets its own directory. The
parent directory is the shared query storage directory.

Each remote query directory also gets a timestamp file.

With these changes, remote queries will be persisted across restarts
and deleted automatically on the same schedule as local queries.

Note: This does _not_ add remote queries to the query history view yet.
This part of the feature is coming next.
2022-02-15 13:05:51 -08:00
shati-patel ca1ef5192d Update wording in results view 2022-02-15 17:36:39 +00:00
Shati Patel 1d6fef9169 Update CLI version in integration tests 2022-02-15 15:50:51 +00:00
shati-patel 81f80ddbe5 Clear SARIF viewer before showing new results 2022-02-15 14:33:15 +00:00
Andrew Eisenberg b53657344c General refactoring and adding comments
There is no new behaviour added in this commit. Just some cleanup:

- Move some shared constants to the `helpers` module
- Add comments to some of the query related modules
- Some general formatting and tidying
2022-02-14 11:39:19 -08:00
Andrew Eisenberg 95e818898e
Merge pull request #1130 from github/aeisenberg/save-query-history
Save query history across restarts
2022-02-14 11:25:35 -08:00
Andrew Eisenberg a7e014a87e
Merge branch 'main' into aeisenberg/save-query-history 2022-02-14 11:15:22 -08:00
Andrew Eisenberg cca65e5a48 Rename and add comment 2022-02-14 10:54:17 -08:00
Robin Neatherway a75249f3e4
Merge pull request #1132 from github/rneatherway/remove-repositories
Remove .repositories configuration approach
2022-02-14 17:43:24 +00:00
Henry Mercer 053a4b0392 Remove feature flag for loading ML models from packs
This functionality should now be enabled for all users.
2022-02-14 10:36:00 +00:00
Andrew Eisenberg 48ccb27e49 Update changelog 2022-02-11 13:54:09 -08:00
Andrew Eisenberg a2b5ad07ff Fix upgrades path
Ensure that upgrades can be resolved even when the upgrades pack is not
in the workspace. This is the situation when the core libraries are
resolved from the package cache.

This change works because `qlProgram.libraryPath` is the resolved
search path for compiling the query. We are guaranteed that the
appropriate core libraries are included in this query.

Note that this change avoids using extra source folders from the
workspace. Previously without using packages, we assume that all
relevant query paths are already inside the workspace. With
packaging, this is no longer the case.

It is theoretically possible that there will be extra upgrade scripts
that are not on the resolved search path, but are included in the
workspace. This situation would have worked in the past.This is not a
situation that we expect to happen in practice. And if this does happen,
I believe this is an error and all upgrades should be added explicitly
to the search path.

An open question is if this will work with downgrade scripts. If it does
not, then I don't think this change makes things any worse than before.
2022-02-11 12:58:34 -08:00
dependabot[bot] cc9cbf7f06 Bump pathval from 1.1.0 to 1.1.1 in /extensions/ql-vscode
Bumps [pathval](https://github.com/chaijs/pathval) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/chaijs/pathval/releases)
- [Changelog](https://github.com/chaijs/pathval/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chaijs/pathval/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: pathval
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-11 11:40:21 +00:00
Andrew Eisenberg ad5c43c9ba Fix failing tests 2022-02-10 20:00:46 -08:00
Andrew Eisenberg 9c27d01d47 Merge branch 'main' into aeisenberg/save-query-history 2022-02-10 16:03:56 -08:00
Andrew Eisenberg 64ac33e3bb Address comments from PR
- Rename queryStorageLocation -> queryStorageDir
- Extract scrubber to its own module
- Add more comments
- Rename source -> cancellationSource
- Ensure cancellatinSource is disposed
2022-02-10 16:03:46 -08:00
aeisenberg 329fb87e12 Bump version to v1.5.12 2022-02-10 12:50:03 -08:00
Andrew Eisenberg bd5da2b0f0 Release preparation for v1.5.11 2022-02-10 12:26:24 -08:00
Henry Mercer 55c21888af Update Code Scanning workflow now that we no longer need `tools: latest`
The Actions VM image containing v2.7.6 of the CodeQL CLI has now fully
rolled out, so we no longer need to download the latest CodeQL bundle to
use this CLI and include this repo in the ML-powered queries beta.
2022-02-10 18:15:52 +00:00
Robin Neatherway d49e6e19a6 Remove .repositories configuration approach
This was our first temporary attempt at configuration of a remote
query run. I don't think that we're using it anymore, so it simplifies
the code to remove it.
2022-02-10 12:47:48 +00:00
Charis Kyriakou edb1af09c4
Hide analyses results until view is complete (#1126) 2022-02-10 08:13:59 +00:00
Charis Kyriakou ab3822d1cc
Use SARIF viewer extension for analysis results (#1125) 2022-02-10 08:13:31 +00:00
Andrew Eisenberg 69120e0799 Add extra delay in telemetry test
Some of our internal integration tests are failing occasionally. I
think extending the wait time here will fix.
2022-02-09 15:10:59 -08:00
Andrew Eisenberg 7785dfead2 Update changelog 2022-02-09 15:09:08 -08:00
Andrew Eisenberg 29c29f9e3a Save query history across restarts
Successfully completed queries will be stored on disk and available
across restarts.

- The query results are contained in global storage.
- Metadata and a summary about a query are stored in workspace storage.
- There is a job that runs every 2 hours to determine if any queries are
  old enough to be deleted.
2022-02-09 15:01:44 -08:00
Andrew Eisenberg b7dafc31bb Better comments around splat and slurp functions
Also, address other small PR comments.
2022-02-08 12:43:38 -08:00
Andrew Eisenberg 2f5a306c2d Simplify the query history objects to make them serializable
The goal with this change is to simplify the query history to make it
possible to serialize and de serialize.

This change adds serialization support. Since query history objects are
complex, the de-serialization requires manipulation of the 
de serialized object prototypes.
2022-02-08 12:43:38 -08:00
Charis Kyriakou 0ef6b45b19
Remove use of all-results artifact (#1120) 2022-02-08 08:28:54 +00:00
dependabot[bot] d9f33d34e3 Bump copy-props from 2.0.4 to 2.0.5 in /extensions/ql-vscode
Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5.
- [Release notes](https://github.com/gulpjs/copy-props/releases)
- [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5)

---
updated-dependencies:
- dependency-name: copy-props
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 15:39:23 -08:00
dependabot[bot] 5758e03a17 Bump nth-check from 2.0.0 to 2.0.1 in /extensions/ql-vscode
Bumps [nth-check](https://github.com/fb55/nth-check) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/fb55/nth-check/releases)
- [Commits](https://github.com/fb55/nth-check/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: nth-check
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-07 15:38:18 -08:00
Andrew Eisenberg 5d9f80cce8 Update ensureCli.ts 2022-02-07 13:30:15 -08:00
Andrew Eisenberg 867ee530b1 Update CLI test version 2022-02-07 13:30:15 -08:00
Charis Kyriakou 27e6a55756
Add full screen modal component (#1117) 2022-02-07 08:24:29 +00:00
Andrew Eisenberg b237bafa2f Avoid AST Viewer for invalid selections
When a directory is selected or there are multiple selections, do not
show the command.
2022-02-04 11:54:11 -08:00
Andrew Eisenberg d0bde800f7 Update changelog 2022-02-04 11:54:11 -08:00
Andrew Eisenberg da0090aa99 Fix ast view and command registration
Two small bugs:

1. The AST view command was viewing the wrong ast when the command was
   selected from the context menu. It was always selecting the active
   editor instead of the item selected in the file menu.
2. The `codeql.showLogs` command was not being registered properly.
   With this change, there is uniform error handling, telemetry,
   and disposal.
2022-02-04 11:54:11 -08:00
Charis Kyriakou 66c9879ce3
Fix package versions for react typings (#1118) 2022-02-04 13:39:29 +00:00
Charis Kyriakou 9c2585116a
Show collapsible analyses results (#1116) 2022-02-04 08:02:21 +00:00