Cache first failure building an overlay base DB to avoid repeated failures#3487
Open
henrymercer wants to merge 20 commits intomainfrom
Open
Cache first failure building an overlay base DB to avoid repeated failures#3487henrymercer wants to merge 20 commits intomainfrom
henrymercer wants to merge 20 commits intomainfrom
Conversation
Use [...languages].sort() instead of languages.sort() to avoid mutating the caller's array as a side effect.
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request implements a caching mechanism to avoid repeated failures when overlay analysis (improved incremental analysis) fails on a runner due to insufficient resources, typically disk space. The PR introduces a status tracking system that records failures in the Actions cache, allowing subsequent runs to skip overlay analysis automatically until conditions change (e.g., runner upgrade or new CodeQL version).
Changes:
- Added a new
src/overlay/status.tsmodule to track and persist overlay analysis failures via Actions cache - Modified
src/init-action-post-helper.tsto record failures when overlay base database builds are unsuccessful - Updated
src/config-utils.tsto check cached status and skip overlay analysis when previous failures are detected - Added two new feature flags:
OverlayAnalysisStatusCheckandOverlayAnalysisStatusSave - Modified
bundleDbfunction signature to accept anincludeDiagnosticsparameter - Reorganized overlay-related imports from
overlay-database-utilstooverlaymodule structure
Reviewed changes
Copilot reviewed 29 out of 31 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/overlay/status.ts | New module implementing status persistence using Actions cache with timeout handling |
| src/overlay/status.test.ts | Comprehensive unit tests for the new status tracking functionality |
| src/init-action-post-helper.ts | Integration to save failure status after unsuccessful overlay-base builds |
| src/init-action-post-helper.test.ts | Tests verifying status saving under different conditions (failure, success, disabled) |
| src/config-utils.ts | Integration to check cached status and skip overlay analysis when indicated |
| src/config-utils.test.ts | Tests for skipping overlay analysis based on cached status |
| src/feature-flags.ts | Added two new feature flags for status check and save operations |
| src/util.ts | Modified bundleDb signature to accept includeDiagnostics parameter |
| src/database-upload.ts | Updated bundleDb call to pass includeDiagnostics: false |
| src/debug-artifacts.ts | Updated bundleDb call to pass includeDiagnostics: true |
| src/doc-url.ts | Added new documentation URL for deleting Actions cache entries |
| src/testing-utils.ts | Updated import path from overlay-database-utils to overlay |
| src/status-report.ts | Updated import path from overlay-database-utils to overlay |
| src/overlay/index.ts | Updated import paths to use relative paths from parent directory |
| src/overlay/index.test.ts | Updated imports to match new module structure |
| src/init-action.ts | Updated import path from overlay-database-utils to overlay |
| src/analyze.ts | Updated import path from overlay-database-utils to overlay |
| src/analyze-action.ts | Updated import path from overlay-database-utils to overlay |
| src/codeql.ts | Updated databaseBundle signature to include includeDiagnostics parameter |
| lib/* | Generated JavaScript files reflecting all TypeScript changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When overlay analysis (improved incremental analysis) fails on a runner — typically due to insufficient disk space — this PR records that failure in the Actions cache so that subsequent runs will skip overlay analysis automatically until something changes (e.g. a larger runner is provisioned or a new CodeQL version is released).
See the backlinked internal issue for more information.
I recommend reviewing the first commit separately from the rest as this moves the overlay utilities into their own directory.
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, CCR, ...).Products:
analysis-kinds: code-scanning.Environments:
fd.fxlcf.dpdns.organd/or GitHub Enterprise Cloud with Data Residency.How did/will you validate this change?
.test.tsfiles).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