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

Expand disk cache evaluator options #778

Merged
merged 3 commits into from
Mar 12, 2021

Conversation

edoardopirovano
Copy link
Contributor

This PR addresses #593 by expanding the options that can be passed to control how the evaluator handles the disk cache. In particular, it exposes to the user two settings - the first enables the saving of intermediate results to the cache, and the second allows limiting of the size of the cache. The default behaviour is unchanged from the current options - i.e. intermediate results are not saved to the disk cache, and the evaluator is allowed to choose its own limit on maximum cache size.

extensions/ql-vscode/package.json Outdated Show resolved Hide resolved
extensions/ql-vscode/CHANGELOG.md Outdated Show resolved Hide resolved
],
"default": null,
"minimum": 1024,
"description": "Maximum size of the disk cache (in MB). Leave blank to allow the evaluator to automatically adjust the size of the disk cache based on the size of the codebase and the complexity of the queries being executed."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"description": "Maximum size of the disk cache (in MB). Leave blank to allow the evaluator to automatically adjust the size of the disk cache based on the size of the codebase and the complexity of the queries being executed."
"description": "Maximum size of the disk cache (in MB). Leave blank or set to 0 to allow the evaluator to automatically adjust the size of the disk cache based on the size of the codebase and the complexity of the queries being executed."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The value can't actually be set to 0 because of the "minimum": 1024

@@ -123,6 +123,20 @@
"maximum": 1024,
"description": "Number of threads for running queries."
},
"codeQL.runningQueries.saveCache": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably add a scope of "scope": "window" to ensure that downloaded workspaces don't accidentally blow up someone's hard drive.

@aeisenberg
Copy link
Contributor

Nice work! The failing integration build is probably just a flaky test. Re-running.

@aeisenberg aeisenberg enabled auto-merge (rebase) March 12, 2021 16:41
@aeisenberg aeisenberg merged commit 35d98f6 into github:main Mar 12, 2021
@edoardopirovano edoardopirovano deleted the save-cache-option branch March 15, 2021 17:27
@aeisenberg
Copy link
Contributor

@github/docs-content-dsp Do we need to update docs for this?

@shati-patel
Copy link
Contributor

@github/docs-content-dsp Do we need to update docs for this?

👋🏽 Thanks for the ping! This one doesn't need a docs update 😃 (We have a general section about "Configuring settings for running queries", and we can rely on the descriptions in the extension itself for more detail.)

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.

Add option to include the --save-cache option to the query server to more aggressively save the cache
3 participants