GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Extract directly to the toolcache by henrymercer · Pull Request #2631 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented Dec 3, 2024

Copy link
Copy Markdown
Contributor

Adding the CodeQL Bundle to the toolcache seems to take a surprisingly long amount of time. We haven't collected large scale telemetry yet, but here's some anecdotal numbers from looking at the logs on PR checks:

  • Linux: ~10–15 secs
  • macOS: ~15–20 secs
  • Windows: ~2 minutes (!)

Therefore in this PR, we add a feature flag that extracts the CodeQL bundle directly to the toolcache, eliminating the copy to toolcache step completely.

I've tested the change by adding a PR check, temporarily modifying this to running 10 runs on each platform, and running this a bunch of times. Next steps are dogfooding this change internally using the feature flag.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
henrymercer added 12 commits December 2, 2024 17:58
@henrymercer
Enable specifying extraction destination
be26fe6
@henrymercer
Add feature flag for extracting directly to toolcache
6695503
@henrymercer
Extract directly to toolcache when feature enabled
198fb4b
@henrymercer
Add PR check
028cece
@henrymercer
Write toolcache marker file
0b20485
@henrymercer
PR check: Ensure bundle added to toolcache
8c0517f
@henrymercer
PR check: Check toolcache empty at start
f8ccf38
@henrymercer
Run PR check on Windows too
d57328a
@henrymercer
Add more error handling to zstd extraction
d5bcf48
@henrymercer
Ensure destination directory exists when streaming extraction
b2a4442
@henrymercer
Tweak log wording
93f3303
@henrymercer
Record telemetry for cache operation duration
7bcf845
@henrymercer
henrymercer requested a review from a team as a code owner December 3, 2024 18:29
dbartol
dbartol previously approved these changes Dec 3, 2024
View reviewed changes

@dbartol dbartol left a comment

Copy link
Copy Markdown

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.

LGTM. Looks like a relatively simple change, plus some plumbing to pass the destination directory through to all the places the write the files.

On a GitHub-hosted runner, it looks like we'll still add the bundle to the toolcache, even though the cache will disappear after the job. Is this just because we have to put it somewhere, and we might as well put it in the toolcache for consistency with the less-common self-hosted runner scenario?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@henrymercer

henrymercer commented Dec 4, 2024

Copy link
Copy Markdown
Contributor Author

On a GitHub-hosted runner, it looks like we'll still add the bundle to the toolcache, even though the cache will disappear after the job. Is this just because we have to put it somewhere, and we might as well put it in the toolcache for consistency with the less-common self-hosted runner scenario?

Yes, pretty much. It's also consistent with the situation where the GitHub-hosted runner images have caught up to the latest version of CodeQL and the tools we want are already installed. Plus if anyone's still using a hardcoded toolcache path to find CodeQL, that'll still work.

dbartol reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

henrymercer added 2 commits December 4, 2024 10:06
@henrymercer
Merge branch 'main' into henrymercer/extract-direct-to-toolcache
4a7b2d6
@henrymercer
Add changelog note
5d7e628
@henrymercer
henrymercer dismissed dbartol’s stale review via 5d7e628 December 4, 2024 10:08
NlightNFotis
NlightNFotis approved these changes Dec 4, 2024
View reviewed changes

@NlightNFotis NlightNFotis left a comment

Copy link
Copy Markdown
Contributor

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.

Great!

Thank you for this change!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/tools-download.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/tools-download.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer
henrymercer merged commit 3096afe into main Dec 4, 2024
@henrymercer
henrymercer deleted the henrymercer/extract-direct-to-toolcache branch December 4, 2024 11:26
This was referenced Dec 10, 2024
Merge main into releases/v3 #2640
Merged
Merge releases/v3 into releases/v2 #2642
Merged
@mbg mbg mentioned this pull request Aug 11, 2025
Cleanup extract to toolcache feature flag #3021
Merged
3 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Sep 16, 2026
ci(actions): bump github/codeql-action/autobuild from 4.37.8 to 4.38.0 VBCreators/AI-RAG#35
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@NlightNFotis NlightNFotis NlightNFotis approved these changes
@dbartol dbartol dbartol left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@henrymercer @NlightNFotis @dbartol
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.