Repository navigation
Graduate overlay TRAP caching defaults - #4245
henrymercer wants to merge 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Warning
- Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.
🟢 Approval recommended
The focused changes preserve override precedence, cover the changed defaults with tests, and have no identified blocking issues.
0 open findings
What changed in this PR
Makes disabling TRAP caching the default when CodeQL overlay analysis is active, while preserving explicit workflow overrides.
Changes:
- Removes the graduated feature flag and simplifies default selection.
- Updates tests for overlay defaults and input precedence.
- Clarifies the
trap-cachinginput description.
| File | Description |
|---|---|
| src/feature-flags.ts | Removes the flag and its environment-variable configuration. |
| src/config-utils.ts | Makes default selection synchronous and updates its caller. |
| src/config-utils.test.ts | Covers both overlay modes, explicit overrides, and runner defaults. |
| init/action.yml | Clarifies the input documentation. |
Files excluded by content exclusion policy (1)
- lib/entry-points.js
🧠 Review effort: Max
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
mbg
left a comment
There was a problem hiding this comment.
The changes look good. I just have one question about the effects on overlay analysis if TRAP caching is explicitly enabled. Maybe I knew the answer previously, but forgot.
| // If the workflow specified something, always respect that. | ||
| const trapCaching = getOptionalInput("trap-caching"); | ||
| if (trapCaching !== undefined) return trapCaching === "true"; |
There was a problem hiding this comment.
OOC: What happens if TRAP caching is explicitly enabled via the input, we restore the TRAP caches, but overlay analysis is also enabled? Would it be worth to document that here or in init/action.yml if that combination has effects on overlay analysis?
There was a problem hiding this comment.
With overlay analysis enabled, the extractor only writes TRAP files for changed files, so the TRAP cache is only really ever useful for files with identical content that have just been moved. This means that the overhead of downloading the cache (and the space it takes up in the Actions cache) is rarely worth it.
It's a good idea to document that in the input, I'll push a commit to do that.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This removes the fully shipped
OverlayAnalysisDisableTrapCachingfeature flag and its environment variable. When overlay analysis is active, the Action now disables TRAP caching by default because overlay analysis supersedes it.An explicit
trap-caching: trueortrap-caching: falseinput remains the highest-priority override. The default now also applies to manually enabled overlay analysis on GitHub Enterprise Server.This does not add a changelog entry because the v4.34.0 changelog already announced the rollout.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
dynamicworkflows (Default Setup, Code Quality, ...).Products:
analysis-kinds: code-scanning.analysis-kinds: code-quality.Environments:
github.comand/or GitHub Enterprise Cloud with Data Residency.How did/will you validate this change?
.test.tsfiles).pr-checks).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
trap-caching: trueto restore TRAP caching while a fix is prepared.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