| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This 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:
Copilot reviewed 15 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file| File | Description |
|---|---|
| src/testing-utils.ts | Adds RUNNER_NAME to default Actions env vars used by tests. |
| src/init-action.ts | Removes inline TRAP caching + Python warning suppression logic now handled elsewhere. |
| src/feature-flags.ts | Adds OverlayAnalysisDisableTrapCaching feature flag and reorganizes overlay-related flags. |
| src/config-utils.ts | Implements isTrapCachingEnabled, downloads TRAP caches conditionally, and sets C++ TRAP caching env var when enabled. |
| src/config-utils.test.ts | Adds unit tests for isTrapCachingEnabled and initializes Actions env vars in more tests. |
| src/codeql.ts | Always uses --cache-cleanup for database cleanup now that minimum CLI supports it. |
| lib/upload-lib.js | Generated JS output update (not reviewed). |
| lib/start-proxy-action.js | Generated JS output update (not reviewed). |
| lib/setup-codeql-action.js | Generated JS output update (not reviewed). |
| lib/resolve-environment-action.js | Generated JS output update (not reviewed). |
| CHANGELOG.md | Documents the experimental rollout to disable TRAP caching under overlay analysis. |
Sorry, something went wrong.
| defaultValue: false, | ||
| envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", | ||
| minimumVersion: undefined, | ||
| }, | ||
| [Feature.OverlayAnalysisSkipResourceChecks]: { |
There was a problem hiding this comment.
The overlay-related entries in featureConfig are no longer kept in alphabetical order: OverlayAnalysisSkipResourceChecks comes after OverlayAnalysisStatusCheck/Save. Please reorder these keys to match the established convention in this file (keeps diffs smaller and makes it easier to scan for flags).
Sorry, something went wrong.
| } else { | ||
| logger.info("Enabling CodeQL C++ TRAP caching support."); | ||
| core.exportVariable(envVar, "true"); |
There was a problem hiding this comment.
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 a problem hiding this comment.
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 a problem hiding this comment.
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.
| } else { | ||
| logger.info("Enabling CodeQL C++ TRAP caching support."); | ||
| core.exportVariable(envVar, "true"); |
There was a problem hiding this comment.
I assume Henry has checked the default, but it probably wouldn't hurt to still explicitly set it to false.
Sorry, something went wrong.
# Conflicts: # lib/start-proxy-action.js
There was a problem hiding this comment.
LGTM!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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 assessment
For 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