Merged
Conversation
This will store all variant analysis that are run in the manager. Right now, it only stores the variant analyses in memory. In the future, these will be loaded from the query history and can be restored after a restart.
In most cases, we will not have access to the full repo task object since this needs to be retrieved from the API. Since we are only using the full name from the repo task object, we can just use the full name instead.
To create the interpreted and raw results from the SARIF/BQRS files, we need some information from the repo task object. This will store the repo task object to the filesystem as JSON so we can read them when loading results.
This adds a new VSCode command which can be used to load results.
Base automatically changed from
koesie10/variant-analysis-results-manager
to
main
October 7, 2022 12:08
robertbrignull
approved these changes
Oct 11, 2022
Contributor
robertbrignull
left a comment
There was a problem hiding this comment.
Code looks good to me.
| public async loadResults(variantAnalysisId: number, repositoryFullName: string): Promise<void> { | ||
| const variantAnalysis = this.variantAnalyses.get(variantAnalysisId); | ||
| if (!variantAnalysis) { | ||
| throw new Error(`No variant analysis with id: ${variantAnalysisId}`); |
Contributor
There was a problem hiding this comment.
Out of interest, how would this error surface to the user? Would it appear as a notification or be in a debug window or be completely hidden?
Member
Author
There was a problem hiding this comment.
Since this is called by a command runner, this will show a warning notification and be logged (using the showAndLogWarningMessage function).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 is a basic implementation of the
requestRepoResultsmessage. It currently does not work since results are not yet unzipped, but if the files are present, this should fully work. However, I've not been able to test this.It's probably easiest to review this PR commit-by-commit.
Checklist
ready-for-doc-reviewlabel there.