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

Conversation

NlightNFotis
Copy link
Member

Description

This PR disables streaming the extraction of the CodeQL bundle as a temporary workaround to the issue described in #2593.

A proper fix will be implemented later so that we can stream while respecting proxy settings.

Fixes #2593

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.

@NlightNFotis NlightNFotis requested a review from a team as a code owner November 12, 2024 16:41
@NlightNFotis NlightNFotis added the bug Something isn't working label Nov 12, 2024
@NlightNFotis NlightNFotis self-assigned this Nov 12, 2024
Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

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

Can you reintroduce the CODEQL_ACTION_ZSTD_BUNDLE_STREAMING_EXTRACTION environment variable so the PR check pr-checks/checks/zstd-bundle-streaming.yml will continue to test that streaming works? Otherwise LGTM.

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?

@NlightNFotis
Copy link
Member Author

@aeisenberg @henrymercer , thank you both for your reviews. I've implemented Henry's request which I found to be in the intersection of what both of you suggested. Would it be possible to have another look at this?

aeisenberg
aeisenberg previously approved these changes Nov 12, 2024
Copy link
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

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

Looks good after you can update the comments to link to the appropriate issue that tracks the TODO.

@@ -39,6 +41,15 @@ setupTests(test);

let stubConfig: Config;

// TODO: Remove when when we no longer need to pass in features
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 link to the issue for this? I think it's this one: #2600

@@ -25,6 +27,14 @@ import {

setupTests(test);

// TODO: Remove when when we no longer need to pass in features
Copy link
Contributor

Choose a reason for hiding this comment

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

Same...can you link to #2600?

henrymercer
henrymercer previously approved these changes Nov 12, 2024
@@ -25,6 +27,14 @@ import {

setupTests(test);

// TODO: Remove when when we no longer need to pass in features
const expectedFeatureEnablement: FeatureEnablement = initializeFeatures(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: update initializeFeatures to return FeatureEnablement so we can remove this cast.

@NlightNFotis
Copy link
Member Author

@henrymercer @aeisenberg sorry for this, can you please re-approve, because I've added the link that Andrew asked for and it automatically dismissed the reviews.

@NlightNFotis NlightNFotis merged commit f047903 into main Nov 12, 2024
271 checks passed
@NlightNFotis NlightNFotis deleted the NlightNFotis/disable-streaming branch November 12, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enabling zstd bundles for GHES seems to have broken proxy support on Enterprise Cloud with self-hosted runners
3 participants