Skip to content

Add prototype implementation for codeQL.runVariantAnalysisPublishedPack#3245

Merged
robertbrignull merged 5 commits intomainfrom
robertbrignull/multi-query-published-pack
Jan 16, 2024
Merged

Add prototype implementation for codeQL.runVariantAnalysisPublishedPack#3245
robertbrignull merged 5 commits intomainfrom
robertbrignull/multi-query-published-pack

Conversation

@robertbrignull
Copy link
Copy Markdown
Contributor

@robertbrignull robertbrignull commented Jan 16, 2024

Implements the codeQL.runVariantAnalysisPublishedPack command. This can likely still be considered a prototype implementation, but it seems to work quite well. Of course right now it fails saying you can't run multiple queries, but that will be fixed in the future.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@robertbrignull robertbrignull requested review from a team as code owners January 16, 2024 15:10
@robertbrignull robertbrignull force-pushed the robertbrignull/multi-query-published-pack branch from 485d5c1 to 174a38a Compare January 16, 2024 15:11
Copy link
Copy Markdown
Contributor

@charisk charisk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM!

Do you think it's worth adding an integration test to cover the new functionality? Can be a separate PR/Issue.

Copy link
Copy Markdown
Member

@koesie10 koesie10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to me as well, I just have some non-blocking improvements that I think could be made.

Comment thread extensions/ql-vscode/src/variant-analysis/variant-analysis-manager.ts Outdated
Comment thread extensions/ql-vscode/src/variant-analysis/variant-analysis-manager.ts Outdated
);
}

return withProgress((progress, token) =>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tried running this yet, but would it be helpful to start the progress earlier since quite some work is being done is this method already (downloading the pack, resolving the queries and then resolving query metadata for all queries)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can do that. We'll have to do some progress report updating schenanigans because the later code sets a different maxStep value, but we can also make that work.

I do wish we had more powerful progress reporting classes which could do this common stuff for us and not require manually putting the right numbers and risking them all getting out of sync. It's a piece of tech debt I hope to get to eventually.

@robertbrignull
Copy link
Copy Markdown
Contributor Author

I've address the review comments (thank you @koesie10, all of your points were very helpful) and tested it again locally. Everything is working and it hasn't broken existing variant analysis flows as far as I can tell, so I'll go ahead and merge so we can keep moving.

@robertbrignull
Copy link
Copy Markdown
Contributor Author

Do you think it's worth adding an integration test to cover the new functionality? Can be a separate PR/Issue.

Yes, I think this would be useful. I'll make an issue so we do this soon.

@robertbrignull robertbrignull merged commit db3550a into main Jan 16, 2024
@robertbrignull robertbrignull deleted the robertbrignull/multi-query-published-pack branch January 16, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants