Skip to content

Expand disk cache evaluator options#778

Merged
aeisenberg merged 3 commits intogithub:mainfrom
edoardopirovano:save-cache-option
Mar 12, 2021
Merged

Expand disk cache evaluator options#778
aeisenberg merged 3 commits intogithub:mainfrom
edoardopirovano:save-cache-option

Conversation

@edoardopirovano
Copy link
Copy Markdown
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.

],
"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
Copy Markdown
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
Copy Markdown
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

"maximum": 1024,
"description": "Number of threads for running queries."
},
"codeQL.runningQueries.saveCache": {
Copy link
Copy Markdown
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.

edoardopirovano and others added 2 commits March 12, 2021 11:04
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
@aeisenberg
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@shati-patel
Copy link
Copy Markdown
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

4 participants