Skip to content

fix: v0.3.3 CodeQL keeps its compiled queries between runs - #9

Merged
fatherlinux merged 1 commit into
mainfrom
fix/codeql-compile-cache
Nov 4, 2026
Merged

fatherlinux merged 1 commit into
mainfrom
fix/codeql-compile-cache

Conversation

@fatherlinux

Copy link
Copy Markdown
Member

Summary

  • --common-caches=/cache/codeql-common on database create and analyze. The default (~/.codeql = /tmp in the image) was discarded with every container, so each run recompiled the whole suite.
  • Measured on trentina, same image and hook limits: analysis 132s cold → 46s warm; whole check 166s → 92s.

🤖 Generated with Claude Code

https://claude.ai/code/session_01R7Y1jfy8tZHovMEJUNjjD2

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gatehouse found 1 issues (1 low)

Full review.

1 finding(s) dropped: their evidence is not in the diff.

Comment thread sdlc
# that claimed a finding.
try:
db.parent.mkdir(parents=True, exist_ok=True)
caches.mkdir(parents=True, exist_ok=True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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}")

@fatherlinux
fatherlinux merged commit 6042f74 into main Nov 4, 2026
10 checks passed
@fatherlinux
fatherlinux deleted the fix/codeql-compile-cache branch November 4, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant