FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Extract directly to the toolcache by henrymercer · Pull Request #2631 · github/codeql-action · GitHub

Extract directly to the toolcache - #2631

Merged
henrymercer merged 14 commits into
mainfrom
henrymercer/extract-direct-to-toolcache
Dec 4, 2024
Merged

Extract directly to the toolcache#2631
henrymercer merged 14 commits into
mainfrom
henrymercer/extract-direct-to-toolcache

Conversation

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.

henrymercer requested a review from a team as a code owner December 3, 2024 18:29
dbartol previously approved these changes Dec 3, 2024

dbartol 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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?

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.

NlightNFotis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Great!

Thank you for this change!

Comment thread src/tools-download.ts
Comment thread src/tools-download.ts
henrymercer merged commit 3096afe into main Dec 4, 2024
henrymercer deleted the henrymercer/extract-direct-to-toolcache branch December 4, 2024 11:26
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL