Overlay: use overlay-base CodeQL version#3158
Closed
cklin wants to merge 6 commits intocklin/preliminary-overlay-modefrom
Closed
Overlay: use overlay-base CodeQL version#3158cklin wants to merge 6 commits intocklin/preliminary-overlay-modefrom
cklin wants to merge 6 commits intocklin/preliminary-overlay-modefrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR changes the init action to use the CodeQL version from cached overlay-base databases when performing overlay analysis. The change detects the CodeQL version from the most recent compatible cache entry and defaults to that version instead of the default CLI version.
- Adds functionality to retrieve CodeQL version from overlay-base database cache entries
- Modifies init-action logic to use cached CodeQL version for overlay analysis when available
- Refactors cache key generation to support reusable workflow prefix components
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/overlay-database-utils.ts | Adds getCodeQLVersionFromOverlayBaseDatabase function and refactors cache key utilities |
| src/overlay-database-utils.test.ts | Adds comprehensive tests for new cache key functionality and version extraction |
| src/init-action.ts | Integrates overlay database CodeQL version detection into initialization workflow |
| src/api-client.ts | Adds getMostRecentActionsCacheEntry function to retrieve latest cache entries |
| lib/*.js | Generated JavaScript files from TypeScript compilation |
| } | ||
|
|
||
| const keyParts = cacheItem.key.split("-"); | ||
| if (keyParts.length < 9) { |
There was a problem hiding this comment.
The magic number 9 for minimum key parts should be defined as a named constant to improve code maintainability and make the cache key format expectations clearer.
0d55271 to
c4d96be
Compare
db6a517 to
d471ff9
Compare
d471ff9 to
8475d6a
Compare
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.
This PR changes the
initaction so that, in situations where it would perform overlay analysis from cache, default the CodeQL CLI version to match that from the cached overlay-base database.Risk assessment
For internal use only. Please select the risk level of this change:
Merge / deployment checklist