Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix results directory and evaluator log for cancelled queries #2996

Merged
merged 4 commits into from
Oct 23, 2023

Conversation

koesie10
Copy link
Member

This makes a change to the query history format to save the output directory of the query. This will allow us to open the results directory and show the evaluator log for queries which have been cancelled.

I've also tested that it handles opening an older query history item format. In that case, it will try to recreate the output dir from a completed query, which should always work since we don't store non-completed queries in the query history JSON.

Please review this commit-by-commit.

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.

This will add the `QueryOutputDir` to the `InitialQueryInfo` and
populate it when creating a local query history item. This will allow us
to open the results directory or show the evaluator log without a
completed query.
This will ensure that when "Show Evaluator Log (Raw JSON)" is used on a
cancelled query history item, we will still show it if it exists. This
changes the error messages on other cases to be more specific.
When a local query fails (for example, if it is cancelled), it may still
have an evaluation log. We weren't generating evaluation log summaries
in these cases, so the options to view the summary text and to use the
evaluation log viewer would not be available. This fixes it by also
trying to generate the summary in the case of a failed query.
@koesie10 koesie10 marked this pull request as ready for review October 19, 2023 08:04
@koesie10 koesie10 requested a review from a team as a code owner October 19, 2023 08:04
Copy link
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.

LGTM

@koesie10 koesie10 merged commit 8011481 into main Oct 23, 2023
25 checks passed
@koesie10 koesie10 deleted the koesie10/query-save-dir branch October 23, 2023 08:45
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.

2 participants