-
Notifications
You must be signed in to change notification settings - Fork 355
Clean-up logic for overriding proxy #2839
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR removes the workaround for unsetting proxy environment variables from both the TypeScript and JavaScript implementations, as the underlying CodeQL CLI fix makes the workaround unnecessary.
- Removed code that unsets CODEQL_PROXY_* variables in src/analyze-action.ts
- Removed code that unsets CODEQL_PROXY_* variables in lib/analyze-action.js
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/analyze-action.ts | Removed proxy environment variable cleanup as workaround |
lib/analyze-action.js | Removed proxy environment variable cleanup as workaround |
Comments suppressed due to low confidence (2)
src/analyze-action.ts:204
- Confirm that the removal of proxy environment variable cleanup does not affect workflows that might still expect them to be unset.
// Unset the CODEQL_PROXY_* environment variables, as they are not needed
lib/analyze-action.js:161
- Verify that the removal of this logic in the JavaScript file does not impact any workflows depending on proxy environment variables.
// Unset the CODEQL_PROXY_* environment variables, as they are not needed
Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more
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.
Makes sense. Can we gate this behind a version check so that we keep the same behaviour for older CLI versions?
88ff4e3
to
c6b4ed1
Compare
c6b4ed1
to
a3e50f3
Compare
// Unset the CODEQL_PROXY_* environment variables, as they are not needed | ||
// and can cause issues with older CodeQL CLIs. | ||
// Check for CODEQL_PROXY_HOST: and if it is empty but set, unset it. | ||
if (process.env.CODEQL_PROXY_HOST === "" && !(await util.codeQlVersionAtLeast(codeql, "2.20.7"))) { |
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.
Can you extract this to a constant and place it in feature-flags.ts
?
Ideally, we would have pushed this into the CLI itself and added added it to isSupportedToolsFeature
, but it's a bit late for that now. Using a hard-coded feature version is best then.
Hmmm...looking through the code, I see that we haven't been to good about moving all hard-coded versions to the feature-flags.ts file. Still, that's something that we've tried to do in the past.
In #2741, we added this logic due to an issue with the CLI. The CLI has since been fixed and I think it is cleaner to remove this workaround. I am open to hear otherwise and close the PR instead.
Merge / deployment checklist