Skip to content

Monitor remote query run and render results#1033

Merged
charisk merged 7 commits intomainfrom
remote-query-monitor-and-render-results
Dec 9, 2021
Merged

Monitor remote query run and render results#1033
charisk merged 7 commits intomainfrom
remote-query-monitor-and-render-results

Conversation

@charisk
Copy link
Copy Markdown
Contributor

@charisk charisk commented Dec 6, 2021

This PR introduces logic to monitor the progress of a remote query as well as rendering the remote queries view using real data from the result of the query.

The notification that links to the Actions workflow is still in place:
image

But once the query is complete, you get one more notification (assuming you leave VS Code open):
image

Which leads to a view similar to the following:
image

Summary of changes

  • Added a new codeQL.monitorRemoteQuery command that is executed once the remote query has been submitted to run. The new command is not visible to the user.
  • Introduced new entities to represent the result of a remote query from a domain point of view and the UI point of view. View entities are inside the /views directory.
  • Introduced a RemoteQueriesManager that is used as an entry point for running and monitoring remote queries from the extension. This class then uses the RemoteQuriesMonitor to monitor the progress of the query and the RemoteQueriesInterfaceManager to prepare data for the view and render the view.
  • Updated the web view (and message) to retrieve use state and real data.

Checklist

N/A: Still an internal-only feature. No user-visible changes.

  • 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.
  • @github/docs-content-codeql has been cc'd in all issues for UI or other user-facing changes made by this pull request.

@charisk charisk requested a review from a team as a code owner December 6, 2021 15:06
@charisk charisk force-pushed the remote-query-monitor-and-render-results branch from 51c7ecb to 41f712e Compare December 6, 2021 15:10
Comment thread extensions/ql-vscode/src/extension.ts
Comment thread extensions/ql-vscode/src/pure/interface-types.ts Outdated
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-interface.ts Outdated
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-interface.ts Outdated
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-monitor.ts Outdated
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-monitor.ts Outdated
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-monitor.ts Outdated
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-interface.ts Outdated
Comment thread extensions/ql-vscode/src/remote-queries/view/RemoteQueries.tsx Outdated
Comment thread extensions/ql-vscode/src/remote-queries/view/RemoteQueries.tsx Outdated
Comment thread extensions/ql-vscode/src/extension.ts
Comment thread extensions/ql-vscode/src/extension.ts
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-interface.ts Outdated
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-monitor.ts Outdated
Copy link
Copy Markdown
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

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

Looks good! Just a few minor comments 🌻

Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-interface.ts Outdated
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-interface.ts Outdated
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-interface.ts Outdated
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-manager.ts
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-manager.ts Outdated
Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-monitor.ts Outdated
charisk and others added 2 commits December 7, 2021 12:38
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
Co-authored-by: Shati Patel <42641846+shati-patel@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

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

Thanks for the updates! Looks good from my point of view now

Comment thread extensions/ql-vscode/src/remote-queries/remote-queries-manager.ts
@charisk charisk merged commit e365744 into main Dec 9, 2021
@charisk charisk deleted the remote-query-monitor-and-render-results branch December 9, 2021 10:05
@shati-patel shati-patel restored the remote-query-monitor-and-render-results branch December 9, 2021 10:22
@shati-patel shati-patel deleted the remote-query-monitor-and-render-results branch December 9, 2021 10:22
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