GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Disable TRAP caching when overlay is enabled by henrymercer · Pull Request #3569 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented Mar 11, 2026

Copy link
Copy Markdown
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 assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Workflow types:

  • Advanced setup - Impacts users who have custom CodeQL workflows.
  • Managed - Impacts users with dynamic workflows (Default Setup, Code Quality, ...).

Products:

  • Code Scanning - The changes impact analyses when analysis-kinds: code-scanning.

Environments:

  • Dotcom - Impacts CodeQL workflows on github.com and/or GitHub Enterprise Cloud with Data Residency.

How did/will you validate this change?

  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Feature flags - All new or changed code paths can be fully disabled with corresponding feature flags.

How will you know if something goes wrong after this change is released?

  • Telemetry - I rely on existing telemetry or have made changes to the telemetry.
    • Dashboards - I will watch relevant dashboards for issues after the release. Consider whether this requires this change to be released at a particular time rather than as part of a regular release.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
henrymercer added 10 commits March 11, 2026 18:44
@henrymercer
Add FF for disabling TRAP caching when overlay enabled
b0f8772
@henrymercer
Enablement: Move TRAP caching check after overlay
b04e63f
@henrymercer
Disable TRAP caching when conditions met
70d5ccc
@henrymercer
Clean up: Remove unneeded CodeQL version guard
d05b50b
@henrymercer
Drive-by cleanup: Always use --cache-cleanup
d74701c
@henrymercer
Remove dead Python library extraction code
19544bb
@henrymercer
Drive-by comment fixes
556dd79
@henrymercer
Add unit tests for isTrapCachingEnabled
a91b7a3
@henrymercer
Add changelog note
b1f1e7b
@henrymercer
Stub RUNNER_NAME in unit tests
926e6df
@henrymercer
henrymercer requested a review from a team as a code owner March 11, 2026 20:19
Copilot AI review requested due to automatic review settings March 11, 2026 20:19
@github-actions github-actions Bot added the size/L May be hard to review label Mar 11, 2026
Copilot started reviewing on behalf of henrymercer March 11, 2026 20:20
View session
Copilot AI reviewed Mar 11, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Pull request overview

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:

  • Move TRAP caching enablement logic (incl. C++ env var handling) into src/config-utils.ts, with new isTrapCachingEnabled and associated tests.
  • Remove legacy CodeQL CLI version gating for database cleanup now that the Action enforces a newer minimum CLI version.
  • Update tests/utilities and changelog to reflect the new behavior.

Reviewed 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/feature-flags.ts
Comment on lines +279 to 283
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE",
minimumVersion: undefined,
},
[Feature.OverlayAnalysisSkipResourceChecks]: {

Copilot AI Mar 11, 2026

Copy link

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.
Comment thread src/config-utils.ts Outdated
Comment on lines +1035 to +1037
} else {
logger.info("Enabling CodeQL C++ TRAP caching support.");
core.exportVariable(envVar, "true");

Copilot AI Mar 11, 2026

Copy link

There was a problem hiding this comment.

Choose a reason for 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).

Suggested change
} 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot uses AI. Check for mistakes.

@mbg mbg Mar 12, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
redsun82
redsun82 previously approved these changes Mar 12, 2026
View reviewed changes
mbg
mbg previously approved these changes Mar 12, 2026
View reviewed changes

@mbg mbg left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/config-utils.ts Outdated
Comment on lines +1035 to +1037
} else {
logger.info("Enabling CodeQL C++ TRAP caching support.");
core.exportVariable(envVar, "true");

@mbg mbg Mar 12, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
henrymercer added 2 commits March 18, 2026 16:35
@henrymercer
Merge branch 'main' into henrymercer/overlay-no-trap-caching
60a0dce
# Conflicts:
#	lib/start-proxy-action.js
@henrymercer
Explicitly set C/C++ trap caching env var to false
582d08c
@henrymercer
henrymercer dismissed stale reviews from mbg and redsun82 via 582d08c March 18, 2026 17:10
@henrymercer
Fix changelog automerge
5b63048
@henrymercer
henrymercer requested a review from redsun82 March 18, 2026 17:11
redsun82
redsun82 approved these changes Mar 19, 2026
View reviewed changes

@redsun82 redsun82 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@henrymercer
henrymercer added this pull request to the merge queue Mar 19, 2026
Merged via the queue into main with commit 07d509f Mar 19, 2026
225 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
henrymercer deleted the henrymercer/overlay-no-trap-caching branch March 19, 2026 10:32
This was referenced Mar 20, 2026
Merge main into releases/v4 #3588
Merged
Merge releases/v4 into releases/v3 #3590
Merged
@github-actions github-actions Bot mentioned this pull request May 18, 2026
chore(ci)(deps): bump github/codeql-action from 3.35.4 to 4.35.5 ag-ui-protocol/ag-ui#1711
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@redsun82 redsun82 redsun82 approved these changes
@mbg mbg mbg left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size/L May be hard to review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@henrymercer @mbg @redsun82
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.