GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Disable TRAP caching when overlay is enabled by henrymercer · Pull Request #3569 · github/codeql-action Conversation
Contributor
Overlay supersedes TRAP caching, so when overlay is enabled, we should avoid spending time downloading and generating TRAP caches, and free up Actions cache space by not storing TRAP caches. Risk assessmentFor internal use only. Please select the risk level of this change:
Which use cases does this change impact?Workflow types:
Products:
Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pull request overviewThis PR refactors TRAP caching setup so it’s decided inside config initialization, and adds a feature-flagged behavior to disable TRAP caching when overlay analysis (improved incremental analysis) is enabled. Changes:
Reviewed changesCopilot reviewed 15 out of 19 changed files in this pull request and generated 2 comments. Show a summary per file
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+279
to
283
|
| } else { | ||
| logger.info("Enabling CodeQL C++ TRAP caching support."); | ||
| core.exportVariable(envVar, "true"); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
setCppTrapCachingEnvironmentVariables only ever sets CODEQL_EXTRACTOR_CPP_TRAP_CACHING to true. Previously the action explicitly set this env var to false when TRAP caching was not enabled. Leaving it unset makes behavior dependent on the extractor default and may fail to actually disable C++ TRAP caching when isTrapCachingEnabled returns false (e.g., when overlay analysis is on). Consider adding an explicit disable path when TRAP caching is disabled (while still respecting a user-supplied env var).
| } else { | |
| logger.info("Enabling CodeQL C++ TRAP caching support."); | |
| core.exportVariable(envVar, "true"); | |
| return; | |
| } | |
| if (config.trapCachingEnabled) { | |
| logger.info("Enabling CodeQL C++ TRAP caching support."); | |
| core.exportVariable(envVar, "true"); | |
| } else { | |
| logger.info("Disabling CodeQL C++ TRAP caching support."); | |
| core.exportVariable(envVar, "false"); |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I assume Henry has checked the default, but it probably wouldn't hurt to still explicitly set it to false.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for putting the changed behaviour behind a FF as well!
Copilot's comment about the CPP env var potentially not being set at all is true I think. I assume the default behaviour if for it to be false, but it may not hurt to just set it to false anyway.
I probably would have preferred for the drive-by changes in this PR to be in their own PRs. They made it a bit harder than necessary to review this change, and it might be tricky to track them down later.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } else { | ||
| logger.info("Enabling CodeQL C++ TRAP caching support."); | ||
| core.exportVariable(envVar, "true"); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I assume Henry has checked the default, but it probably wouldn't hurt to still explicitly set it to false.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
# Conflicts: # lib/start-proxy-action.js
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.