Show query results before structured evaluator log summary completes#1350
Show query results before structured evaluator log summary completes#1350angelapwen merged 3 commits intogithub:mainfrom
Conversation
| }) | ||
|
|
||
| .catch(err => { | ||
| void logger.log(`Failed to generate structured evaluator log summary. Reason: ${err.message}`); |
There was a problem hiding this comment.
Should we use showAndLogWarningMessage here so that the error is displayed in a pop-up as well as being logged?
There was a problem hiding this comment.
Sure, I think that makes sense. The user might not know to look at the Extension Log to see this error pop up.
There was a problem hiding this comment.
Would it potentially be a showAndLogErrorMessage rather than a warning?
There was a problem hiding this comment.
Hm, I think because all the other related popups in this realm are warning messages I'll keep it as a warning message.
There was a problem hiding this comment.
I think I'm inclined to agree that everything in this code should be a warning since failures here aren't fatal in the sense they don't result in a failure to produce results for the query which is what most users care about.
edoardopirovano
left a comment
There was a problem hiding this comment.
Seems reasonable to me, and a surprisingly simple fix! Thanks for picking this up quickly 🙂
shati-patel
left a comment
There was a problem hiding this comment.
Also approving (on behalf of the -reviewers team 😎 )
The Windows test failure looks like a flake, so maybe try re-running and it might disappear 😅
Previously, we were
awaiting the structured evaluator log summary to be fully generated before the query result and raw structured log could be viewed, even though they were already available.This change allows the structured evaluator log summary to execute asynchronously. If the user attempts to click the "Show Structured Evaluator Log (Summary)" command on the query history item before the summary is complete, the user receives a popup saying "The evaluator log summary is still being generated. Please try again later. The summary generation process is tracked in the "CodeQL Extension Log" view." —
The CodeQL Extension Log view will indicate the summary generation is in-progress and when it is complete. It will also log the same warning line as above every time the user attempts to view the summary file before it is completed (in the following screenshot the command was clicked twice):

and at this point the user will be able to view the log summary by clicking the query history command.
Checklist
ready-for-doc-reviewlabel there.