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

Save query history across restarts #1130

Merged
merged 7 commits into from
Feb 14, 2022
Merged

Conversation

aeisenberg
Copy link
Contributor

@aeisenberg aeisenberg commented Feb 9, 2022

Successfully completed queries will be stored on disk and available
across restarts.

  • The query results are contained in global storage.
  • Metadata and a summary about a query are stored in workspace storage.
  • There is a job that runs every 2 hours to determine if any queries are
    old enough to be deleted.

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.

Successfully completed queries will be stored on disk and available
across restarts.

- The query results are contained in global storage.
- Metadata and a summary about a query are stored in workspace storage.
- There is a job that runs every 2 hours to determine if any queries are
  old enough to be deleted.
@aeisenberg aeisenberg requested a review from a team as a code owner February 9, 2022 23:03
extensions/ql-vscode/src/contextual/locationFinder.ts Outdated Show resolved Hide resolved
extensions/ql-vscode/src/contextual/templateProvider.ts Outdated Show resolved Hide resolved
extensions/ql-vscode/src/extension.ts Show resolved Hide resolved
extensions/ql-vscode/src/extension.ts Show resolved Hide resolved
extensions/ql-vscode/src/query-history.ts Outdated Show resolved Hide resolved
extensions/ql-vscode/src/query-results.ts Outdated Show resolved Hide resolved

const upgradeDir = await tmp.dir({ dir: upgradesTmpDir.name, unsafeCleanup: true });
let upgradeDir: tmp.DirectoryResult | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change relevant to query history? 🤔

extensions/ql-vscode/src/query-history.ts Show resolved Hide resolved
extensions/ql-vscode/src/query-history.ts Outdated Show resolved Hide resolved
extensions/ql-vscode/src/run-queries.ts Show resolved Hide resolved
- Rename queryStorageLocation -> queryStorageDir
- Extract scrubber to its own module
- Add more comments
- Rename source -> cancellationSource
- Ensure cancellatinSource is disposed
@aeisenberg aeisenberg enabled auto-merge (rebase) February 14, 2022 19:15
@aeisenberg aeisenberg disabled auto-merge February 14, 2022 19:15
@aeisenberg aeisenberg enabled auto-merge February 14, 2022 19:15
@aeisenberg aeisenberg merged commit 95e8188 into main Feb 14, 2022
@aeisenberg aeisenberg deleted the aeisenberg/save-query-history branch February 14, 2022 19:25
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