| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This pull request updates the start-proxy action to use getDefaultCliVersion from feature flags instead of hard-coding defaults.bundleVersion. This change allows the start-proxy action to dynamically determine the CodeQL CLI version to use, either from feature flags on GitHub.com or from defaults on GHES, making the behavior consistent with other actions in the codebase.
Changes:
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/start-proxy.ts | Updated function signatures to accept FeatureEnablement; changed to use getDefaultCliVersion for dynamic version selection; added getGitHubVersion import |
| src/start-proxy.test.ts | Updated test mocking to properly handle feature flags; added mockOfflineFeatures helper; modified tests to pass features parameter |
| src/start-proxy-action.ts | Removed unused Feature import; updated getProxyBinaryPath call to pass features parameter |
| lib/start-proxy-action.js | Generated JavaScript reflecting TypeScript changes |
src/start-proxy.ts:558
/** * Gets a path to the proxy binary. If possible, this function will find the proxy in the * runner's tool cache. Otherwise, it downloads and extracts the proxy binary, * and stores it in the tool cache. * * @param logger The logger to use. * @returns The path to the proxy binary. */
Sorry, something went wrong.
There was a problem hiding this comment.
Just a little nit, otherwise lgtm!
Sorry, something went wrong.
| async function getCliVersionFromFeatures( | ||
| features: FeatureEnablement, | ||
| ): Promise<CodeQLDefaultVersionInfo> { | ||
| const gitHubVersion = await getGitHubVersion(); |
There was a problem hiding this comment.
To save an API call, could we thread githubVersion through from
codeql-action/src/start-proxy-action.ts
Line 49 in bce0deb
Sorry, something went wrong.
There was a problem hiding this comment.
We could thread it through, but getGitHubVersion should also cache the result from the API on the first call, so that the second call to getGitHubVersion here shouldn't result in an additional API call.
Sorry, something went wrong.
There was a problem hiding this comment.
👍🏻 I see. Well I'll leave that as a judgment call to you, happy to approve.
Sorry, something went wrong.
There was a problem hiding this comment.
Let's get this merged to unblock other PRs, thanks 👍🏻
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Changes the start-proxy action to use getDefaultCliVersion rather than having defaults.bundleVersion hard-coded. Conveniently, this adds a permanent consumer of feature flags to start-proxy.
I have put this behind a new FF to gate the new behaviour to make this a less risky change.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
Products:
Environments:
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist