Repository navigation
fix: v0.3.3 CodeQL keeps its compiled queries between runs - #9
Merged
Merged
Conversation
The cache defaulted to ~/.codeql (/tmp in the image), discarded with the container, so every run recompiled security-extended: 1m32s-3m13s of trentina's push. --common-caches=/cache/codeql-common on create and analyze. Measured on trentina with the hook's limits: analysis 132s cold, 46s warm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R7Y1jfy8tZHovMEJUNjjD2
| # that claimed a finding. | ||
| try: | ||
| db.parent.mkdir(parents=True, exist_ok=True) | ||
| caches.mkdir(parents=True, exist_ok=True) |
There was a problem hiding this comment.
LOW (General Review): The new cache-directory creation is covered by an error handler that reports only a failure to create the database directory. If creating caches fails, the message points to the wrong path and obscures the actual cause.
Suggestion: Report which directory creation failed, or use a generic message that includes both db.parent and caches.
Evidence:
caches.mkdir(parents=True, exist_ok=True)
except OSError as exc:
cannot(f"cannot create the CodeQL database directory {db.parent}: {exc}")
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.
Summary
--common-caches=/cache/codeql-commonondatabase createandanalyze. The default (~/.codeql=/tmpin the image) was discarded with every container, so each run recompiled the whole suite.🤖 Generated with Claude Code
https://claude.ai/code/session_01R7Y1jfy8tZHovMEJUNjjD2