Remove use of CLI server for resolving tests #3235
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes the test resolver to use an implementation in the extension instead of calling out to the CLI server's
resolve tests --strict-test-discovery
. This results in improved performance in the extension due to less blocking operations on the CLI server. It's also more fault tolerant and is able to produce a result for the internal CodeQL repository.I've verified that for
github/codeql
the results are exactly the same: all tests resolved by the CLI server are present in the list of this implementation and vice-versa. For the internal CodeQL repository, the only difference is that this version finds more results because it follows symlinks, whichresolve tests
doesn't do.In the internal CodeQL repository, this implementation takes about 50 seconds to complete.
codeql resolve tests
takes about 4 seconds, but I'm not sure if that list is complete because it completes with an error. Ingithub/codeql
, this implementation takes 9 seconds whileresolve tests
takes about 3 seconds. Almost all of the time in this implementation is in theawait pathExists(expectedFile)
call. Removing it makes it complete in less than a second.It's easiest to review this commit-by-commit.
Checklist
ready-for-doc-review
label there.