Skip to content
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

workaround: disable streaming when downloading codeql bundle #2599

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/tools-download.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/tools-download.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/tools-download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ export async function downloadAndExtract(

const compressionMethod = tar.inferCompressionMethod(codeqlURL);

if (compressionMethod === "zstd" && process.platform === "linux") {
// TODO: Re-enable streaming when we have a more reliable way to respect proxy settings.
// eslint-disable-next-line no-constant-condition, no-constant-binary-expression
if (false && compressionMethod === "zstd" && process.platform === "linux") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you turn false into an environment variable? This way at least we can selectively enable it.

Maybe something like:

Suggested change
if (false && compressionMethod === "zstd" && process.platform === "linux") {
if (process.env[EnvVar.STREAM_BUNDLE_DOWNLOAD] !== "true" && compressionMethod === "zstd" && process.platform === "linux") {

And then add the variable to the EnvVar class?

logger.info(`Streaming the extraction of the CodeQL bundle.`);

const toolsInstallStart = performance.now();
Expand Down
Loading