-
Notifications
You must be signed in to change notification settings - Fork 398
Overlay: use overlay-base CodeQL version #3158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: cklin/preliminary-overlay-mode
Are you sure you want to change the base?
Overlay: use overlay-base CodeQL version #3158
Conversation
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Copilot uses AI. Check for mistakes.
0d55271
to
c4d96be
Compare
db6a517
to
d471ff9
Compare
d471ff9
to
8475d6a
Compare
This PR changes the
init
action 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