Commit Graph

2543 Commits

Author SHA1 Message Date
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
Koen Vlaswinkel
5f1431ffc2 Run all unit tests on Linux/macOS
It seems like the expansion of the test files pattern is different
between Windows and Linux/macOS. This fixes it by allowing Mocha to
expand the glob pattern rather than the shell which should fix the
inconsistency.
2022-11-07 16:41:52 +01:00
Shati Patel
3bb10d8c6e Add button to open database config from the new databases UI (#1719) 2022-11-07 13:24:15 +00:00
Charis Kyriakou
3f001c981d Create remote db tree view items based on the user's db config (#1714) 2022-11-07 11:26:33 +00:00
Koen Vlaswinkel
09bae13732 Add cancelling of variant analysis to view
This implements the "Stop query" button on the view. It moves some of
the logic of actually cancelling the variant analysis to the manager
instead of being in the query history to allow better re-use of the
code.
2022-11-07 11:21:24 +01:00
Koen Vlaswinkel
93054e14a2 Merge pull request #1683 from github/koesie10/fix-duplicate-downloads
Fix duplicate variant analysis results downloads
2022-11-07 10:37:51 +01:00
Koen Vlaswinkel
a661daaa37 Merge remote-tracking branch 'origin/main' into koesie10/fix-duplicate-downloads 2022-11-07 09:43:31 +01:00
Koen Vlaswinkel
b062f61544 Merge pull request #1716 from github/koesie10/use-shared-types-in-variant-analysis
Remove `gh-api` usage from variant analysis code
2022-11-04 17:07:54 +01:00
Elena Tanasoiu
1fdb1e23f4 Merge pull request #1715 from github/elena/cancel-variant-analysis
Implement query history "cancel" option
2022-11-04 15:19:20 +00:00
Elena Tanasoiu
145f0bf1f2 Be slightly less verbose when mocking a variant analysis 2022-11-04 14:13:18 +00:00
Elena Tanasoiu
2ca15f3665 Make it possible to cancel a variant analysis from Query History
This also adds tests for cancelling a local query and a remote query.

NB: We only cancel queries that are in progress, so the tests check
the behaviour both for in progress and not in progress items.
2022-11-04 14:13:17 +00:00
Elena Tanasoiu
20b127c693 Make it possible to cancel a mock local query
We're going to add tests to check that we cancel a remote query.

We'll need a `.cancel` method to be present on our mock local queries for this.
2022-11-04 14:13:17 +00:00
Elena Tanasoiu
620cc39e63 Introduce createVariantAnalysis method in actions API
This will allow us to make an API call to cancel a variant analysis.
2022-11-04 14:13:17 +00:00
Koen Vlaswinkel
8345284327 Merge pull request #1712 from github/koesie10/filter-sort-fixes
Add missing margin to repositories sort/filter row
2022-11-04 14:54:12 +01:00
Koen Vlaswinkel
ae3c0888e8 Remove gh-api usage from variant analysis code
This removes all usages of the `gh-api` types from the variant analysis
code by replacing it by the same types defined in `shared`.

This is a breaking change for the query history since the files
serialized to disk now also change. However, since this is still behind
a feature flag the change should be safe to make now.
2022-11-04 14:44:37 +01:00
Nora
4d00c4abfc Merge pull request #1713 from github/charis-nora/introduce-error-view-in-db-panel
Introduce error in new db panel
2022-11-04 13:41:27 +01:00
Nora
99e523f645 Update extensions/ql-vscode/src/databases/ui/db-tree-data-provider.ts
Co-authored-by: Charis Kyriakou <charisk@users.noreply.github.com>
2022-11-04 13:23:29 +01:00
Nora
6e19b5200c Update extensions/ql-vscode/src/databases/ui/db-tree-data-provider.ts
Co-authored-by: Charis Kyriakou <charisk@users.noreply.github.com>
2022-11-04 13:23:23 +01:00
Nora
45bb643a8a Update extensions/ql-vscode/src/databases/ui/db-tree-view-item.ts
Co-authored-by: Charis Kyriakou <charisk@users.noreply.github.com>
2022-11-04 13:23:17 +01:00
Koen Vlaswinkel
c6548cbe41 Add missing margin to repositories sort/filter row 2022-11-04 13:08:43 +01:00
Nora
3cc7d3ce8a Add sample error
Co-authored-by: Charis Kyriakou <charisk@users.noreply.github.com>
2022-11-04 13:06:31 +01:00
Koen Vlaswinkel
3dbd071570 Merge pull request #1711 from github/koesie10/sort-repositories
Add sorting to variant analysis repositories
2022-11-04 12:27:43 +01:00
Nora
fe90f38ad4 Merge pull request #1709 from github/charis-nora/validate-db-config-file
Validate workspace-databases.json
2022-11-04 12:20:20 +01:00
Koen Vlaswinkel
588351b101 Merge remote-tracking branch 'origin/main' into koesie10/sort-repositories 2022-11-04 11:30:24 +01:00
Koen Vlaswinkel
c0ba9c5f6e Merge pull request #1705 from github/koesie10/filter-repositories-by-name
Add repository filter by full name
2022-11-04 11:28:58 +01:00
Koen Vlaswinkel
18e1cfa8aa Merge remote-tracking branch 'origin/main' into koesie10/fix-duplicate-downloads 2022-11-04 11:27:50 +01:00
Koen Vlaswinkel
49f97e1bcc Add tests for repo states 2022-11-04 11:24:52 +01:00
Nora
f6b50bb3d6 Use contributes jsonValidation instead 2022-11-04 11:24:46 +01:00
Nora
544ff89bf8 Merge comments 2022-11-04 10:20:47 +01:00
Elena Tanasoiu
e7a0c7e652 Merge pull request #1710 from github/elena/sort-sorting
Make sorting tests work with remote queries & variant analysis history items
2022-11-03 16:57:14 +00:00
Koen Vlaswinkel
5ff7b8a1c1 Add sorting to variant analysis repositories
This adds sorting to the variant analysis repositories on the outcome
panels. The sort state is shared between all panels, so unlike the
design this doesn't disable the sort when you are on e.g. the no access
panel.
2022-11-03 16:18:22 +01:00
Elena Tanasoiu
f0aa0a5ef6 Get rid of old item factory method
We don't use it anymore.
2022-11-03 14:34:27 +00:00
Elena Tanasoiu
52ee4563dc Make sorting tests work with remote queries and variant analysis history items
We can now, finally, test sorting works, with REAL objects.
2022-11-03 14:34:27 +00:00
Elena Tanasoiu
a7431bdc1d Use new factory methods in query history tests 2022-11-03 14:18:52 +00:00
Elena Tanasoiu
a1d3c612ad Use new createMockLocalQueryInfo method in query-history-info tests 2022-11-03 14:16:43 +00:00
Elena Tanasoiu
2fe0c7925d Adapt tests for query history labels to use new LocalQueryInfo factory method
We're making a number of changes:

1. We're changing the userSpecifiedLabel value to be
`user-specified-name` instead of `xxx`

2. For local queries, we're changing `in progress` to `finished in 0
seconds` when the query has results. The previous version was
contradictory because any query still in progress wouldn't have results.

3. Similarly, for remote queries, we're changing `in progress` to
`completed` when the query has results. Here we actually set a `status`
property which means `in progress` becomes `completed`.
2022-11-03 14:08:16 +00:00
Elena Tanasoiu
028cc79bb9 Combine createMockLocalQueryInfo and createMockLocalQuery
One factory method to rule them all!

There were a number of problems with these methods:

1. We were previously using two different factory methods to generate
a fake local queries. Ideally we'd just have one.

2. We weren't really creating a real LocalQueryInfo object, which
blocked us [1] from being able to correctly understand which fields we
need in our tests and how they interact together.

3. We stubbed a bunch of methods on the original object to get our tests
to work. We can now use a real object with all the trimmings.

[1]: https://github.com/github/vscode-codeql/pull/1697#discussion_r1011990685
2022-11-03 14:02:14 +00:00
Elena Tanasoiu
0639c66bb0 Change createMockRemoteQueryHistoryItem to receive resultCount and startTime
Again, we'll need these for sorting.

We also want to be able to set/unset a userSpecifiedLabel. Since this factory
method is used in `history-item-label-provider.test.ts`, we have tests there
that count on this custom label being defined/undefined.
2022-11-03 13:58:09 +00:00
Nora
e6d0646786 Fix rebase conflict changes 2022-11-03 14:56:33 +01:00
Nora
fcc814c0c9 Call db config and initialize with extension path 2022-11-03 14:56:33 +01:00
Nora
ea0887622e Copy schema to extension files 2022-11-03 14:56:33 +01:00
Nora
d4fb0fa177 Add workspace databases schema 2022-11-03 14:56:33 +01:00
Elena Tanasoiu
44aeaf7d32 Allow createMockVariantAnalysisHistoryItem to receive named params
Similarly, we want to provide params selectively to test sorting.

We're also setting some defaults to play nicely with our current
tests.
2022-11-03 13:56:09 +00:00